mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	Merge branch 'master' of github.com:greearb/lanforge-scripts
This commit is contained in:
		| @@ -29,6 +29,7 @@ from json import load | |||||||
| import configparser | import configparser | ||||||
| from pprint import * | from pprint import * | ||||||
| import subprocess | import subprocess | ||||||
|  | import sys | ||||||
|      |      | ||||||
|  |  | ||||||
| CONFIG_FILE = os.getcwd() + '/lf_check_config.ini'     | CONFIG_FILE = os.getcwd() + '/lf_check_config.ini'     | ||||||
| @@ -116,8 +117,11 @@ class lf_check(): | |||||||
|                 print("cmd_args {}".format(cmd_args)) |                 print("cmd_args {}".format(cmd_args)) | ||||||
|  |  | ||||||
|                 #try: |                 #try: | ||||||
|                 process = subprocess.run((command).split(' '), check= False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) |                 process = subprocess.run((command).split(' '), check= True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) | ||||||
|                 #process = subprocess.run((command).split(' '), check= True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) |                 #process = subprocess.run((command).split(' '), check= True, capture_output=True ) | ||||||
|  |                 #pss1 = process.stdout.decode('utf-8', 'ignore') | ||||||
|  |                 #print(pss1) | ||||||
|  |  | ||||||
|                  |                  | ||||||
|                 print("###################### STDOUT #########################") |                 print("###################### STDOUT #########################") | ||||||
|                 print(process.stdout) |                 print(process.stdout) | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ TEST_DICT: { | |||||||
|     "test_l3_longevity":{"enabled":"TRUE","command":"test_l3_longevity.py","args":"--test_duration 30s --polling_interval 10s --upstream_port eth1  |     "test_l3_longevity":{"enabled":"TRUE","command":"test_l3_longevity.py","args":"--test_duration 30s --polling_interval 10s --upstream_port eth1  | ||||||
|         --radio 'radio==wiphy0,stations==1,ssid==jedway-wpa2-x2048-5-3,ssid_pw==jedway-wpa2-x2048-5-3,security==wpa2'  |         --radio 'radio==wiphy0,stations==1,ssid==jedway-wpa2-x2048-5-3,ssid_pw==jedway-wpa2-x2048-5-3,security==wpa2'  | ||||||
|         --radio 'radio==wiphy1,stations==1,ssid==jedway-wpa2-x2048-4-1,ssid_pw==jedway-wpa2-x2048-4-1,security==wpa2'  |         --radio 'radio==wiphy1,stations==1,ssid==jedway-wpa2-x2048-4-1,ssid_pw==jedway-wpa2-x2048-4-1,security==wpa2'  | ||||||
|         --mgr '192.168.92.13' --endp_type lf_udp,lf_tcp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"}, |         --endp_type lf_udp --ap_read --ap_test_mode --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"}, | ||||||
|     "test_l3_powersave_traffic":{"enabled":"FALSE","command":"test_l3_powersave_traffic.py","args":""}, |     "test_l3_powersave_traffic":{"enabled":"FALSE","command":"test_l3_powersave_traffic.py","args":""}, | ||||||
|     "test_l3_scenario_throughput":{"enabled":"FALSE","command":"test_l3_scenario_throughput.py","args":""}, |     "test_l3_scenario_throughput":{"enabled":"FALSE","command":"test_l3_scenario_throughput.py","args":""}, | ||||||
|     "test_status_msg":{"enabled":"FALSE","command":"test_status_msg.py","args":""}, |     "test_status_msg":{"enabled":"FALSE","command":"test_status_msg.py","args":""}, | ||||||
| @@ -62,3 +62,5 @@ TEST_DICT: { | |||||||
|     "sta_connect_example":{"enabled":"FALSE","command":"sta_connect_example.py","args":""}, |     "sta_connect_example":{"enabled":"FALSE","command":"sta_connect_example.py","args":""}, | ||||||
|     "create_vr.py":{"enabled":"FALSE","command":"create_vr.py","args":"--vr_name 2.vr0 --ports 2.br0,2.vap2 --services"} |     "create_vr.py":{"enabled":"FALSE","command":"create_vr.py","args":"--vr_name 2.vr0 --ports 2.br0,2.vap2 --services"} | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -87,15 +87,15 @@ class L3VariableTime(Realm): | |||||||
|                  lfclient_host="localhost",  |                  lfclient_host="localhost",  | ||||||
|                  lfclient_port=8080,  |                  lfclient_port=8080,  | ||||||
|                  debug=False, |                  debug=False, | ||||||
|                  _exit_on_error=False, |  | ||||||
|                  _exit_on_fail=False, |  | ||||||
|                  _proxy_str=None, |  | ||||||
|                  influxdb=None, |                  influxdb=None, | ||||||
|                  ap_read=False, |                  ap_read=False, | ||||||
|                  ap_port='/dev/ttyUSB0', |                  ap_port='/dev/ttyUSB0', | ||||||
|                  ap_baud='115200', |                  ap_baud='115200', | ||||||
|                  ap_cmd='wl -i wl1 bs_data', |                  ap_cmd='wl -i wl1 bs_data', | ||||||
|                  ap_test_mode=False, |                  ap_test_mode=False, | ||||||
|  |                  _exit_on_error=False, | ||||||
|  |                  _exit_on_fail=False, | ||||||
|  |                  _proxy_str=None, | ||||||
|                  _capture_signal_list=[]): |                  _capture_signal_list=[]): | ||||||
|         super().__init__(lfclient_host=lfclient_host, |         super().__init__(lfclient_host=lfclient_host, | ||||||
|                          lfclient_port=lfclient_port, |                          lfclient_port=lfclient_port, | ||||||
| @@ -135,6 +135,7 @@ class L3VariableTime(Realm): | |||||||
|         self.user_tags = user_tags |         self.user_tags = user_tags | ||||||
|          |          | ||||||
|  |  | ||||||
|  |  | ||||||
|         self.side_a_min_rate = side_a_min_rate |         self.side_a_min_rate = side_a_min_rate | ||||||
|         self.side_a_max_rate = side_a_max_rate |         self.side_a_max_rate = side_a_max_rate | ||||||
|         self.side_b_min_rate = side_b_min_rate |         self.side_b_min_rate = side_b_min_rate | ||||||
| @@ -204,6 +205,7 @@ class L3VariableTime(Realm): | |||||||
|                 reset_port_max_time=self.duration_time_to_seconds(reset_port_time_max_)) |                 reset_port_max_time=self.duration_time_to_seconds(reset_port_time_max_)) | ||||||
|             self.station_profiles.append(self.station_profile) |             self.station_profiles.append(self.station_profile) | ||||||
|          |          | ||||||
|  |  | ||||||
|         self.multicast_profile.host = self.lfclient_host |         self.multicast_profile.host = self.lfclient_host | ||||||
|         self.cx_profile.host = self.lfclient_host |         self.cx_profile.host = self.lfclient_host | ||||||
|         self.cx_profile.port = self.lfclient_port |         self.cx_profile.port = self.lfclient_port | ||||||
| @@ -899,6 +901,11 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m | |||||||
|     else: |     else: | ||||||
|         ap_read = False |         ap_read = False | ||||||
|  |  | ||||||
|  |     if args.ap_test_mode: | ||||||
|  |         ap_test_mode = args.ap_test_mode | ||||||
|  |     else: | ||||||
|  |         ap_test_mode = False | ||||||
|  |  | ||||||
|     if args.ap_port: |     if args.ap_port: | ||||||
|         ap_port = args.ap_port |         ap_port = args.ap_port | ||||||
|  |  | ||||||
| @@ -908,9 +915,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m | |||||||
|     if args.ap_cmd: |     if args.ap_cmd: | ||||||
|         ap_cmd = args.ap_cmd |         ap_cmd = args.ap_cmd | ||||||
|  |  | ||||||
|     if args.ap_test_mode: |  | ||||||
|         ap_test_mode = args.ap_test_mode |  | ||||||
|  |  | ||||||
|     if args.test_duration: |     if args.test_duration: | ||||||
|         test_duration = args.test_duration |         test_duration = args.test_duration | ||||||
|  |  | ||||||
| @@ -1033,11 +1037,8 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m | |||||||
|         print("ERROR:  ul_pdus %s and dl_pdus %s arrays must be same length\n" %(len(ul_rates), len(dl_rates))) |         print("ERROR:  ul_pdus %s and dl_pdus %s arrays must be same length\n" %(len(ul_rates), len(dl_rates))) | ||||||
|      |      | ||||||
|     ip_var_test = L3VariableTime( |     ip_var_test = L3VariableTime( | ||||||
|                                     args=args, |  | ||||||
|                                     number_template="00",  |  | ||||||
|                                     station_lists= station_lists, |  | ||||||
|                                     name_prefix="LT-", |  | ||||||
|                                     endp_types=endp_types, |                                     endp_types=endp_types, | ||||||
|  |                                     args=args, | ||||||
|                                     tos=args.tos, |                                     tos=args.tos, | ||||||
|                                     side_b=side_b, |                                     side_b=side_b, | ||||||
|                                     radio_name_list=radio_name_list, |                                     radio_name_list=radio_name_list, | ||||||
| @@ -1045,10 +1046,9 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m | |||||||
|                                     ssid_list=ssid_list, |                                     ssid_list=ssid_list, | ||||||
|                                     ssid_password_list=ssid_password_list, |                                     ssid_password_list=ssid_password_list, | ||||||
|                                     ssid_security_list=ssid_security_list,  |                                     ssid_security_list=ssid_security_list,  | ||||||
|                                     test_duration=test_duration, |                                     station_lists= station_lists, | ||||||
|                                     polling_interval= polling_interval, |                                     name_prefix="LT-", | ||||||
|                                     lfclient_host=lfjson_host, |                                     outfile=csv_outfile, | ||||||
|                                     lfclient_port=lfjson_port, |  | ||||||
|                                     reset_port_enable_list=reset_port_enable_list, |                                     reset_port_enable_list=reset_port_enable_list, | ||||||
|                                     reset_port_time_min_list=reset_port_time_min_list, |                                     reset_port_time_min_list=reset_port_time_min_list, | ||||||
|                                     reset_port_time_max_list=reset_port_time_max_list, |                                     reset_port_time_max_list=reset_port_time_max_list, | ||||||
| @@ -1056,13 +1056,17 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m | |||||||
|                                     side_b_min_rate=dl_rates, |                                     side_b_min_rate=dl_rates, | ||||||
|                                     side_a_min_pdu=ul_pdus, |                                     side_a_min_pdu=ul_pdus, | ||||||
|                                     side_b_min_pdu=dl_pdus, |                                     side_b_min_pdu=dl_pdus, | ||||||
|  |                                     user_tags=args.influx_tag, | ||||||
|                                     rates_are_totals=args.rates_are_totals, |                                     rates_are_totals=args.rates_are_totals, | ||||||
|                                     mconn=args.multiconn, |                                     mconn=args.multiconn, | ||||||
|                                     attenuators=attenuators, |                                     attenuators=attenuators, | ||||||
|                                     atten_vals=atten_vals, |                                     atten_vals=atten_vals, | ||||||
|                                     user_tags=args.influx_tag, |                                     number_template="00",  | ||||||
|  |                                     test_duration=test_duration, | ||||||
|  |                                     polling_interval= polling_interval, | ||||||
|  |                                     lfclient_host=lfjson_host, | ||||||
|  |                                     lfclient_port=lfjson_port, | ||||||
|                                     debug=debug, |                                     debug=debug, | ||||||
|                                     outfile=csv_outfile, |  | ||||||
|                                     influxdb=influxdb, |                                     influxdb=influxdb, | ||||||
|                                     ap_read=ap_read, |                                     ap_read=ap_read, | ||||||
|                                     ap_port=ap_port, |                                     ap_port=ap_port, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ben Greear
					Ben Greear