mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 02:38:03 +00:00 
			
		
		
		
	Merge ../lanforge-scripts
This commit is contained in:
		| @@ -339,6 +339,21 @@ clean_old_kernels() { | ||||
|             echo "/lib/modules/$f" | ||||
|         done | xargs rm -rf | ||||
|     fi | ||||
|     # check to see if there are 50_candela-x files that | ||||
|     # lack a /lib/modules directory | ||||
|     local fifty_files=(`ls /etc/grub.d/50_candela_*`) | ||||
|     local k_v | ||||
|     for file in "${fifty_files[@]}"; do | ||||
|         k_v=${file#/etc/grub.d/50_candela_} | ||||
|         #echo "K_V[$k_v]" | ||||
|         if [ ! -d /lib/modules/$k_v ]; then | ||||
|             echo "/lib/modules/$k_v not found, removing /etc/grub.d/50_candela_$k_v" | ||||
|             rm -f "/etc/grub.d/50_candela_${k_v}" | ||||
|         fi | ||||
|     done | ||||
|  | ||||
|     grub2-mkconfig -o /boot/grub2/grub.cfg | ||||
|  | ||||
|     if [ -d "/boot2" ]; then | ||||
|         rm -rf /boot2/* | ||||
|         rsync -a /boot/. /boot2/ | ||||
|   | ||||
| @@ -5,7 +5,6 @@ import importlib | ||||
| from pprint import pprint | ||||
| import time | ||||
|  | ||||
|   | ||||
| sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../"))) | ||||
|  | ||||
| lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base") | ||||
| @@ -20,15 +19,16 @@ class MACVLANProfile(LFCliBase): | ||||
|                  local_realm, | ||||
|                  macvlan_parent="eth1", | ||||
|                  num_macvlans=1, | ||||
|                  admin_down=False, | ||||
|                  shelf=1, | ||||
|                  resource=1, | ||||
|                  dhcp=False, | ||||
|                  debug_=False): | ||||
|         super().__init__(lfclient_host, lfclient_port, debug_) | ||||
|         self.local_realm = local_realm | ||||
|         self.num_macvlans = num_macvlans | ||||
|         self.macvlan_parent = macvlan_parent | ||||
|         self.resource = 1 | ||||
|         self.shelf = 1 | ||||
|         self.resource = resource | ||||
|         self.shelf = shelf | ||||
|         self.desired_macvlans = [] | ||||
|         self.created_macvlans = [] | ||||
|         self.dhcp = dhcp | ||||
| @@ -123,7 +123,7 @@ class MACVLANProfile(LFCliBase): | ||||
|         print("Creating MACVLANs...") | ||||
|         req_url = "/cli-json/add_mvlan" | ||||
|  | ||||
|         if not self.dhcp and self.first_ip_addr is not None and self.netmask is not None and self.gateway is not None: | ||||
|         if not self.dhcp and self.first_ip_addr and self.netmask and self.gateway: | ||||
|             self.desired_set_port_interest_flags.append("ip_address") | ||||
|             self.desired_set_port_interest_flags.append("ip_Mask") | ||||
|             self.desired_set_port_interest_flags.append("ip_gateway") | ||||
| @@ -148,7 +148,7 @@ class MACVLANProfile(LFCliBase): | ||||
|                 "mac": "xx:xx:xx:*:*:xx", | ||||
|                 "port": self.local_realm.name_to_eid(self.macvlan_parent)[2], | ||||
|                 "index": int(self.desired_macvlans[i][self.desired_macvlans[i].index('#') + 1:]), | ||||
|                 #"dhcp": self.dhcp, | ||||
|                 # "dhcp": self.dhcp, | ||||
|                 "flags": None | ||||
|             } | ||||
|             if admin_down: | ||||
| @@ -156,8 +156,9 @@ class MACVLANProfile(LFCliBase): | ||||
|             else: | ||||
|                 data["flags"] = 0 | ||||
|             self.created_macvlans.append("%s.%s.%s#%d" % (self.shelf, self.resource, | ||||
|                                                           self.macvlan_parent, int( | ||||
|                 self.desired_macvlans[i][self.desired_macvlans[i].index('#') + 1:]))) | ||||
|                                                           self.macvlan_parent, | ||||
|                                                           int(self.desired_macvlans[i][ | ||||
|                                                               self.desired_macvlans[i].index('#') + 1:]))) | ||||
|             self.local_realm.json_post(req_url, data) | ||||
|             time.sleep(sleep_time) | ||||
|  | ||||
| @@ -170,13 +171,12 @@ class MACVLANProfile(LFCliBase): | ||||
|             eid = self.local_realm.name_to_eid(self.created_macvlans[i]) | ||||
|             name = eid[2] | ||||
|             self.set_port_data["port"] = name  # for set_port calls. | ||||
|             if not self.dhcp and self.first_ip_addr is not None and self.netmask is not None \ | ||||
|                     and self.gateway is not None: | ||||
|             if not self.dhcp and self.first_ip_addr and self.netmask and self.gateway: | ||||
|                 self.set_port_data["ip_addr"] = self.ip_list[i] | ||||
|                 self.set_port_data["netmask"] = self.netmask | ||||
|                 self.set_port_data["gateway"] = self.gateway | ||||
|             set_port_r.addPostData(self.set_port_data) | ||||
|             json_response = set_port_r.jsonPost(debug) | ||||
|             set_port_r.jsonPost(debug) | ||||
|             time.sleep(sleep_time) | ||||
|  | ||||
|     def cleanup(self): | ||||
|   | ||||
| @@ -557,7 +557,8 @@ class StationProfile: | ||||
|             station_shelf = station_eid[0] | ||||
|             station_resource = station_eid[1] | ||||
|             station_port = station_eid[2] | ||||
|             self.add_sta_data["radio"] = radio | ||||
|             radio_eid = self.local_realm.name_to_eid(radio) | ||||
|             self.add_sta_data["radio"] = radio_eid[2] | ||||
|             self.add_sta_data["shelf"] = station_shelf | ||||
|             self.add_sta_data["resource"] = station_resource | ||||
|             self.add_sta_data["sta_name"] = station_port | ||||
|   | ||||
| @@ -55,27 +55,43 @@ class HttpDownload(Realm): | ||||
|         self.port_util = PortUtils(self.local_realm) | ||||
|         self.http_profile.debug = _debug_on | ||||
|         self.created_cx = {} | ||||
|         self.station_list = [] | ||||
|         self.radio = [] | ||||
|  | ||||
|     def set_values(self): | ||||
|         # This method will set values according user input | ||||
|         if self.bands == "5G": | ||||
|             self.radio = [self.fiveg_radio] | ||||
|             self.station_list = [LFUtils.portNameSeries(prefix_="fiveg_sta", start_id_=self.sta_start_id, | ||||
|                                                             end_id_=self.num_sta - 1, padding_number_=10000, | ||||
|                                                             radio=self.fiveg_radio)] | ||||
|         elif self.bands == "2.4G": | ||||
|             self.radio = [self.twog_radio] | ||||
|             self.station_list = [LFUtils.portNameSeries(prefix_="twog_sta", start_id_=self.sta_start_id, | ||||
|                                                        end_id_=self.num_sta - 1, padding_number_=10000, | ||||
|                                                        radio=self.twog_radio)] | ||||
|         elif self.bands == "Both": | ||||
|             self.radio = [self.fiveg_radio, self.twog_radio] | ||||
|             print(self.radio) | ||||
|             self.num_sta = self.num_sta // 2 | ||||
|             # self.num_sta = self.num_sta // 2 | ||||
|             self.station_list = [ | ||||
|                                  LFUtils.portNameSeries(prefix_="fiveg_sta", start_id_=self.sta_start_id, | ||||
|                                                         end_id_=self.num_sta - 1, padding_number_=10000, | ||||
|                                                         radio=self.fiveg_radio), | ||||
|                                  LFUtils.portNameSeries(prefix_="twog_sta", start_id_=self.sta_start_id, | ||||
|                                                        end_id_=self.num_sta - 1, padding_number_=10000, | ||||
|                                                        radio=self.twog_radio) | ||||
|                                  ] | ||||
|  | ||||
|     def precleanup(self): | ||||
|         self.count = 0 | ||||
|         for rad in self.radio: | ||||
|             print("radio", rad) | ||||
|             if rad == self.fiveg_radio: | ||||
|         for rad in range(len(self.radio)): | ||||
|             print("radio", self.radio[rad]) | ||||
|             if self.radio[rad] == self.fiveg_radio: | ||||
|                 # select an mode | ||||
|                 self.station_profile.mode = 10 | ||||
|                 self.count = self.count + 1 | ||||
|             elif rad == self.twog_radio: | ||||
|             elif self.radio[rad] == self.twog_radio: | ||||
|                 # select an mode | ||||
|                 self.station_profile.mode = 6 | ||||
|                 self.count = self.count + 1 | ||||
| @@ -85,24 +101,19 @@ class HttpDownload(Realm): | ||||
|                 self.num_sta = 2 * (self.num_sta) | ||||
|                 self.station_profile.mode = 10 | ||||
|                 self.http_profile.cleanup() | ||||
|                 self.station_list1 = LFUtils.portNameSeries(prefix_="sta", start_id_=self.sta_start_id, | ||||
|                                                             end_id_=self.num_sta - 1, padding_number_=10000, | ||||
|                                                             radio=rad) | ||||
|                 # cleanup station list which started sta_id 20 | ||||
|                 self.station_profile.cleanup(self.station_list1, debug_=self.local_realm.debug) | ||||
|                 self.station_profile.cleanup(self.station_list[rad], debug_=self.local_realm.debug) | ||||
|                 LFUtils.wait_until_ports_disappear(base_url=self.local_realm.lfclient_url, | ||||
|                                                    port_list=self.station_list, | ||||
|                                                    port_list=self.station_list[rad], | ||||
|                                                    debug=self.local_realm.debug) | ||||
|                 return | ||||
|             # clean dlayer4 ftp traffic | ||||
|             self.http_profile.cleanup() | ||||
|             self.station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=self.sta_start_id, | ||||
|                                                        end_id_=self.num_sta - 1, padding_number_=10000, | ||||
|                                                        radio=rad) | ||||
|  | ||||
|             # cleans stations | ||||
|             self.station_profile.cleanup(self.station_list, delay=1, debug_=self.local_realm.debug) | ||||
|             self.station_profile.cleanup(self.station_list[rad], delay=1, debug_=self.local_realm.debug) | ||||
|             LFUtils.wait_until_ports_disappear(base_url=self.local_realm.lfclient_url, | ||||
|                                                port_list=self.station_list, | ||||
|                                                port_list=self.station_list[rad], | ||||
|                                                debug=self.local_realm.debug) | ||||
|             time.sleep(1) | ||||
|         print("precleanup done") | ||||
| @@ -110,15 +121,16 @@ class HttpDownload(Realm): | ||||
|     def build(self): | ||||
|         # enable http on ethernet | ||||
|         self.port_util.set_http(port_name=self.local_realm.name_to_eid(self.upstream)[2], resource=1, on=True) | ||||
|         for rad in self.radio: | ||||
|             self.station_profile.use_security(self.security, self.ssid, self.password) | ||||
|         for rad in range(len(self.radio)): | ||||
|             print(self.station_list[rad]) | ||||
|             self.station_profile.use_security(self.security[rad], self.ssid[rad], self.password[rad]) | ||||
|             self.station_profile.set_command_flag("add_sta", "create_admin_down", 1) | ||||
|             self.station_profile.set_command_param("set_port", "report_timer", 1500) | ||||
|             self.station_profile.set_command_flag("set_port", "rpt_timer", 1) | ||||
|             self.station_profile.create(radio=rad, sta_names_=self.station_list, debug=self.local_realm.debug) | ||||
|             self.local_realm.wait_until_ports_appear(sta_list=self.station_list) | ||||
|             self.station_profile.create(radio=self.radio[rad], sta_names_=self.station_list[rad], debug=self.local_realm.debug) | ||||
|             self.local_realm.wait_until_ports_appear(sta_list=self.station_list[rad]) | ||||
|             self.station_profile.admin_up() | ||||
|             if self.local_realm.wait_for_ip(self.station_list, timeout_sec=60): | ||||
|             if self.local_realm.wait_for_ip(self.station_list[rad], timeout_sec=60): | ||||
|                 self.local_realm._pass("All stations got IPs") | ||||
|             else: | ||||
|                 self.local_realm._fail("Stations failed to get IPs") | ||||
| @@ -138,7 +150,6 @@ class HttpDownload(Realm): | ||||
|                                      suppress_related_commands_=None, http=True, | ||||
|                                      http_ip=ip_upstream + "/webpage.html") | ||||
|             if self.count == 2: | ||||
|                 self.station_list = self.station_list1 | ||||
|                 self.station_profile.mode = 6 | ||||
|         print("Test Build done") | ||||
|  | ||||
| @@ -479,44 +490,60 @@ class HttpDownload(Realm): | ||||
|  | ||||
|         # Section commented because graphing breaks two band report generation | ||||
|         # TODO: Fix graphing bug with multiple bands being recorded | ||||
|         # | ||||
|         # report.set_title("WEBPAGE DOWNLOAD TEST") | ||||
|         # report.set_date(date) | ||||
|         # report.build_banner() | ||||
|         # report.set_table_title("Test Setup Information") | ||||
|         # report.build_table_title() | ||||
|         # | ||||
|         # report.test_setup_table(value="Device under test", test_setup_data=test_setup_info) | ||||
|         # | ||||
|         # report.set_obj_html("Objective", "The Webpage Download Test is designed to test the performance of the | ||||
|         # Access Point.The goal is to check whether the webpage loading time of all the " + str( num_stations) + " | ||||
|         # clients which are downloading at the same time meets the expectation when clients connected on single radio | ||||
|         # as well as dual radio") report.build_objective() report.set_obj_html("Download Time Graph", "The below | ||||
|         # graph provides information about the  download time taken by each client to download webpage for test | ||||
|         # duration of  " + str( duration) + " min") report.build_objective() graph = self.generate_graph( | ||||
|         # dataset=dataset, lis=lis, bands=bands) report.set_graph_image(graph) report.set_csv_filename(graph) | ||||
|         # report.move_csv_file() report.move_graph_image() report.build_graph() report.set_obj_html("Download Rate | ||||
|         # Graph", "The below graph provides information about the download rate in Mbps of each client to download | ||||
|         # the webpage for test duration of  " + str( duration) + " min") report.build_objective() graph2 = | ||||
|         # self.graph_2(dataset2, lis=lis, bands=bands) print("graph name {}".format(graph2)) report.set_graph_image( | ||||
|         # graph2) report.set_csv_filename(graph2) report.move_csv_file() report.move_graph_image() | ||||
|         # report.build_graph() report.set_obj_html("Summary Table Description", "This Table shows you the summary | ||||
|         # result of Webpage Download Test as PASS or FAIL criteria. If the average time taken by " + str( | ||||
|         # num_stations) + " clients to access the webpage is less than " + str( threshold_2g) + "s it's a PASS | ||||
|         # criteria for 2.4 ghz clients, If the average time taken by " + "" + str( num_stations) + " clients to | ||||
|         # access the webpage is less than " + str( threshold_5g) + "s it's a PASS criteria for 5 ghz clients and If | ||||
|         # the average time taken by " + str( num_stations) + " clients to access the webpage is less than " + str( | ||||
|         # threshold_both) + "s it's a PASS criteria for 2.4 ghz and 5ghz clients") | ||||
|         # | ||||
|         # report.build_objective() | ||||
|         # test_setup1 = pd.DataFrame(summary_table_value) | ||||
|         # report.set_table_dataframe(test_setup1) | ||||
|         # report.build_table() | ||||
|         # | ||||
|         # report.set_obj_html("Download Time Table Description", "This Table will provide you information of the | ||||
|         # minimum, maximum and the average time taken by clients to download a webpage in seconds") | ||||
|         # | ||||
|         # report.build_objective() | ||||
|         if bands == "Both": | ||||
|             num_stations = num_stations * 2 | ||||
|         report.set_title("WEBPAGE DOWNLOAD TEST") | ||||
|         report.set_date(date) | ||||
|         report.build_banner() | ||||
|         report.set_table_title("Test Setup Information") | ||||
|         report.build_table_title() | ||||
|  | ||||
|         report.test_setup_table(value="Device under test", test_setup_data=test_setup_info) | ||||
|  | ||||
|         report.set_obj_html("Objective", "The Webpage Download Test is designed to test the performance of the " | ||||
|                             "Access Point.The goal is to check whether the webpage loading time of all the " | ||||
|                             + str(num_stations) + | ||||
|                             "clients which are downloading at the same time meets the expectation when clients" | ||||
|                             "connected on single radio as well as dual radio") | ||||
|         report.build_objective() | ||||
|         report.set_obj_html("Download Time Graph", "The below graph provides information about the download time taken " | ||||
|                             "by each client to download webpage for test duration of  " + str(duration) + " min") | ||||
|         report.build_objective() | ||||
|  | ||||
|         graph = self.generate_graph(dataset=dataset, lis=lis, bands=bands) | ||||
|         report.set_graph_image(graph) | ||||
|         report.set_csv_filename(graph) | ||||
|         report.move_csv_file() | ||||
|         report.move_graph_image() | ||||
|         report.build_graph() | ||||
|         report.set_obj_html("Download Rate Graph", "The below graph provides information about the download rate in " | ||||
|                             "Mbps of each client to download the webpage for test duration of " + str(duration) + " min") | ||||
|         report.build_objective() | ||||
|         graph2 = self.graph_2(dataset2, lis=lis, bands=bands) | ||||
|         print("graph name {}".format(graph2)) | ||||
|         report.set_graph_image(graph2) | ||||
|         report.set_csv_filename(graph2) | ||||
|         report.move_csv_file() | ||||
|         report.move_graph_image() | ||||
|         report.build_graph() | ||||
|         report.set_obj_html("Summary Table Description", "This Table shows you the summary " | ||||
|                             "result of Webpage Download Test as PASS or FAIL criteria. If the average time taken by " + | ||||
|                             str(num_stations) + " clients to access the webpage is less than " + str( threshold_2g) + | ||||
|                             "s it's a PASS criteria for 2.4 ghz clients, If the average time taken by " + "" + | ||||
|                             str( num_stations) + " clients to access the webpage is less than " + str( threshold_5g) + | ||||
|                             "s it's a PASS criteria for 5 ghz clients and If the average time taken by " + str( num_stations) + | ||||
|                             " clients to access the webpage is less than " + str(threshold_both) + | ||||
|                             "s it's a PASS criteria for 2.4 ghz and 5ghz clients") | ||||
|  | ||||
|         report.build_objective() | ||||
|         test_setup1 = pd.DataFrame(summary_table_value) | ||||
|         report.set_table_dataframe(test_setup1) | ||||
|         report.build_table() | ||||
|  | ||||
|         report.set_obj_html("Download Time Table Description", "This Table will provide you information of the " | ||||
|                             "minimum, maximum and the average time taken by clients to download a webpage in seconds") | ||||
|  | ||||
|         report.build_objective() | ||||
|         x = [] | ||||
|         for fcc in list(result_data.keys()): | ||||
|             fcc_type = result_data[fcc]["min"] | ||||
| @@ -612,8 +639,6 @@ class HttpDownload(Realm): | ||||
|             csv_outfile = report.file_add_path(csv_outfile) | ||||
|             print("csv output file : {}".format(csv_outfile)) | ||||
|  | ||||
|         exit() | ||||
|  | ||||
|         test_setup = pd.DataFrame(download_table_value) | ||||
|         report.set_table_dataframe(test_setup) | ||||
|         report.build_table() | ||||
| @@ -638,9 +663,12 @@ def main(): | ||||
|     parser.add_argument('--num_stations', type=int, help='number of stations to create', default=1) | ||||
|     parser.add_argument('--twog_radio', help='specify radio for 2.4G clients', default='wiphy3') | ||||
|     parser.add_argument('--fiveg_radio', help='specify radio for 5 GHz client', default='wiphy0') | ||||
|     parser.add_argument('--security', help='WiFi Security protocol: {open|wep|wpa2|wpa3') | ||||
|     parser.add_argument('--ssid', help='WiFi SSID for script object to associate to') | ||||
|     parser.add_argument('--passwd', help='WiFi passphrase/password/key') | ||||
|     parser.add_argument('--twog_security', help='WiFi Security protocol: {open|wep|wpa2|wpa3} for 2.4G clients') | ||||
|     parser.add_argument('--twog_ssid', help='WiFi SSID for script object to associate for 2.4G clients') | ||||
|     parser.add_argument('--twog_passwd', help='WiFi passphrase/password/key for 2.4G clients') | ||||
|     parser.add_argument('--fiveg_security', help='WiFi Security protocol: {open|wep|wpa2|wpa3} for 5G clients') | ||||
|     parser.add_argument('--fiveg_ssid', help='WiFi SSID for script object to associate for 5G clients') | ||||
|     parser.add_argument('--fiveg_passwd', help='WiFi passphrase/password/key for 5G clients') | ||||
|     parser.add_argument('--target_per_ten', help='number of request per 10 minutes', default=100) | ||||
|     parser.add_argument('--file_size', type=str, help='specify the size of file you want to download', default='5MB') | ||||
|     parser.add_argument('--bands', nargs="+", help='specify which band testing you want to run eg 5G OR 2.4G OR Both', | ||||
| @@ -699,10 +727,22 @@ def main(): | ||||
|     avg_both = [] | ||||
|  | ||||
|     for bands in args.bands: | ||||
|         if bands == "2.4G": | ||||
|             security = [args.twog_security] | ||||
|             ssid = [args.twog_ssid] | ||||
|             passwd = [args.twog_passwd] | ||||
|         elif bands == "5G": | ||||
|             security = [args.fiveg_security] | ||||
|             ssid = [args.fiveg_ssid] | ||||
|             passwd = [args.fiveg_passwd] | ||||
|         elif bands == "Both": | ||||
|             security = [args.fiveg_security, args.twog_security] | ||||
|             ssid = [args.fiveg_ssid, args.twog_ssid] | ||||
|             passwd = [args.fiveg_passwd, args.twog_passwd] | ||||
|         http = HttpDownload(lfclient_host=args.mgr, lfclient_port=args.mgr_port, | ||||
|                             upstream=args.upstream_port, num_sta=args.num_stations, | ||||
|                             security=args.security, | ||||
|                             ssid=args.ssid, password=args.passwd, | ||||
|                             security=security, | ||||
|                             ssid=ssid, password=passwd, | ||||
|                             target_per_ten=args.target_per_ten, | ||||
|                             file_size=args.file_size, bands=bands, | ||||
|                             twog_radio=args.twog_radio, | ||||
| @@ -786,7 +826,7 @@ def main(): | ||||
|     date = str(datetime.now()).split(",")[0].replace(" ", "-").split(".")[0] | ||||
|     test_setup_info = { | ||||
|         "DUT Name": args.ap_name, | ||||
|         "SSID": args.ssid, | ||||
|         "SSID": ','.join(ssid), | ||||
|         "Test Duration": test_duration, | ||||
|     } | ||||
|     test_input_infor = { | ||||
| @@ -795,21 +835,25 @@ def main(): | ||||
|         "Bands": args.bands, | ||||
|         "Upstream": args.upstream_port, | ||||
|         "Stations": args.num_stations, | ||||
|         "SSID": args.ssid, | ||||
|         "Security": args.security, | ||||
|         "SSID": ','.join(ssid), | ||||
|         "Security": ','.join(security), | ||||
|         "Duration": args.duration, | ||||
|         "Contact": "support@candelatech.com" | ||||
|     } | ||||
|     http1 = HttpDownload(lfclient_host=args.mgr, lfclient_port=args.mgr_port, | ||||
|                          upstream=args.upstream_port, num_sta=args.num_stations, | ||||
|                          security=args.security, | ||||
|                          ssid=args.ssid, password=args.passwd, | ||||
|                          security=security, | ||||
|                          ssid=ssid, password=passwd, | ||||
|                          target_per_ten=args.target_per_ten, | ||||
|                          file_size=args.file_size, bands=args.bands, | ||||
|                          twog_radio=args.twog_radio, | ||||
|                          fiveg_radio=args.fiveg_radio) | ||||
|     dataset = http1.download_time_in_sec(result_data=result_data) | ||||
|     lis = [] | ||||
|     if bands == "Both": | ||||
|         for i in range(1, args.num_stations*2 + 1): | ||||
|             lis.append(i) | ||||
|     else: | ||||
|         for i in range(1, args.num_stations + 1): | ||||
|             lis.append(i) | ||||
|  | ||||
|   | ||||
| @@ -345,6 +345,7 @@ else | ||||
|                    --disable_flag ht160_enable \ | ||||
|                    --debug" | ||||
|       #recordinflux.py | ||||
|       "./run_cv_scenario.py --lfmgr $MGR --lanforge_db 'handsets' --cv_test 'WiFi Capacity' --test_profile 'test-20' --cv_scenario ct-us-001" | ||||
|       "./rvr_scenario.py --lfmgr $MGR --lanforge_db 'handsets' --cv_test Dataplane --test_profile http --cv_scenario ct-us-001" | ||||
|       #scenario.py | ||||
|       #./sta_connect_bssid_mac.py | ||||
| @@ -365,7 +366,7 @@ else | ||||
|       # --b_max 0 | ||||
|       # --debug" | ||||
|       #test_client_admission.py | ||||
|       "./test_fileio.py --macvlan_parent $UPSTREAM --num_ports 3 --use_macvlans --first_mvlan_ip 192.168.92.13 --netmask 255.255.255.0 --gateway 192.168.92.1 --test_duration 30s --mgr $MGR" # Better tested on Kelly, where VRF is turned off | ||||
|       "./test_fileio.py --macvlan_parent $UPSTREAM --num_ports 3 --use_macvlans --first_mvlan_ip 10.40.92.13 --netmask 255.255.255.0 --gateway 192.168.92.1 --test_duration 30s --mgr $MGR" # Better tested on Kelly, where VRF is turned off | ||||
|       "./test_generic.py --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED  --security $SECURITY --num_stations $NUM_STA --type lfping --dest $TEST_HTTP_IP --debug --mgr $MGR" | ||||
|       "./test_generic.py --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED  --security $SECURITY --num_stations $NUM_STA --type speedtest --speedtest_min_up 20 --speedtest_min_dl 20 --speedtest_max_ping 150 --security $SECURITY --debug --mgr $MGR" | ||||
|       "./test_generic.py --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED  --security $SECURITY --num_stations $NUM_STA --type iperf3 --debug --mgr $MGR" | ||||
|   | ||||
| @@ -64,10 +64,8 @@ class StaConnect(Realm): | ||||
|         self.cleanup_on_exit = _cleanup_on_exit | ||||
|         self.sta_url_map = None  # defer construction | ||||
|         self.upstream_url = None  # defer construction | ||||
|         self.station_names = [] | ||||
|         self.station_names = _sta_name | ||||
|         self.cx_names = {} | ||||
|         if _sta_name is not None: | ||||
|             self.station_names = [_sta_name] | ||||
|         self.resulting_stations = {} | ||||
|         self.resulting_endpoints = {} | ||||
|  | ||||
| @@ -83,16 +81,16 @@ class StaConnect(Realm): | ||||
|         self.desired_add_sta_flags_mask = ["wpa2_enable", "80211u_enable", "create_admin_down"] | ||||
|  | ||||
|     def get_station_url(self, sta_name_=None): | ||||
|         if sta_name_ is None: | ||||
|         if not sta_name_: | ||||
|             raise ValueError("get_station_url wants a station name") | ||||
|         if self.sta_url_map is None: | ||||
|         if not self.sta_url_map: | ||||
|             self.sta_url_map = {} | ||||
|             for sta_name in self.station_names: | ||||
|                 self.sta_url_map[sta_name] = "port/1/%s/%s" % (self.resource, sta_name) | ||||
|         return self.sta_url_map[sta_name_] | ||||
|  | ||||
|     def get_upstream_url(self): | ||||
|         if self.upstream_url is None: | ||||
|         if not self.upstream_url: | ||||
|             self.upstream_url = "port/1/%s/%s" % (self.upstream_resource, self.upstream_port) | ||||
|         return self.upstream_url | ||||
|  | ||||
| @@ -111,7 +109,7 @@ class StaConnect(Realm): | ||||
|     def num_associated(self, bssid): | ||||
|         counter = 0 | ||||
|         # print("there are %d results" % len(self.station_results)) | ||||
|         if (self.station_results is None) or (len(self.station_results) < 1): | ||||
|         if not self.station_results or (len(self.station_results) < 1): | ||||
|             self.get_failed_result_list() | ||||
|         for eid, record in self.station_results.items(): | ||||
|             # print("-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ") | ||||
| @@ -147,17 +145,16 @@ class StaConnect(Realm): | ||||
|  | ||||
|     @staticmethod | ||||
|     def add_named_flags(desired_list, command_ref): | ||||
|         if desired_list is None: | ||||
|         if not desired_list: | ||||
|             raise ValueError("addNamedFlags wants a list of desired flag names") | ||||
|         if len(desired_list) < 1: | ||||
|             print("addNamedFlags: empty desired list") | ||||
|             return 0 | ||||
|         if (command_ref is None) or (len(command_ref) < 1): | ||||
|             raise ValueError("addNamedFlags: empty desired list") | ||||
|         if not command_ref or (len(command_ref) < 1): | ||||
|             raise ValueError("addNamedFlags wants a maps of flag values") | ||||
|  | ||||
|         result = 0 | ||||
|         for name in desired_list: | ||||
|             if (name is None) or (name == ""): | ||||
|             if not name: | ||||
|                 continue | ||||
|             if name not in command_ref: | ||||
|                 raise ValueError("flag %s not in map" % name) | ||||
| @@ -169,7 +166,7 @@ class StaConnect(Realm): | ||||
|         self.clear_test_results() | ||||
|         self.check_connect() | ||||
|         eth1IP = self.json_get(self.get_upstream_url()) | ||||
|         if eth1IP is None: | ||||
|         if not eth1IP: | ||||
|             self._fail("Unable to query %s, bye" % self.upstream_port, True) | ||||
|             return False | ||||
|         if eth1IP['interface']['ip'] == "0.0.0.0": | ||||
| @@ -177,13 +174,8 @@ class StaConnect(Realm): | ||||
|             return False | ||||
|  | ||||
|         for sta_name in self.station_names: | ||||
|             sta_url = self.get_station_url(sta_name) | ||||
|             response = self.json_get(sta_url) | ||||
|             if response is not None: | ||||
|                 if response["interface"] is not None: | ||||
|                     print("removing old station") | ||||
|                     if self.port_exists(sta_name): | ||||
|                         self.rm_port(sta_name) | ||||
|             if self.port_exists(sta_name, debug=False): | ||||
|                 self.rm_port(sta_name, debug_=False) | ||||
|         self.wait_until_ports_disappear(self.station_names) | ||||
|  | ||||
|         # Create stations and turn dhcp on | ||||
| @@ -246,7 +238,7 @@ class StaConnect(Realm): | ||||
|                 station_info = self.json_get(sta_url + "?fields=port,ip,ap") | ||||
|  | ||||
|                 # LFUtils.debug_printer.pprint(station_info) | ||||
|                 if (station_info is not None) and ("interface" in station_info): | ||||
|                 if station_info and "interface" in station_info: | ||||
|                     if "ip" in station_info["interface"]: | ||||
|                         ip = station_info["interface"]["ip"] | ||||
|                     if "ap" in station_info["interface"]: | ||||
| @@ -491,8 +483,6 @@ class StaConnect(Realm): | ||||
|  | ||||
|  | ||||
| def main(): | ||||
|     lfjson_host = "localhost" | ||||
|     lfjson_port = 8080 | ||||
|     parser = Realm.create_basic_argparse( | ||||
|         prog="sta_connect.py", | ||||
|         formatter_class=argparse.RawTextHelpFormatter, | ||||
| @@ -500,39 +490,22 @@ def main(): | ||||
| Example: | ||||
| ./sta_connect.py --mgr 192.168.100.209 --dut_ssid OpenWrt-2 --dut_bssid 24:F5:A2:08:21:6C | ||||
| """) | ||||
|     parser.add_argument("-o", "--port", type=int, help="IP Port the LANforge GUI is listening on (8080 is default)") | ||||
|     parser.add_argument("--resource", type=str, help="LANforge Station resource ID to use, default is 1") | ||||
|     parser.add_argument("--upstream_resource", type=str, help="LANforge Ethernet port resource ID to use, default is 1") | ||||
|     parser.add_argument("-o", "--port", type=int, help="IP Port the LANforge GUI is listening on (8080 is default)", default=8080) | ||||
|     parser.add_argument("--resource", type=str, help="LANforge Station resource ID to use, default is 1", default=1) | ||||
|     parser.add_argument("--upstream_resource", type=str, help="LANforge Ethernet port resource ID to use, default is 1", default=1) | ||||
|     parser.add_argument("--sta_mode", type=str, | ||||
|                         help="LANforge station-mode setting (see add_sta LANforge CLI documentation, default is 0 (auto))") | ||||
|     parser.add_argument("--dut_bssid", type=str, help="DUT BSSID to which we expect to connect.") | ||||
|                         help="LANforge station-mode setting (see add_sta LANforge CLI documentation, default is 0 (auto))", default=0) | ||||
|     parser.add_argument("--dut_bssid", type=str, help="DUT BSSID to which we expect to connect.", default="MyAP") | ||||
|     parser.add_argument('--test_duration', help='--test_duration sets the duration of the test', default="2m") | ||||
|  | ||||
|     args = parser.parse_args() | ||||
|     monitor_interval = Realm.parse_time(args.test_duration).total_seconds() | ||||
|     if args.mgr is not None: | ||||
|         lfjson_host = args.mgr | ||||
|     if args.port is not None: | ||||
|         lfjson_port = args.port | ||||
|  | ||||
|     staConnect = StaConnect(lfjson_host, lfjson_port, _upstream_port=args.upstream_port, _runtime_sec=monitor_interval) | ||||
|     staConnect.station_names = ["sta0000"] | ||||
|     if args.sta_mode is not None: | ||||
|         staConnect.sta_mode = args.sta_mode | ||||
|     if args.upstream_resource is not None: | ||||
|         staConnect.upstream_resource = args.upstream_resource | ||||
|     if args.radio is not None: | ||||
|         staConnect.radio = args.radio | ||||
|     if args.resource is not None: | ||||
|         staConnect.resource = args.resource | ||||
|     if args.passwd is not None: | ||||
|         staConnect.dut_passwd = args.passwd | ||||
|     if args.dut_bssid is not None: | ||||
|         staConnect.dut_bssid = args.dut_bssid | ||||
|     if args.ssid is not None: | ||||
|         staConnect.dut_ssid = args.ssid | ||||
|     if args.security is not None: | ||||
|         staConnect.dut_security = args.security | ||||
|     staConnect = StaConnect(args.mgr, args.port, _upstream_port=args.upstream_port, _runtime_sec=monitor_interval, | ||||
|                             _sta_mode=args.sta_mode, _upstream_resource=args.upstream_resource, | ||||
|                             _radio=args.radio, _resource=args.resource, _passwd=args.passwd, _dut_passwd=args.passwd, | ||||
|                             _dut_bssid=args.dut_bssid, _dut_ssid=args.ssid, _dut_security=args.security, | ||||
|                             _sta_name=["sta0000"]) | ||||
|  | ||||
|     staConnect.run() | ||||
|  | ||||
|   | ||||
| @@ -66,7 +66,7 @@ class StaConnect2(Realm): | ||||
|         self.sta_url_map = None  # defer construction | ||||
|         self.upstream_url = None  # defer construction | ||||
|         self.station_names = [] | ||||
|         if _sta_name is not None: | ||||
|         if _sta_name: | ||||
|             self.station_names = [_sta_name] | ||||
|         self.sta_prefix = _sta_prefix | ||||
|         self.bringup_time_sec = _bringup_time_sec | ||||
| @@ -162,7 +162,7 @@ class StaConnect2(Realm): | ||||
|             for sta_name in self.station_names: | ||||
|                 sta_url = self.get_station_url(sta_name) | ||||
|                 response = self.json_get(sta_url) | ||||
|                 if (response is not None) and (response["interface"] is not None): | ||||
|                 if (response) and (response["interface"]): | ||||
|                     for station in self.station_names: | ||||
|                         LFUtils.removePort(self.resource, station, self.lfclient_url) | ||||
|             LFUtils.wait_until_ports_disappear(self.lfclient_url, self.station_names) | ||||
| @@ -257,7 +257,7 @@ class StaConnect2(Realm): | ||||
|                 station_info = self.json_get(sta_url + "?fields=port,ip,ap") | ||||
|  | ||||
|                 # LFUtils.debug_printer.pprint(station_info) | ||||
|                 if (station_info is not None) and ("interface" in station_info): | ||||
|                 if (station_info) and ("interface" in station_info): | ||||
|                     if "ip" in station_info["interface"]: | ||||
|                         ip = station_info["interface"]["ip"] | ||||
|                     if "ap" in station_info["interface"]: | ||||
| @@ -415,16 +415,16 @@ def main(): | ||||
| Example: | ||||
| ./sta_connect2.py --dest 192.168.100.209 --dut_ssid OpenWrt-2 --dut_bssid 24:F5:A2:08:21:6C | ||||
| """) | ||||
|     parser.add_argument("-d", "--dest", type=str, help="address of the LANforge GUI machine (localhost is default)") | ||||
|     parser.add_argument("-o", "--port", type=int, help="IP Port the LANforge GUI is listening on (8080 is default)") | ||||
|     parser.add_argument("-d", "--dest", type=str, help="address of the LANforge GUI machine (localhost is default)", default='localhost') | ||||
|     parser.add_argument("-o", "--port", type=int, help="IP Port the LANforge GUI is listening on (8080 is default)", default=8080) | ||||
|     parser.add_argument("-u", "--user", type=str, help="TBD: credential login/username") | ||||
|     parser.add_argument("-p", "--passwd", type=str, help="TBD: credential password") | ||||
|     parser.add_argument("--resource", type=str, help="LANforge Station resource ID to use, default is 1") | ||||
|     parser.add_argument("--upstream_resource", type=str, help="LANforge Ethernet port resource ID to use, default is 1") | ||||
|     parser.add_argument("--upstream_port", type=str, help="LANforge Ethernet port name, default is eth2") | ||||
|     parser.add_argument("--radio", type=str, help="LANforge radio to use, default is wiphy0") | ||||
|     parser.add_argument("--resource", type=str, help="LANforge Station resource ID to use, default is 1", default=1) | ||||
|     parser.add_argument("--upstream_resource", type=str, help="LANforge Ethernet port resource ID to use, default is 1", default=None) | ||||
|     parser.add_argument("--upstream_port", type=str, help="LANforge Ethernet port name, default is eth2", default='1.1.eth2') | ||||
|     parser.add_argument("--radio", type=str, help="LANforge radio to use, default is wiphy0", default='wiphy0') | ||||
|     parser.add_argument("--sta_mode", type=str, | ||||
|                         help="LANforge station-mode setting (see add_sta LANforge CLI documentation, default is 0 (auto))") | ||||
|                         help="LANforge station-mode setting (see add_sta LANforge CLI documentation, default is 0 (auto))", default=0) | ||||
|     parser.add_argument("--dut_ssid", type=str, help="DUT SSID") | ||||
|     parser.add_argument("--dut_security", type=str, help="DUT security: openLF, wpa, wpa2, wpa3") | ||||
|     parser.add_argument("--dut_passwd", type=str, help="DUT PSK password.  Do not set for OPEN auth") | ||||
| @@ -442,12 +442,18 @@ Example: | ||||
|     parser.add_argument('--monitor_interval', help='How frequently you want to append to your database', default='5s') | ||||
|  | ||||
|     args = parser.parse_args() | ||||
|     if args.dest is not None: | ||||
|         lfjson_host = args.dest | ||||
|     if args.port is not None: | ||||
|         lfjson_port = args.port | ||||
|     upstream_port = LFUtils.name_to_eid(args.upstream_port) | ||||
|     if args.upstream_resource: | ||||
|         upstream_resource = args.upstream_resource | ||||
|     else: | ||||
|         upstream_resource = upstream_port[1] | ||||
|  | ||||
|     staConnect = StaConnect2(lfjson_host, lfjson_port, | ||||
|     staConnect = StaConnect2(args.dest, args.port, | ||||
|                              _resource=args.resource, | ||||
|                              _upstream_resource=upstream_resource, | ||||
|                              _upstream_port=upstream_port[2], | ||||
|                              _radio=args.radio, | ||||
|                              _sta_mode=args.sta_mode, | ||||
|                              debug_=True, | ||||
|                              _influx_db=args.influx_db, | ||||
|                              _influx_passwd=args.influx_passwd, | ||||
| @@ -456,29 +462,19 @@ Example: | ||||
|                              _exit_on_fail=True, | ||||
|                              _exit_on_error=False) | ||||
|  | ||||
|     if args.user is not None: | ||||
|     if args.user: | ||||
|         staConnect.user = args.user | ||||
|     if args.passwd is not None: | ||||
|     if args.passwd: | ||||
|         staConnect.passwd = args.passwd | ||||
|     if args.sta_mode is not None: | ||||
|         staConnect.sta_mode = args.sta_mode | ||||
|     if args.upstream_resource is not None: | ||||
|         staConnect.upstream_resource = args.upstream_resource | ||||
|     if args.upstream_port is not None: | ||||
|         staConnect.upstream_port = args.upstream_port | ||||
|     if args.radio is not None: | ||||
|         staConnect.radio = args.radio | ||||
|     if args.resource is not None: | ||||
|         staConnect.resource = args.resource | ||||
|     if args.dut_ssid is not None: | ||||
|     if args.dut_ssid: | ||||
|         staConnect.dut_ssid = args.dut_ssid | ||||
|     if args.dut_passwd is not None: | ||||
|     if args.dut_passwd: | ||||
|         staConnect.dut_passwd = args.dut_passwd | ||||
|     if args.dut_bssid is not None: | ||||
|     if args.dut_bssid: | ||||
|         staConnect.dut_bssid = args.dut_bssid | ||||
|     if args.dut_security is not None: | ||||
|     if args.dut_security: | ||||
|         staConnect.dut_security = args.dut_security | ||||
|     if (args.prefix is not None) or (args.prefix != "sta"): | ||||
|     if args.prefix or (args.prefix != "sta"): | ||||
|         staConnect.sta_prefix = args.prefix | ||||
|     staConnect.station_names = ["%s0000" % args.prefix] | ||||
|     staConnect.bringup_time_sec = args.bringup_time | ||||
|   | ||||
| @@ -126,8 +126,7 @@ class StaScan(Realm): | ||||
|                         print("%s\t%s\t%s" % (info['bss'], info['signal'], info['ssid'])) | ||||
|  | ||||
|     def pre_cleanup(self): | ||||
|         for sta in self.sta_list: | ||||
|             self.rm_port(sta, check_exists=True) | ||||
|         self.station_profile.cleanup(self.sta_list) | ||||
|  | ||||
|     def cleanup(self): | ||||
|         self.station_profile.cleanup() | ||||
|   | ||||
| @@ -39,8 +39,6 @@ if sys.version_info[0] != 3: | ||||
|  | ||||
| sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../"))) | ||||
|  | ||||
| lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base") | ||||
| LFCliBase = lfcli_base.LFCliBase | ||||
| LFUtils = importlib.import_module("py-json.LANforge.LFUtils") | ||||
| add_file_endp = importlib.import_module("py-json.LANforge.add_file_endp") | ||||
| fe_fstype = add_file_endp.fe_fstype | ||||
| @@ -48,7 +46,7 @@ realm = importlib.import_module("py-json.realm") | ||||
| Realm = realm.Realm | ||||
|  | ||||
|  | ||||
| class FileIOTest(LFCliBase): | ||||
| class FileIOTest(Realm): | ||||
|     def __init__(self, host, port, ssid, security, password, | ||||
|                  number_template="00000", | ||||
|                  radio="wiphy0", | ||||
| @@ -70,6 +68,8 @@ class FileIOTest(LFCliBase): | ||||
|                  first_mvlan_ip=None, | ||||
|                  netmask=None, | ||||
|                  gateway=None, | ||||
|                  shelf=1, | ||||
|                  resource=1, | ||||
|                  dhcp=True, | ||||
|                  use_macvlans=False, | ||||
|                  use_test_groups=False, | ||||
| @@ -83,7 +83,7 @@ class FileIOTest(LFCliBase): | ||||
|                  _debug_on=False, | ||||
|                  _exit_on_error=False, | ||||
|                  _exit_on_fail=False): | ||||
|         super().__init__(host, port, _debug=_debug_on, _exit_on_fail=_exit_on_fail) | ||||
|         super().__init__(host, port, debug_=_debug_on, _exit_on_fail=_exit_on_fail) | ||||
|         if port_list is None: | ||||
|             port_list = [] | ||||
|         if update_group_args is None: | ||||
| @@ -105,7 +105,7 @@ class FileIOTest(LFCliBase): | ||||
|         self.netmask = netmask | ||||
|         self.gateway = gateway | ||||
|         if self.use_macvlans: | ||||
|             if macvlan_parent is not None: | ||||
|             if macvlan_parent: | ||||
|                 self.macvlan_parent = macvlan_parent | ||||
|                 self.port_list = port_list | ||||
|         else: | ||||
| @@ -114,38 +114,28 @@ class FileIOTest(LFCliBase): | ||||
|         self.use_test_groups = use_test_groups | ||||
|         if self.use_test_groups: | ||||
|             if self.mode == "write": | ||||
|                 if write_only_test_group is not None: | ||||
|                 if write_only_test_group: | ||||
|                     self.write_only_test_group = write_only_test_group | ||||
|                 else: | ||||
|                     raise ValueError("--write_only_test_group must be used to set test group name") | ||||
|             if self.mode == "read": | ||||
|                 if read_only_test_group is not None: | ||||
|                 if read_only_test_group: | ||||
|                     self.read_only_test_group = read_only_test_group | ||||
|                 else: | ||||
|                     raise ValueError("--read_only_test_group must be used to set test group name") | ||||
|             if self.mode == "both": | ||||
|                 if write_only_test_group is not None and read_only_test_group is not None: | ||||
|                 if write_only_test_group and read_only_test_group: | ||||
|                     self.write_only_test_group = write_only_test_group | ||||
|                     self.read_only_test_group = read_only_test_group | ||||
|                 else: | ||||
|                     raise ValueError("--write_only_test_group and --read_only_test_group " | ||||
|                                      "must be used to set test group names") | ||||
|  | ||||
|         # self.min_rw_size = self.parse_size(min_rw_size) | ||||
|         # self.max_rw_size = self.parse_size(max_rw_size) | ||||
|         # self.min_file_size = self.parse_size(min_file_size) | ||||
|         # self.min_file_size = self.parse_size(min_file_size) | ||||
|         # self.min_read_rate_bps = self.parse_size_bps(min_read_rate_bps) | ||||
|         # self.max_read_rate_bps = self.sisize_bps(max_read_rate_bps) | ||||
|         # self.min_write_rate_bps = self.parse_size_bps(min_write_rate_bps) | ||||
|         # self.max_write_rate_bps = self.parse_size_bps(max_write_rate_bps) | ||||
|  | ||||
|         self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port) | ||||
|         self.wo_profile = self.local_realm.new_fio_endp_profile() | ||||
|         self.mvlan_profile = self.local_realm.new_mvlan_profile() | ||||
|         self.wo_profile = self.new_fio_endp_profile() | ||||
|         self.mvlan_profile = self.new_mvlan_profile() | ||||
|  | ||||
|         if not self.use_macvlans and len(self.port_list) > 0: | ||||
|             self.station_profile = self.local_realm.new_station_profile() | ||||
|             self.station_profile = self.new_station_profile() | ||||
|             self.station_profile.lfclient_url = self.lfclient_url | ||||
|             self.station_profile.ssid = self.ssid | ||||
|             self.station_profile.ssid_pass = self.password | ||||
| @@ -176,19 +166,21 @@ class FileIOTest(LFCliBase): | ||||
|             self.mvlan_profile.netmask = netmask | ||||
|             self.mvlan_profile.first_ip_addr = first_mvlan_ip | ||||
|             self.mvlan_profile.gateway = gateway | ||||
|             self.mvlan_profile.shelf = shelf | ||||
|             self.mvlan_profile.resource = resource | ||||
|  | ||||
|         self.created_ports = [] | ||||
|         if self.use_test_groups: | ||||
|             if self.mode is not None: | ||||
|             if self.mode: | ||||
|                 if self.mode == "write": | ||||
|                     self.wo_tg_profile = self.local_realm.new_test_group_profile() | ||||
|                     self.wo_tg_profile = self.new_test_group_profile() | ||||
|                     self.wo_tg_profile.group_name = self.write_only_test_group | ||||
|                 elif self.mode == "read": | ||||
|                     self.ro_tg_profile = self.local_realm.new_test_group_profile() | ||||
|                     self.ro_tg_profile = self.new_test_group_profile() | ||||
|                     self.ro_tg_profile.group_name = self.read_only_test_group | ||||
|                 elif self.mode == "both": | ||||
|                     self.wo_tg_profile = self.local_realm.new_test_group_profile() | ||||
|                     self.ro_tg_profile = self.local_realm.new_test_group_profile() | ||||
|                     self.wo_tg_profile = self.new_test_group_profile() | ||||
|                     self.ro_tg_profile = self.new_test_group_profile() | ||||
|                     self.wo_tg_profile.group_name = self.write_only_test_group | ||||
|                     self.ro_tg_profile.group_name = self.read_only_test_group | ||||
|                 else: | ||||
| @@ -196,8 +188,8 @@ class FileIOTest(LFCliBase): | ||||
|             else: | ||||
|                 raise ValueError("Mode ( read, write, or both ) must be specified") | ||||
|  | ||||
|         if update_group_args is not None and update_group_args['name'] is not None: | ||||
|             temp_tg = self.local_realm.new_test_group_profile() | ||||
|         if update_group_args and update_group_args['name']: | ||||
|             temp_tg = self.new_test_group_profile() | ||||
|             temp_cxs = update_group_args['cxs'].split(',') | ||||
|             if update_group_args['action'] == "add": | ||||
|                 temp_tg.group_name = update_group_args['name'] | ||||
| @@ -243,23 +235,13 @@ class FileIOTest(LFCliBase): | ||||
|     def __compare_vals(self, val_list): | ||||
|         passes = 0 | ||||
|         expected_passes = 0 | ||||
|         # print(val_list) | ||||
|         for item in val_list: | ||||
|             expected_passes += 1 | ||||
|             # print(item) | ||||
|             if item[0] == 'r': | ||||
|                 # print("TEST", item, | ||||
|                 #       val_list[item]['read-bps'], | ||||
|                 #       self.ro_profile.min_read_rate_bps, | ||||
|                 #       val_list[item]['read-bps'] > self.ro_profile.min_read_rate_bps) | ||||
|  | ||||
|                 if val_list[item]['read-bps'] > self.wo_profile.min_read_rate_bps: | ||||
|                     passes += 1 | ||||
|             else: | ||||
|                 # print("TEST", item, | ||||
|                 #       val_list[item]['write-bps'], | ||||
|                 #       self.wo_profile.min_write_rate_bps, | ||||
|                 #       val_list[item]['write-bps'] > self.wo_profile.min_write_rate_bps) | ||||
|  | ||||
|                 if val_list[item]['write-bps'] > self.wo_profile.min_write_rate_bps: | ||||
|                     passes += 1 | ||||
| @@ -282,24 +264,18 @@ class FileIOTest(LFCliBase): | ||||
|             cx_list = self.json_get("fileio/%s,%s?fields=write-bps,read-bps" % ( | ||||
|                 ','.join(self.wo_profile.created_cx.keys()), | ||||
|                 ','.join(self.ro_profile.created_cx.keys())), debug_=self.debug) | ||||
|         # print(cx_list) | ||||
|         # print("==============\n", cx_list, "\n==============") | ||||
|         cx_map = {} | ||||
|         # pprint.pprint(cx_list) | ||||
|         if cx_list is not None: | ||||
|         if cx_list: | ||||
|             cx_list = cx_list['endpoint'] | ||||
|             for i in cx_list: | ||||
|                 for item, value in i.items(): | ||||
|                     # print(item, value) | ||||
|                     cx_map[self.local_realm.name_to_eid(item)[2]] = {"read-bps": value['read-bps'], | ||||
|                     cx_map[self.name_to_eid(item)[2]] = {"read-bps": value['read-bps'], | ||||
|                                                          "write-bps": value['write-bps']} | ||||
|         # print(cx_map) | ||||
|         return cx_map | ||||
|  | ||||
|     def build(self): | ||||
|         # Build stations | ||||
|         if self.use_macvlans: | ||||
|             print("Creating MACVLANs") | ||||
|             self.mvlan_profile.create(admin_down=False, sleep_time=.5, debug=self.debug) | ||||
|             self._pass("PASS: MACVLAN build finished") | ||||
|             self.created_ports += self.mvlan_profile.created_macvlans | ||||
| @@ -315,13 +291,12 @@ class FileIOTest(LFCliBase): | ||||
|             self.created_ports += self.station_profile.station_names | ||||
|  | ||||
|         if len(self.ip_list) > 0: | ||||
|             # print("++++++++++++++++\n", self.ip_list, "++++++++++++++++\n") | ||||
|             for num_port in range(len(self.port_list)): | ||||
|                 if self.ip_list[num_port] != 0: | ||||
|                     if self.gateway is not None and self.netmask is not None: | ||||
|                         shelf = self.local_realm.name_to_eid(self.port_list[num_port])[0] | ||||
|                         resource = self.local_realm.name_to_eid(self.port_list[num_port])[1] | ||||
|                         port = self.local_realm.name_to_eid(self.port_list[num_port])[2] | ||||
|                     if self.gateway and self.netmask: | ||||
|                         shelf = self.name_to_eid(self.port_list[num_port])[0] | ||||
|                         resource = self.name_to_eid(self.port_list[num_port])[1] | ||||
|                         port = self.name_to_eid(self.port_list[num_port])[2] | ||||
|                         req_url = "/cli-json/set_port" | ||||
|                         data = { | ||||
|                             "shelf": shelf, | ||||
| @@ -331,7 +306,7 @@ class FileIOTest(LFCliBase): | ||||
|                             "netmask": self.netmask, | ||||
|                             "gateway": self.gateway | ||||
|                         } | ||||
|                         self.local_realm.json_post(req_url, data) | ||||
|                         self.json_post(req_url, data) | ||||
|                         self.created_ports.append("%s.%s.%s" % (shelf, resource, port)) | ||||
|                     else: | ||||
|                         raise ValueError("Netmask and gateway must be specified") | ||||
| @@ -340,7 +315,7 @@ class FileIOTest(LFCliBase): | ||||
|         # if use test groups and test group exists and no cxs, create cxs, assign to test group | ||||
|         # if use test groups and test group exist and cxs exist, do nothing | ||||
|         # if not use test groups, create cxs | ||||
|         if self.mode is not None: | ||||
|         if self.mode: | ||||
|             if self.use_test_groups: | ||||
|                 if self.mode == "write": | ||||
|                     if self.wo_tg_exists: | ||||
| @@ -462,18 +437,17 @@ class FileIOTest(LFCliBase): | ||||
|  | ||||
|     def start(self, print_pass=False, print_fail=False): | ||||
|         temp_ports = self.created_ports.copy() | ||||
|         # temp_stas.append(self.local_realm.name_to_eid(self.upstream_port)[2]) | ||||
|         if not self.use_macvlans: | ||||
|             self.station_profile.admin_up() | ||||
|         else: | ||||
|             self.mvlan_profile.admin_up() | ||||
|         if self.local_realm.wait_for_ip(temp_ports, debug=self.debug): | ||||
|         if self.wait_for_ip(temp_ports, debug=self.debug): | ||||
|             self._pass("All ports got IPs", print_pass) | ||||
|         else: | ||||
|             self._fail("Ports failed to get IPs", print_fail) | ||||
|         cur_time = datetime.datetime.now() | ||||
|         # print("Got Values") | ||||
|         end_time = self.local_realm.parse_time(self.test_duration) + cur_time | ||||
|         end_time = self.parse_time(self.test_duration) + cur_time | ||||
|         if self.use_test_groups: | ||||
|             if self.mode == "write": | ||||
|                 self.wo_tg_profile.start_group() | ||||
| @@ -590,7 +564,7 @@ class FileIOTest(LFCliBase): | ||||
|  | ||||
|  | ||||
| def main(): | ||||
|     parser = LFCliBase.create_bare_argparse( | ||||
|     parser = Realm.create_bare_argparse( | ||||
|         prog='test_fileio.py', | ||||
|         # formatter_class=argparse.RawDescriptionHelpFormatter, | ||||
|         formatter_class=argparse.RawTextHelpFormatter, | ||||
| @@ -662,45 +636,51 @@ Generic command layout: | ||||
|     tg_group = parser.add_mutually_exclusive_group() | ||||
|     tg_group.add_argument('--add_to_group', help='name of test group to add cxs to', default=None) | ||||
|     tg_group.add_argument('--del_from_group', help='name of test group to delete cxs from', default=None) | ||||
|     parser.add_argument('--cxs', help='list of cxs to add/remove depending on use of --add_to_group or --del_from_group', default=None) | ||||
|     parser.add_argument('--cxs', | ||||
|                         help='list of cxs to add/remove depending on use of --add_to_group or --del_from_group', | ||||
|                         default=None) | ||||
|     args = parser.parse_args() | ||||
|  | ||||
|     parent = LFUtils.name_to_eid(args.macvlan_parent) | ||||
|     shelf = parent[0] | ||||
|     resource = parent[1] | ||||
|     macvlan_parent = parent[2] | ||||
|     update_group_args = { | ||||
|         "name": None, | ||||
|         "action": None, | ||||
|         "cxs": None | ||||
|     } | ||||
|     if args.add_to_group is not None and args.cxs is not None: | ||||
|     if args.add_to_group and args.cxs: | ||||
|         update_group_args['name'] = args.add_to_group | ||||
|         update_group_args['action'] = "add" | ||||
|         update_group_args['cxs'] = args.cxs | ||||
|     elif args.del_from_group is not None and args.cxs is not None: | ||||
|     elif args.del_from_group and args.cxs: | ||||
|         update_group_args['name'] = args.del_from_group | ||||
|         update_group_args['action'] = "del" | ||||
|         update_group_args['cxs'] = args.cxs | ||||
|  | ||||
|     port_list = [] | ||||
|     ip_list = [] | ||||
|     if args.first_port is not None and args.use_ports is not None: | ||||
|     if args.first_port and args.use_ports: | ||||
|         if args.first_port.startswith("sta"): | ||||
|             if (args.num_ports is not None) and (int(args.num_ports) > 0): | ||||
|             if args.num_ports and (int(args.num_ports) > 0): | ||||
|                 start_num = int(args.first_port[3:]) | ||||
|                 num_ports = int(args.num_ports) | ||||
|                 port_list = LFUtils.port_name_series(prefix="sta", start_id=start_num, end_id=start_num + num_ports - 1, | ||||
|                                                      padding_number=10000, | ||||
|                                                      radio=args.radio) | ||||
|         else: | ||||
|             if (args.num_ports is not None) and args.macvlan_parent is not None and (int(args.num_ports) > 0) \ | ||||
|                     and args.macvlan_parent in args.first_port: | ||||
|             if args.num_ports and macvlan_parent and (int(args.num_ports) > 0) \ | ||||
|                     and macvlan_parent in args.first_port: | ||||
|                 start_num = int(args.first_port[args.first_port.index('#') + 1:]) | ||||
|                 num_ports = int(args.num_ports) | ||||
|                 port_list = LFUtils.port_name_series(prefix=args.macvlan_parent + "#", start_id=start_num, | ||||
|                 port_list = LFUtils.port_name_series(prefix=macvlan_parent + "#", start_id=start_num, | ||||
|                                                      end_id=start_num + num_ports - 1, padding_number=100000, | ||||
|                                                      radio=args.radio) | ||||
|             else: | ||||
|                 raise ValueError("Invalid values for num_ports [%s], macvlan_parent [%s], and/or first_port [%s].\n" | ||||
|                                  "first_port must contain parent port and num_ports must be greater than 0" | ||||
|                                  % (args.num_ports, args.macvlan_parent, args.first_port)) | ||||
|                                  % (args.num_ports, macvlan_parent, args.first_port)) | ||||
|     else: | ||||
|         if args.use_ports is None: | ||||
|             num_ports = int(args.num_ports) | ||||
| @@ -709,7 +689,7 @@ Generic command layout: | ||||
|                                                      padding_number=10000, | ||||
|                                                      radio=args.radio) | ||||
|             else: | ||||
|                 port_list = LFUtils.port_name_series(prefix=args.macvlan_parent + "#", start_id=0, | ||||
|                 port_list = LFUtils.port_name_series(prefix=macvlan_parent + "#", start_id=0, | ||||
|                                                      end_id=num_ports - 1, padding_number=100000, | ||||
|                                                      radio=args.radio) | ||||
|         else: | ||||
| @@ -724,7 +704,7 @@ Generic command layout: | ||||
|             if len(port_list) != len(ip_list): | ||||
|                 raise ValueError(temp_list, " ports must have matching ip addresses!") | ||||
|  | ||||
|     if args.first_mvlan_ip is not None: | ||||
|     if args.first_mvlan_ip: | ||||
|         if args.first_mvlan_ip.lower() == "dhcp": | ||||
|             dhcp = True | ||||
|         else: | ||||
| @@ -749,11 +729,13 @@ Generic command layout: | ||||
|                          test_duration=args.test_duration, | ||||
|                          upstream_port=args.upstream_port, | ||||
|                          _debug_on=args.debug, | ||||
|                          macvlan_parent=args.macvlan_parent, | ||||
|                          macvlan_parent=macvlan_parent, | ||||
|                          use_macvlans=args.use_macvlans, | ||||
|                          first_mvlan_ip=args.first_mvlan_ip, | ||||
|                          netmask=args.netmask, | ||||
|                          gateway=args.gateway, | ||||
|                          shelf=shelf, | ||||
|                          resource=resource, | ||||
|                          dhcp=dhcp, | ||||
|                          fs_type=args.fs_type, | ||||
|                          min_rw_size=args.min_rw_size, | ||||
|   | ||||
| @@ -271,6 +271,8 @@ class TTLSTest(Realm): | ||||
|         self.collect_endp_stats(self.l3_cx_obj_udp.cx_profile.created_cx, traffic_type="UDP") | ||||
|  | ||||
|     def cleanup(self, sta_list): | ||||
|         self.l3_cx_obj_udp.cx_profile.cleanup_prefix() | ||||
|         self.l3_cx_obj_tcp.cx_profile.cleanup_prefix() | ||||
|         self.station_profile.cleanup(sta_list) | ||||
|         if self.vap: | ||||
|             self.vap_profile.cleanup(1) | ||||
| @@ -278,9 +280,9 @@ class TTLSTest(Realm): | ||||
|                                            debug=self.debug) | ||||
|  | ||||
|     def pre_cleanup(self): | ||||
|         self.cx_profile.cleanup_prefix() | ||||
|         self.l3_cx_obj_udp.cx_profile.cleanup_prefix() | ||||
|         # do not clean up station if existed prior to test | ||||
|         if not self.use_existing_sta: | ||||
|         if not self.l3_cx_obj_udp.use_existing_sta: | ||||
|             for sta in self.sta_list: | ||||
|                 self.rm_port(sta, check_exists=True, debug_=False) | ||||
|  | ||||
|   | ||||
| @@ -9,210 +9,11 @@ | ||||
|             "to identify replaced strings in the lf_check.py code.", | ||||
|             "When doing a create_chamberview.py --create_scenario <name> ", | ||||
|             "has no correlation to the --instance_name , instance name is used ", | ||||
|             "as a unique identifier for tha chamber-view test run" | ||||
|             "as a unique identifier for tha chamber-view test run", | ||||
|             "Simpler runs after the suite_scripts" | ||||
|         ]   | ||||
|     }, | ||||
|     "test_suites":{ | ||||
|         "suite_smoke":{ | ||||
|             "clean_up_cxs_endp_sta":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|                 ]}, | ||||
|             "test_ip_variable_time0-ipv4":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "timeout":"360", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP ", | ||||
|                     " use_ssid_idx=1  --radio wiphy4 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED", | ||||
|                     " --test_duration 60s --output_format csv ", | ||||
|                     " --traffic_type lf_tcp --a_min 600000000 --b_min 600000000  --upstream_port eth2", | ||||
|                     " --mode '5' --layer3_cols 'name','tx rate','rx rate' ", | ||||
|                     " --port_mgr_cols 'alias','channel','activity','mode'", | ||||
|                     " --num_stations 1"] | ||||
|                 }, | ||||
|             "test_ip_variable_time1-ipv4":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "timeout":"360", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP", | ||||
|                     " use_ssid_idx=1  --radio wiphy1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED", | ||||
|                     " --test_duration 60s --output_format csv ", | ||||
|                     " --traffic_type lf_tcp --a_min 600000000 --b_min 600000000  --upstream_port eth2", | ||||
|                     " --mode '5' --layer3_cols 'name','tx rate','rx rate' ", | ||||
|                     " --port_mgr_cols 'alias','channel','activity','mode'" | ||||
|                 ]}, | ||||
|             "lf_qa":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "timeout":"600", | ||||
|                 "load_db":"skip", | ||||
|                 "command":"./tools/lf_qa.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                 ] | ||||
|             } | ||||
|         }, | ||||
|         "suite_verify":{ | ||||
|             "clean_up_cxs_endp_sta":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|                 ]}, | ||||
|             "test_ip_variable_time0-ipv4":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "timeout":"360", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP ", | ||||
|                     " use_ssid_idx=1  --radio wiphy4 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED", | ||||
|                     " --test_duration 60s --output_format csv ", | ||||
|                     " --traffic_type lf_tcp --a_min 600000000 --b_min 600000000  --upstream_port eth2", | ||||
|                     " --mode '5' --layer3_cols 'name','tx rate','rx rate' ", | ||||
|                     " --port_mgr_cols 'alias','channel','activity','mode'", | ||||
|                     " --num_stations 1"] | ||||
|                 }, | ||||
|             "test_ip_variable_time1-ipv4":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "timeout":"360", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP", | ||||
|                     " use_ssid_idx=1  --radio wiphy1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED", | ||||
|                     " --test_duration 60s --output_format csv ", | ||||
|                     " --traffic_type lf_tcp --a_min 600000000 --b_min 600000000  --upstream_port eth2", | ||||
|                     " --mode '5' --layer3_cols 'name','tx rate','rx rate' ", | ||||
|                     " --port_mgr_cols 'alias','channel','activity','mode'" | ||||
|                 ]}, | ||||
|             "lf_qa":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "timeout":"600", | ||||
|                 "load_db":"skip", | ||||
|                 "command":"./tools/lf_qa.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                 ] | ||||
|             } | ||||
|         }, | ||||
|         "suite_l3":{ | ||||
|             "clean_up_cxs_endp_sta_flags_5q_all":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|             ]}, | ||||
|             "test_l3_longevity_flags_5g_all":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "command":"test_l3_longevity.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 30s --polling_interval 5s --upstream_port UPSTREAM_PORT ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy1,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy2,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy3,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy4,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy5,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy6,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy7,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000", | ||||
|                     " --test_rig TEST_RIG --test_tag 'l3_longevity'", | ||||
|                     " --dut_model_num  USE_DUT_NAME --dut_sw_version DUT_SW --dut_hw_version DUT_HW --dut_serial_num DUT_SN" | ||||
|                 ] | ||||
|             }, | ||||
|             "clean_up_cxs_endp_sta_flags_2q_all":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|             ]}, | ||||
|             "test_l3_longevity_flags_2g_all":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "command":"test_l3_longevity.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 30s --polling_interval 5s --upstream_port UPSTREAM_PORT ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy1,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy2,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy3,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy4,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy5,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy6,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy7,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000", | ||||
|                     " --test_rig TEST_RIG --test_tag 'l3_longevity'", | ||||
|                     " --dut_model_num  USE_DUT_NAME --dut_sw_version DUT_SW --dut_hw_version DUT_HW --dut_serial_num DUT_SN" | ||||
|                 ] | ||||
|             }, | ||||
|             "lf_qa":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "timeout":"600", | ||||
|                 "load_db":"skip", | ||||
|                 "command":"./tools/lf_qa.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                 ] | ||||
|             } | ||||
|         },             | ||||
|         "suite_test":{ | ||||
|             "lf_cleanup":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "load_db":"NONE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":["--mgr LF_MGR_IP --cxs --sta" | ||||
|                 ] | ||||
|             }, | ||||
|             "lf_report_test":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "timeout":"60", | ||||
|                 "command":"lf_report_test.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[" --mgr LF_MGR_IP " | ||||
|                 ] | ||||
|             }, | ||||
|             "lf_graph":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "timeout":"60", | ||||
|                 "command":"lf_graph.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[" --mgr LF_MGR_IP " | ||||
|                 ] | ||||
|             }, | ||||
|             "test_ip_variable_time0-ipv4":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "args":"", | ||||
|                 "args_list":["  use_ssid_idx=1 --mgr LF_MGR_IP --radio wiphy1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED --test_duration 15s --output_format excel --layer3_cols name,tx_bytes,rx_bytes,dropped --traffic_type lf_udp --debug"] | ||||
|             }, | ||||
|             "lf_qa":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "timeout":"600", | ||||
|                 "load_db":"skip", | ||||
|                 "command":"./tools/lf_qa.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                 ] | ||||
|             } | ||||
|         }, | ||||
|         "suite_scripts":{ | ||||
|             "lf_help_check":{ | ||||
|                 "enabled":"TRUE", | ||||
| @@ -498,7 +299,7 @@ | ||||
|                 ] | ||||
|             }, | ||||
|             "test_ip_variable_time_ipv4_5g_udp":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
| @@ -508,7 +309,7 @@ | ||||
|                     " --traffic_type lf_udp", | ||||
|                     " --debug"]}, | ||||
|             "test_ip_variable_time_ipv4_5g_tcp":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
| @@ -578,12 +379,66 @@ | ||||
|                 "args_list":[" --mgr LF_MGR_IP " | ||||
|                 ] | ||||
|             }, | ||||
|             "lf_report":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "timeout":"60", | ||||
|                 "command":"lf_report.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[" " | ||||
|                 ] | ||||
|             }, | ||||
|             "lf_snp_test":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "timeout":"60", | ||||
|                 "command":"lf_snp_test.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[" --help" | ||||
|                 ] | ||||
|             }, | ||||
|             "testgroup":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "timeout":"60", | ||||
|                 "command":"testgroup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[" --mgr LF_MGR_IP --group_name group1 --add_group --list_groups --debug" | ||||
|                 ] | ||||
|             }, | ||||
|             "testgroup2":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "timeout":"60", | ||||
|                 "command":"testgroup2.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[" --mgr LF_MGR_IP --group_name group0 --add_group --num_stations 1 --radio 1.1.wiphy1", | ||||
|                     " use_ssid_idx=1 --ssid SSID_USED --passwd  SSID_PW_USED --security  SECURITY_USED " | ||||
|                 ] | ||||
|             }, | ||||
|             "clean_up_cxs_endp_sta_from_test_group":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|                 ] | ||||
|             }, | ||||
|             "test_generic":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_generic.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --radio 1.1.wiphy1 --upstream_port UPSTREAM_PORT --num_stations 1 --type lfping --dest LF_MGR_IP --debug", | ||||
|                     " use_ssid_idx=1 --ssid SSID_USED --passwd  SSID_PW_USED --security  SECURITY_USED " | ||||
|                 ] | ||||
|             }, | ||||
|             "test_ipv4_ps":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "command":"test_ipv4_ps.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     "--mgr LF_MGR_IP --radio 1.1.wiphy1 --upstream_port 1.1.eth2 --radio2 1.1.wiphy2", | ||||
|                     " --mgr LF_MGR_IP --radio 1.1.wiphy1 --upstream_port UPSTREAM_PORT --radio2 1.1.wiphy2", | ||||
|                     " use_ssid_idx=1 --ssid SSID_USED --passwd  SSID_PW_USED --security  SECURITY_USED " | ||||
|                 ] | ||||
|             }, | ||||
| @@ -698,6 +553,206 @@ | ||||
|                         " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                     ] | ||||
|             } | ||||
|         }, | ||||
|         "suite_smoke":{ | ||||
|             "clean_up_cxs_endp_sta":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|                 ]}, | ||||
|             "test_ip_variable_time0-ipv4":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "timeout":"360", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP ", | ||||
|                     " use_ssid_idx=1  --radio wiphy4 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED", | ||||
|                     " --test_duration 60s --output_format csv ", | ||||
|                     " --traffic_type lf_tcp --a_min 600000000 --b_min 600000000  --upstream_port eth2", | ||||
|                     " --mode '5' --layer3_cols 'name','tx rate','rx rate' ", | ||||
|                     " --port_mgr_cols 'alias','channel','activity','mode'", | ||||
|                     " --num_stations 1"] | ||||
|                 }, | ||||
|             "test_ip_variable_time1-ipv4":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "timeout":"360", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP", | ||||
|                     " use_ssid_idx=1  --radio wiphy1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED", | ||||
|                     " --test_duration 60s --output_format csv ", | ||||
|                     " --traffic_type lf_tcp --a_min 600000000 --b_min 600000000  --upstream_port eth2", | ||||
|                     " --mode '5' --layer3_cols 'name','tx rate','rx rate' ", | ||||
|                     " --port_mgr_cols 'alias','channel','activity','mode'" | ||||
|                 ]}, | ||||
|             "lf_qa":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "timeout":"600", | ||||
|                 "load_db":"skip", | ||||
|                 "command":"./tools/lf_qa.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                 ] | ||||
|             } | ||||
|         }, | ||||
|         "suite_verify":{ | ||||
|             "clean_up_cxs_endp_sta":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|                 ]}, | ||||
|             "test_ip_variable_time0-ipv4":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "timeout":"360", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP ", | ||||
|                     " use_ssid_idx=1  --radio wiphy4 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED", | ||||
|                     " --test_duration 60s --output_format csv ", | ||||
|                     " --traffic_type lf_tcp --a_min 600000000 --b_min 600000000  --upstream_port eth2", | ||||
|                     " --mode '5' --layer3_cols 'name','tx rate','rx rate' ", | ||||
|                     " --port_mgr_cols 'alias','channel','activity','mode'", | ||||
|                     " --num_stations 1"] | ||||
|                 }, | ||||
|             "test_ip_variable_time1-ipv4":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "timeout":"360", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP", | ||||
|                     " use_ssid_idx=1  --radio wiphy1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED", | ||||
|                     " --test_duration 60s --output_format csv ", | ||||
|                     " --traffic_type lf_tcp --a_min 600000000 --b_min 600000000  --upstream_port eth2", | ||||
|                     " --mode '5' --layer3_cols 'name','tx rate','rx rate' ", | ||||
|                     " --port_mgr_cols 'alias','channel','activity','mode'" | ||||
|                 ]}, | ||||
|             "lf_qa":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "timeout":"600", | ||||
|                 "load_db":"skip", | ||||
|                 "command":"./tools/lf_qa.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                 ] | ||||
|             } | ||||
|         }, | ||||
|         "suite_l3":{ | ||||
|             "clean_up_cxs_endp_sta_flags_5q_all":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|             ]}, | ||||
|             "test_l3_longevity_flags_5g_all":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "command":"test_l3_longevity.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 30s --polling_interval 5s --upstream_port UPSTREAM_PORT ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy1,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy2,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy3,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy4,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy5,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy6,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy7,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000", | ||||
|                     " --test_rig TEST_RIG --test_tag 'l3_longevity'", | ||||
|                     " --dut_model_num  USE_DUT_NAME --dut_sw_version DUT_SW --dut_hw_version DUT_HW --dut_serial_num DUT_SN" | ||||
|                 ] | ||||
|             }, | ||||
|             "clean_up_cxs_endp_sta_flags_2q_all":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --mgr LF_MGR_IP --cxs --sta" | ||||
|             ]}, | ||||
|             "test_l3_longevity_flags_2g_all":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "command":"test_l3_longevity.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 30s --polling_interval 5s --upstream_port UPSTREAM_PORT ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy1,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy2,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy3,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy4,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy5,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy6,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " use_ssid_idx=1 --radio 'radio==wiphy7,stations==1,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED',wifi_mode==0,wifi_settings==wifi_settings,enable_flags==(ht160_enable|wpa2_enable|80211u_enable|create_admin_down) ", | ||||
|                     " --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000", | ||||
|                     " --test_rig TEST_RIG --test_tag 'l3_longevity'", | ||||
|                     " --dut_model_num  USE_DUT_NAME --dut_sw_version DUT_SW --dut_hw_version DUT_HW --dut_serial_num DUT_SN" | ||||
|                 ] | ||||
|             }, | ||||
|             "lf_qa":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "timeout":"600", | ||||
|                 "load_db":"skip", | ||||
|                 "command":"./tools/lf_qa.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                 ] | ||||
|             } | ||||
|         },             | ||||
|         "suite_test":{ | ||||
|             "lf_cleanup":{ | ||||
|                 "enabled":"FALSE", | ||||
|                 "load_db":"NONE", | ||||
|                 "command":"lf_cleanup.py", | ||||
|                 "args":"", | ||||
|                 "args_list":["--mgr LF_MGR_IP --cxs --sta" | ||||
|                 ] | ||||
|             }, | ||||
|             "lf_report_test":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "timeout":"60", | ||||
|                 "command":"lf_report_test.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[" --mgr LF_MGR_IP " | ||||
|                 ] | ||||
|             }, | ||||
|             "lf_graph":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "load_db":"NONE", | ||||
|                 "timeout":"60", | ||||
|                 "command":"lf_graph.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[" --mgr LF_MGR_IP " | ||||
|                 ] | ||||
|             }, | ||||
|             "test_ip_variable_time0-ipv4":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "command":"test_ip_variable_time.py", | ||||
|                 "args":"", | ||||
|                 "args_list":["  use_ssid_idx=1 --mgr LF_MGR_IP --radio wiphy1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED --test_duration 15s --output_format excel --layer3_cols name,tx_bytes,rx_bytes,dropped --traffic_type lf_udp --debug"] | ||||
|             }, | ||||
|             "lf_qa":{ | ||||
|                 "enabled":"TRUE", | ||||
|                 "timeout":"600", | ||||
|                 "load_db":"skip", | ||||
|                 "command":"./tools/lf_qa.py", | ||||
|                 "args":"", | ||||
|                 "args_list":[ | ||||
|                     " --server TEST_SERVER --path REPORT_PATH --store --png --database DATABASE_SQLITE" | ||||
|                 ] | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1475,6 +1475,16 @@ note if all json data (rig,dut,tests)  in same json file pass same json in for a | ||||
|     # Add the qa_report_html | ||||
|     qa_report_html = check.qa_report_html | ||||
|  | ||||
|     # add the python3 version information | ||||
|     lf_server = pd.DataFrame() | ||||
|     hostname = socket.getfqdn() | ||||
|     ip = socket.gethostbyname(hostname) | ||||
|  | ||||
|     lf_server['Server Host Name'] = [hostname] | ||||
|     lf_server['Server ip'] = [ip] | ||||
|     lf_server['Python3 Version'] = [sys.version] | ||||
|     lf_server['Python3 Executable'] = [sys.executable] | ||||
|  | ||||
|     lf_suite_time = pd.DataFrame() | ||||
|     lf_suite_time['Suite Start'] = [check.suite_start_time] | ||||
|     lf_suite_time['Suite End'] = [check.suite_end_time] | ||||
| @@ -1501,6 +1511,10 @@ note if all json data (rig,dut,tests)  in same json file pass same json in for a | ||||
|     report.build_table_title() | ||||
|     report.set_table_dataframe(lf_test_setup) | ||||
|     report.build_table() | ||||
|     report.set_table_title("LANForge CICD Server") | ||||
|     report.build_table_title() | ||||
|     report.set_table_dataframe(lf_server) | ||||
|     report.build_table() | ||||
|     report.set_table_title("LANForge Radios") | ||||
|     report.build_table_title() | ||||
|     report.set_table_dataframe(lf_radio_df) | ||||
|   | ||||
| @@ -30,22 +30,32 @@ class MineRegression: | ||||
|             ['IP', 'Python version', 'LANforge version', 'OS Version', 'Hostname', 'Python Environment']).reset_index(drop=True) | ||||
|         errors = list() | ||||
|         lanforge_errors = list() | ||||
|         partial_failures = list() | ||||
|         major_errors = list() | ||||
|         successes = list() | ||||
|         for index in system_variations.index: | ||||
|             variation = system_variations.iloc[index] | ||||
|             result = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version', 'Python Environment', 'IP']].isin(dict( | ||||
|                 variation).values()).all(axis=1), :].dropna(subset=['STDERR']).shape[0] | ||||
|             system = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version', 'Python Environment', 'IP']].isin(dict( | ||||
|                 variation).values()).all(axis=1), :] | ||||
|             result = system.dropna(subset=['STDERR']).shape[0] | ||||
|             errors.append(result) | ||||
|  | ||||
|             lanforge_result = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version', 'Python Environment', 'IP']].isin(dict( | ||||
|                 variation).values()).all(axis=1), :].dropna(subset=['LANforge Error']).shape[0] | ||||
|             lanforge_result = system.dropna(subset=['LANforge Error']).shape[0] | ||||
|             partial_failures.append(system[system['Status'] == 'Partial Failure'].shape[0]) | ||||
|             major_errors.append(system[system['Status'] == 'ERROR'].shape[0]) | ||||
|             lanforge_errors.append(lanforge_result) | ||||
|         system_variations['errors'] = errors | ||||
|             successes.append(system[system['Status'] == 'Success'].shape[0]) | ||||
|         system_variations['Successes'] = successes | ||||
|         system_variations['Errors'] = errors | ||||
|         system_variations['LANforge errors'] = lanforge_errors | ||||
|         system_variations['Python errors'] = system_variations['errors'] - system_variations['LANforge errors'] | ||||
|         system_variations['Python errors'] = system_variations['Errors'] - system_variations['LANforge errors'] | ||||
|         system_variations['Partial Failures'] = partial_failures | ||||
|         system_variations['Major Errors'] = major_errors | ||||
|         system_variations | ||||
|         if self.save_csv: | ||||
|             system_variations.to_csv('regression_suite_results.csv') | ||||
|         else: | ||||
|             print(system_variations.sort_values('errors')) | ||||
|             print(system_variations.sort_values('Successes')) | ||||
|  | ||||
|  | ||||
| def main(): | ||||
| @@ -56,8 +66,7 @@ def main(): | ||||
|     args = parser.parse_args() | ||||
|  | ||||
|     if args.ip is None: | ||||
|         args.ip = ['192.168.92.18', '192.168.92.12', '192.168.93.51', '192.168.92.15'] | ||||
|     #args.ip = ['192.168.93.51'] | ||||
|         args.ip = ['192.168.92.18', '192.168.92.12', '192.168.93.51', '192.168.92.15', '192.168.100.184', '192.168.100.30'] | ||||
|     Miner = MineRegression(system_information=args.system_info, | ||||
|                            save_csv=args.save_csv, | ||||
|                            ips=args.ip) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 shivamcandela
					shivamcandela