mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
lf_check.py: added support for loading custom database per test
lf_check_config_template.ini : example Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -515,23 +515,33 @@ NOTE: for now to see stdout and stderr remove /home/lanforge from path.
|
|||||||
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('COL_NAMES',self.col_names)
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('COL_NAMES',self.col_names)
|
||||||
if 'UPSTREAM_PORT' in self.test_dict[test]['args']:
|
if 'UPSTREAM_PORT' in self.test_dict[test]['args']:
|
||||||
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('UPSTREAM_PORT',self.col_names)
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('UPSTREAM_PORT',self.col_names)
|
||||||
if self.use_factory_default_db == "TRUE":
|
|
||||||
self.load_factory_default_db()
|
if 'load_db' in self.test_dict[test]:
|
||||||
sleep(3)
|
self.logger.info("load_db : {}".format(self.test_dict[test]['load_db']))
|
||||||
self.logger.info("FACTORY_DFLT loaded between tests with scenario.py --load FACTORY_DFLT")
|
if str(self.test_dict[test]['load_db']).lower() != "none" and str(self.test_dict[test]['load_db']).lower() != "skip":
|
||||||
if self.use_blank_db == "TRUE":
|
try:
|
||||||
self.load_blank_db()
|
self.load_custom_db(self.test_dict[test]['load_db'])
|
||||||
sleep(1)
|
except:
|
||||||
self.logger.info("BLANK loaded between tests with scenario.py --load BLANK")
|
self.logger.info("custom database failed to load check existance and location: {}".format(self.test_dict[test]['load_db']))
|
||||||
if self.use_custom_db == "TRUE":
|
else:
|
||||||
try:
|
self.logger.info("no load_db present in dictionary, load db normally")
|
||||||
self.load_custom_db(self.custom_db)
|
if self.use_factory_default_db == "TRUE":
|
||||||
|
self.load_factory_default_db()
|
||||||
|
sleep(3)
|
||||||
|
self.logger.info("FACTORY_DFLT loaded between tests with scenario.py --load FACTORY_DFLT")
|
||||||
|
if self.use_blank_db == "TRUE":
|
||||||
|
self.load_blank_db()
|
||||||
sleep(1)
|
sleep(1)
|
||||||
self.logger.info("{} loaded between tests with scenario.py --load {}".format(self.custom_db,self.custom_db))
|
self.logger.info("BLANK loaded between tests with scenario.py --load BLANK")
|
||||||
except:
|
if self.use_custom_db == "TRUE":
|
||||||
self.logger.info("custom database failed to load check existance and location")
|
try:
|
||||||
else:
|
self.load_custom_db(self.custom_db)
|
||||||
self.logger.info("no db loaded between tests: {}".format(self.use_custom_db))
|
sleep(1)
|
||||||
|
self.logger.info("{} loaded between tests with scenario.py --load {}".format(self.custom_db,self.custom_db))
|
||||||
|
except:
|
||||||
|
self.logger.info("custom database failed to load check existance and location: {}".format(self.custom_db))
|
||||||
|
else:
|
||||||
|
self.logger.info("no db loaded between tests: {}".format(self.use_custom_db))
|
||||||
|
|
||||||
sleep(1) # DO NOT REMOVE the sleep is to allow for the database to stablize
|
sleep(1) # DO NOT REMOVE the sleep is to allow for the database to stablize
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ TEST_DICT: {
|
|||||||
|
|
||||||
[SUITE]
|
[SUITE]
|
||||||
TEST_DICT: {
|
TEST_DICT: {
|
||||||
"create_l3":{"enabled":"TRUE","command":"create_l4.py","args":"--radio RADIO_USED --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED --debug"},
|
"create_l3":{"enabled":"TRUE","load_db":"none","command":"create_l4.py","args":"--radio RADIO_USED --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED --debug"},
|
||||||
"create_l4":{"enabled":"TRUE","command":"create_l4.py","args":"RADIO_1_CFG --debug"},
|
"create_l4":{"enabled":"TRUE","command":"create_l4.py","args":"RADIO_1_CFG --debug"},
|
||||||
# the name needs to be unique for the dictionary
|
# the name needs to be unique for the dictionary
|
||||||
"create_l4_2":{"enabled":"TRUE","command":"create_l4.py","args":"--radio wiphy1 --ssid ct523c-vap --passwd ct523c-vap --security wpa2 --debug"}
|
"create_l4_2":{"enabled":"TRUE","command":"create_l4.py","args":"--radio wiphy1 --ssid ct523c-vap --passwd ct523c-vap --security wpa2 --debug"}
|
||||||
|
|||||||
Reference in New Issue
Block a user