From 5a9540d9075dda977662cc0faee8d8a0549f0dd9 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Fri, 11 Mar 2022 08:20:49 -0700 Subject: [PATCH] lf_tx_power.py : temporary work around for admin down and up AP lf_check.py : email input is now optional lf_qa.py : added to the help Signed-off-by: Chuck SmileyRekiere --- lf_tx_power.py | 25 ++++++++++++++++--------- py-scripts/tools/lf_check.py | 11 +++++++---- py-scripts/tools/lf_qa.py | 2 +- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/lf_tx_power.py b/lf_tx_power.py index 8e532b8b..62705058 100755 --- a/lf_tx_power.py +++ b/lf_tx_power.py @@ -158,7 +158,7 @@ The user also has the option of setting up the station oustide of this script, h NOTE: Telnet port 23 unless specified , ssh port 22 unless specified, scheme defaults to ssh -# Below +# TODO update , OLD EXAMPLE - Connecting to AP ############################################################################################## # read AP for powercfg values using : show controllers dot11Radio 1 powercfg | g T1' ############################################################################################## @@ -169,6 +169,7 @@ NOTE: Telnet port 23 unless specified , ssh port 22 unless specified, scheme --antenna_gain "6" --wlanID 1 --wlan open-wlan --wlanSSID open-wlan\ --ap_info "ap_scheme==telnet ap_prompt==9120_Candela ap_ip==172.19.27.55 ap_port==2008 ap_user==admin ap_pw==Wnbulab@123" +# TODO update OLD EXAMPLE replaced by BATCH mode ############################################################################################## # Long duration test -- need to create the ---wlanID 1 --wlan open-wlan --wlanSSID open-wlan ############################################################################################## @@ -343,7 +344,7 @@ def main(): # controller configuration parser.add_argument("-s", "--scheme", type=str, choices=["serial", "ssh", "telnet"], help="[controller configuration] Connect via serial, ssh or telnet --scheme ssh", required=True) - parser.add_argument("-d", "--dest", type=str, help="[controller configuration] address of the controller --dest localhost", required=True) + parser.add_argument("-d", "--controller_ip","--dest", dest="dest",type=str, help="[controller configuration] address of the controller --dest localhost", required=True) parser.add_argument("-o", "--port", type=str, help="[controller configuration] controller port on the controller --port 8887", required=True) parser.add_argument("-u", "--user", type=str, help="[controller configuration] controller login/username --user admin", required=True) parser.add_argument("-p", "--passwd", type=str, help="[controller configuration] credential password --passwd Cisco123", required=True) @@ -1289,6 +1290,13 @@ def main(): wait_ip_print = False wait_assoc_print = False + # Temporary Work around + # disable the AP for 6g and enable + if args.band == '6g': + cs.ap_name_shutdown() + sleep(5) + cs.ap_name_no_shutdown() + # Wait untill LANforge station connects while True: port_stats = subprocess.run(["./lf_portmod.pl", "--manager", lfmgr, "--card", lfresource, "--port_name", lfstation, @@ -1860,7 +1868,7 @@ def main(): # TODO kpi pass fail # results_dict['Subtest-Pass'] = None # results_dict['Subtest-Fail'] = None - results_dict['short-description'] = "Calc dBm Beacon {ap} {band} {channel} {nss} {bw} {mode} {txpower}".format( + results_dict['short-description'] = "Calc dBm Beacon {ap} {band} ch:{channel} nss:{nss} bw:{bw} {mode} tx:{txpower}".format( ap=args.ap, band=args.band, channel=_ch, nss=_nss, bw=_bw, mode=_mode, txpower=cc_power) results_dict['numeric-score'] = "{calc_dbm_beacon}".format(calc_dbm_beacon=calc_dbm_beacon) results_dict['Units'] = "dBm" @@ -1874,7 +1882,7 @@ def main(): # TODO kpi pass fail # results_dict['Subtest-Pass'] = None # results_dict['Subtest-Fail'] = None - results_dict['short-description'] = "Diff CC & Beacon dBm {ap} {band} {channel} {nss} {bw} {mode} {txpower}".format( + results_dict['short-description'] = "Diff CC & Beacon dBm {ap} {band} ch:{channel} nss:{nss} bw:{bw} {mode} tx:{txpower}".format( ap=args.ap, band=args.band, channel=_ch, nss=_nss, bw=_bw, mode=_mode, txpower=cc_power) results_dict['numeric-score'] = "{diff_dbm_beacon}".format(diff_dbm_beacon=diff_dbm_beacon) results_dict['Units'] = "dBm" @@ -1888,7 +1896,7 @@ def main(): # TODO kpi pass fail # results_dict['Subtest-Pass'] = None # results_dict['Subtest-Fail'] = None - results_dict['short-description'] = "Calc dBm Combined {ap} {band} {channel} {nss} {bw} {mode} {txpower}".format( + results_dict['short-description'] = "Calc dBm Combined {ap} {band} ch:{channel} nss:{nss} bw:{bw} {mode} tx:{txpower}".format( ap=args.ap, band=args.band, channel=_ch, nss=_nss, bw=_bw, mode=_mode, txpower=cc_power) results_dict['numeric-score'] = "{calc_dbm}".format(calc_dbm=calc_dbm) results_dict['Units'] = "dBm" @@ -1902,7 +1910,7 @@ def main(): # TODO kpi pass fail # results_dict['Subtest-Pass'] = None # results_dict['Subtest-Fail'] = None - results_dict['short-description'] = "Diff CC dBm & Combined {ap} {band} {channel} {nss} {bw} {mode} {txpower}".format( + results_dict['short-description'] = "Diff CC dBm & Combined {ap} {band} ch:{channel} nss:{nss} bw:{bw} {mode} tx:{txpower}".format( ap=args.ap, band=args.band, channel=_ch, nss=_nss, bw=_bw, mode=_mode, txpower=cc_power) results_dict['numeric-score'] = "{diff_dbm}".format(diff_dbm=diff_dbm) results_dict['Units'] = "dBm" @@ -2018,7 +2026,7 @@ def main(): col += 1 if (_bw != bw): - err = "ERROR: Requested bandwidth: %s != station's reported bandwidth: %s. " % (bw, _bw) + err = "WARNING: Known Issue with AX210 Requested bandwidth: %s != station's reported bandwidth: %s. " % (bw, _bw) e_tot += err logg.info(err) csv.write(err) @@ -2188,11 +2196,10 @@ def main(): # TODO the table looks off report.set_table_dataframe_from_xlsx(outfile_xlsx) report.build_table() + report.build_footer() report.write_html_with_timestamp() report.write_index_html() - report.build_footer() - report.write_index_html() report.write_pdf(_page_size = 'A3', _orientation='Landscape') # report.write_pdf_with_timestamp(_page_size='A4', _orientation='Portrait') diff --git a/py-scripts/tools/lf_check.py b/py-scripts/tools/lf_check.py index 2888b3c4..1100357c 100755 --- a/py-scripts/tools/lf_check.py +++ b/py-scripts/tools/lf_check.py @@ -656,18 +656,17 @@ QA Report Dashboard: lf_qa.py was not run as last script of test suite""" else: self.logger.info("TEST_TIMEOUT not in test_rig_parameters json") exit(1) + # EMAIL is optional if "EMAIL_LIST_PRODUCTION" in self.json_rig["test_rig_parameters"]: self.email_list_production = self.json_rig["test_rig_parameters"]["EMAIL_LIST_PRODUCTION"] else: self.logger.info( "EMAIL_LIST_PRODUCTION not in test_rig_parameters json") - exit(1) if "EMAIL_LIST_TEST" in self.json_rig["test_rig_parameters"]: self.email_list_test = self.json_rig["test_rig_parameters"]["EMAIL_LIST_TEST"] print(self.email_list_test) else: self.logger.info("EMAIL_LIST_TEST not in test_rig_parameters json") - exit(1) if "EMAIL_TITLE_TXT" in self.json_rig["test_rig_parameters"]: self.email_title_txt = self.json_rig["test_rig_parameters"]["EMAIL_TITLE_TXT"] else: @@ -778,6 +777,10 @@ QA Report Dashboard: lf_qa.py was not run as last script of test suite""" if 'BSSID_TO_USE' in args_list_element: self.test_dict[self.test]['args_list'][index] = self.test_dict[self.test]['args_list'][index].replace( 'BSSID_TO_USE', self.wireless_network_dict[idx]['BSSID_TO_USE']) + if 'WLAN_ID_USED' in args_list_element: + self.test_dict[self.test]['args_list'][index] = self.test_dict[self.test]['args_list'][index].replace( + 'WLAN_ID_USED', self.wireless_network_dict[idx]['WLAN_ID_USED']) + # use_ssid_idx is ephemeral and used only for # variable replacement , remove tmp_idx = "use_ssid_idx={}".format(ssid_idx_number) @@ -1688,8 +1691,8 @@ note if all json data (rig,dut,tests) in same json file pass same json in for a print("exception write_pdf_with_timestamp()") print("lf_check_html_report: " + html_report) - if args.no_send_email: - print("send email not set") + if args.no_send_email or check.email_list_test == "": + print("send email not set or email_list_test not set") else: check.send_results_email(report_file=html_report) # diff --git a/py-scripts/tools/lf_qa.py b/py-scripts/tools/lf_qa.py index 9b13e6f6..680e8489 100755 --- a/py-scripts/tools/lf_qa.py +++ b/py-scripts/tools/lf_qa.py @@ -624,7 +624,7 @@ Usage: lf_qa.py --store --png --path --databas default='qa_table') parser.add_argument( '--server', - help="--server http:/// system running the tests may also be a server example: --server 'http://192.168.95.6/' default: ''", + help="--server http:/// for running with server enabled. Not needed for running locally. --server 'http://192.168.95.6/' default: ''", default='') parser.add_argument( '--cut',