mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-03 20:27:54 +00:00 
			
		
		
		
	lf_check.py : add support needed for create_chamberview_dut,
create_chamberview ct_us_001.json : support needed for create_chamberview_dut, and create_chamberview Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
		@@ -1,5 +1,20 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    "ct_us_001":{
 | 
				
			||||||
 | 
					        "Notes":[
 | 
				
			||||||
 | 
					            "The json is used to orchastrate the tests to be run on testbed ct_us_001",
 | 
				
			||||||
 | 
					            "This json file is used as an input to the ./lf_check.py file",
 | 
				
			||||||
 | 
					            "The variables that are all capitalized below are replaced with configuration",
 | 
				
			||||||
 | 
					            "from the json file. so LF_MGR in the test below is replaced by the json lf_mgr",
 | 
				
			||||||
 | 
					            "The replacement is loosely coupled so the upper and lower case convention is used",
 | 
				
			||||||
 | 
					            "to identify replaced strings in the lf_check.py code."  
 | 
				
			||||||
 | 
					        ]  
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "test_parameters":{
 | 
					    "test_parameters":{
 | 
				
			||||||
 | 
					        "test_bed": "CT-US-001",
 | 
				
			||||||
 | 
					        "lf_mgr": "192.168.100.116",
 | 
				
			||||||
 | 
					        "lf_mgr_port": "8080",
 | 
				
			||||||
 | 
					        "dut_name": "ASUSRT-AX88U",
 | 
				
			||||||
 | 
					        "dut_bssid": "3c:7c:3f:55:4d:64",
 | 
				
			||||||
        "test_timeout": 200,
 | 
					        "test_timeout": 200,
 | 
				
			||||||
        "load_blank_db": false,
 | 
					        "load_blank_db": false,
 | 
				
			||||||
        "load_factory_default_db": true,
 | 
					        "load_factory_default_db": true,
 | 
				
			||||||
@@ -9,7 +24,6 @@
 | 
				
			|||||||
        "host_ip_production": "192.168.100.201",
 | 
					        "host_ip_production": "192.168.100.201",
 | 
				
			||||||
        "email_list_test": "chuck.rekiere@candelatech.com,logan.lipke@candelatech.com",
 | 
					        "email_list_test": "chuck.rekiere@candelatech.com,logan.lipke@candelatech.com",
 | 
				
			||||||
        "host_ip_test": "192.168.100.201",
 | 
					        "host_ip_test": "192.168.100.201",
 | 
				
			||||||
        "lf_mgr": "192.168.100.116",
 | 
					 | 
				
			||||||
        "email_title_txt": "Lanforge QA Testing CT-US-001",
 | 
					        "email_title_txt": "Lanforge QA Testing CT-US-001",
 | 
				
			||||||
        "email_txt": "Lanforge QA Testing CT-US-001 "
 | 
					        "email_txt": "Lanforge QA Testing CT-US-001 "
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -18,6 +32,15 @@
 | 
				
			|||||||
        "ftp_test_ip": "10.40.0.10",
 | 
					        "ftp_test_ip": "10.40.0.10",
 | 
				
			||||||
        "test_ip": "192.168.0.104"
 | 
					        "test_ip": "192.168.0.104"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "test_generic":{
 | 
				
			||||||
 | 
					        "radio_used": "wiphy1",
 | 
				
			||||||
 | 
					        "ssid_used": "asus11ax-5",
 | 
				
			||||||
 | 
					        "ssid_pw_used": "hello123",
 | 
				
			||||||
 | 
					        "security_used": "wpa2",
 | 
				
			||||||
 | 
					        "num_sta": 1,
 | 
				
			||||||
 | 
					        "col_names": "name,tx_byptes,rx_bytes,dropped",
 | 
				
			||||||
 | 
					        "upstream_port": "eth2"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "test_database":{
 | 
					    "test_database":{
 | 
				
			||||||
        "database_config": "True",
 | 
					        "database_config": "True",
 | 
				
			||||||
        "database_host": "192.168.100.201",
 | 
					        "database_host": "192.168.100.201",
 | 
				
			||||||
@@ -44,18 +67,9 @@
 | 
				
			|||||||
        "blog_password_push": "lanforge",
 | 
					        "blog_password_push": "lanforge",
 | 
				
			||||||
        "blog_flag": "--kpi_to_ghost"
 | 
					        "blog_flag": "--kpi_to_ghost"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "test_generic":{
 | 
					 | 
				
			||||||
        "radio_used": "wiphy1",
 | 
					 | 
				
			||||||
        "ssid_used": "asus11ax-5",
 | 
					 | 
				
			||||||
        "ssid_pw_used": "hello123",
 | 
					 | 
				
			||||||
        "security_used": "wpa2",
 | 
					 | 
				
			||||||
        "num_sta": 4,
 | 
					 | 
				
			||||||
        "col_names": "name,tx_byptes,rx_bytes,dropped",
 | 
					 | 
				
			||||||
        "upstream_port": "eth2"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "radio_dict":{
 | 
					    "radio_dict":{
 | 
				
			||||||
        "RADIO_0_CFG":{"KEY":"RADIO_0_CFG","RADIO":"wiphy0","STATIONS":"4","SSID":"asus11ax-5","PASSWD":"hello123","SECURITY":"wpa2"},
 | 
					        "RADIO_0_CFG":{"KEY":"RADIO_0_CFG","RADIO":"wiphy0","STATIONS":"1","SSID":"asus11ax-5","PASSWD":"hello123","SECURITY":"wpa2"},
 | 
				
			||||||
        "RADIO_1_CFG":{"KEY":"RADIO_1_CFG","RADIO":"wiphy1","STATIONS":"4","SSID":"asus11ax-5","PASSWD":"hello123","SECURITY":"wpa2"}        
 | 
					        "RADIO_1_CFG":{"KEY":"RADIO_1_CFG","RADIO":"wiphy1","STATIONS":"1","SSID":"asus11ax-5","PASSWD":"hello123","SECURITY":"wpa2"}        
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "test_suites":{
 | 
					    "test_suites":{
 | 
				
			||||||
        "suite_one":{
 | 
					        "suite_one":{
 | 
				
			||||||
@@ -66,6 +80,51 @@
 | 
				
			|||||||
        "suite_two":{
 | 
					        "suite_two":{
 | 
				
			||||||
                "test_l3_longevity":{"enabled":"TRUE","load_db":"skip","command":"test_l3_longevity.py","args":"--test_duration 15s --polling_interval 5s --upstream_port eth2 --radio 'radio==wiphy1,stations==4,ssid==asus11ax-5,ssid_pw==hello123,security==wpa2' --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"}
 | 
					                "test_l3_longevity":{"enabled":"TRUE","load_db":"skip","command":"test_l3_longevity.py","args":"--test_duration 15s --polling_interval 5s --upstream_port eth2 --radio 'radio==wiphy1,stations==4,ssid==asus11ax-5,ssid_pw==hello123,security==wpa2' --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"}
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        "suite_wc_dp_01":{
 | 
				
			||||||
 | 
					            "CT-US-001_create_chamberview_dut":{"enabled":"TRUE","load_db":"skip","command":"create_chamberview_dut.py","args":"",
 | 
				
			||||||
 | 
					                "args_list":[
 | 
				
			||||||
 | 
					                    "--lfmgr LF_MGR --port LF_MGR_PORT --dut_name DUT_NAME",
 | 
				
			||||||
 | 
					                    " --ssid 'ssid_indx=0 ssid=asus11ax-5 security=WPA2 password=hello123 bssid=3c:7c:3f:55:4d:64'",
 | 
				
			||||||
 | 
					                    " --ssid 'ssid_idx=1 ssid=asus11ax-5 security=WPA2 password=hello123 bssid=3c:7c:3f:55:4d:64'",
 | 
				
			||||||
 | 
					                    " --sw_version 'asus_version' --hw_version asus11ax --serial_num 4d64 --model_num 'Asus RT-AX88U'"
 | 
				
			||||||
 | 
					                ]},
 | 
				
			||||||
 | 
					            "CT-US-001_create_chamberview":{"enabled":"TRUE","load_db":"skip","command":"create_chamberview.py","args":"",
 | 
				
			||||||
 | 
					                "args_list":[
 | 
				
			||||||
 | 
					                    " --lfmgr LF_MGR --port LF_MGR_PORT --delete_scenario",
 | 
				
			||||||
 | 
					                    " --create_scenario ucentral-scenario ",
 | 
				
			||||||
 | 
					                    " --raw_line 'profile_link 1.1 STA-AC 1 'DUT: DUT_NAME Radio-1' NA wiphy1,AUTO -1 NA' ",
 | 
				
			||||||
 | 
					                    " --raw_line 'profile_link 1.1 STA-AC 1 'DUT: DUT_NAME Radio-1' NA wiphy3,AUTO -1 NA' ",
 | 
				
			||||||
 | 
					                    " --raw_line 'profile_link 1.1 upstream-dhcp 1 NA NA UPSTREAM_PORT,AUTO -1 NA'"                    
 | 
				
			||||||
 | 
					                ]},
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					            "CT-US-001_wifi_capacity_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_wifi_capacity_test.py","args":"",
 | 
				
			||||||
 | 
					                "args_list":[
 | 
				
			||||||
 | 
					                    " --mgr 192.168.100.116 --port 8080 --lf_user lanforge --lf_password lanforge --instance_name cicd-wct",
 | 
				
			||||||
 | 
					                    " --upstream 1.1.eth2 --batch_size 1,5,25 --loop_iter 1 --protocol UDP-IPv4 --duration 6000",
 | 
				
			||||||
 | 
					                    " --pull_report --local_lf_report_dir REPORT_PATH --stations 1.1.wlan1",
 | 
				
			||||||
 | 
					                    " --test_rig TEST_RIG --influx_host DATABASE_HOST --influx_port DATABASE_PORT --influx_org DATABASE_ORG",
 | 
				
			||||||
 | 
					                    " --influx_token=DATABASE_TOKEN --influx_bucket DATABASE_BUCKET --influx_tag DATABASE_TAG --set DUT_SET_NAME"
 | 
				
			||||||
 | 
					                ]
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "CT-US-001_dataplane_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_dataplane_test.py","args":"",
 | 
				
			||||||
 | 
					                "args_list":[
 | 
				
			||||||
 | 
					                    " --mgr 192.168.100.116 --port 8080 --lf_user lanforge --lf_password lanforge --instance_name cicd-dpt",
 | 
				
			||||||
 | 
					                    " --config_name test_con --upstream 1.1.eth2 --dut asus_5g --duration 30s --station 1.1.wlan1",
 | 
				
			||||||
 | 
					                    " --download_speed 85% --upload_speed 0 --raw_line 'pkts: 60;88;120;256;512;1024;MTU' ",
 | 
				
			||||||
 | 
					                    " --raw_line 'directions: DUT Transmit' --raw_line 'traffic_types: UDP' --raw_line 'bandw_options: 20'",
 | 
				
			||||||
 | 
					                    " --raw_line 'spatial_streams: 1' --pull_report --local_lf_report_dir REPORT_PATH ",
 | 
				
			||||||
 | 
					                    " --influx_host DATABASE_HOST --influx_port DATABASE_PORT --influx_org DATABASE_ORG --influx_token=DATABASE_TOKEN",
 | 
				
			||||||
 | 
					                    " --influx_bucket DATABASE_BUCKET --influx_tag DATABASE_TAG --set DUT_SET_NAME"
 | 
				
			||||||
 | 
					                ]},
 | 
				
			||||||
 | 
					            "GHOST":{"enabled":"TRUE","load_db":"skip","command":"ghost_profile.py","args":"",
 | 
				
			||||||
 | 
					                "args_list":[
 | 
				
			||||||
 | 
					                    " --ghost_token BLOG_TOKEN --ghost_host BLOG_HOST --authors BLOG_AUTHORS --customer BLOG_CUSTOMER",
 | 
				
			||||||
 | 
					                    " --user_push BLOG_USER_PUSH --password BLOG_PASSWORD_PUSH BLOG_FLAG --grafana_token DASHBOARD_TOKEN",
 | 
				
			||||||
 | 
					                    " --grafana_host DASHBOARD_HOST --grafana_bucket DATABASE_BUCKET --parent_folder REPORT_PATH",
 | 
				
			||||||
 | 
					                    " --influx_host DATABASE_HOST --influx_org DATABASE_ORG --influx_token=DATABASE_TOKEN --influx_bucket DATABASE_BUCKET",
 | 
				
			||||||
 | 
					                    " --influx_tag DATABASE_TAG "
 | 
				
			||||||
 | 
					                ]}
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        "suite_wc_dp_00":{
 | 
					        "suite_wc_dp_00":{
 | 
				
			||||||
            "CT-US-001_wifi_capacity_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_wifi_capacity_test.py","args":"",
 | 
					            "CT-US-001_wifi_capacity_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_wifi_capacity_test.py","args":"",
 | 
				
			||||||
                "args_list":[
 | 
					                "args_list":[
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -131,6 +131,8 @@ class lf_check():
 | 
				
			|||||||
        self.email_txt = ""
 | 
					        self.email_txt = ""
 | 
				
			||||||
        self.lf_mgr = "" 
 | 
					        self.lf_mgr = "" 
 | 
				
			||||||
        self.lf_mgr_port = "" 
 | 
					        self.lf_mgr_port = "" 
 | 
				
			||||||
 | 
					        self.dut_name = "" # "ASUSRT-AX88U" note this is not dut_set_name
 | 
				
			||||||
 | 
					        self.dut_bssid = "" #"3c:7c:3f:55:4d:64" - this is the mac for the radio this may be seen with a scan 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #NOTE:  My influx token is unlucky and starts with a '-', but using the syntax below # with '=' right after the argument keyword works as hoped.
 | 
					        #NOTE:  My influx token is unlucky and starts with a '-', but using the syntax below # with '=' right after the argument keyword works as hoped.
 | 
				
			||||||
        # --influx_token=
 | 
					        # --influx_token=
 | 
				
			||||||
@@ -147,7 +149,7 @@ class lf_check():
 | 
				
			|||||||
        self.database_org = "Candela"
 | 
					        self.database_org = "Candela"
 | 
				
			||||||
        self.database_bucket = "lanforge_qa_testing"
 | 
					        self.database_bucket = "lanforge_qa_testing"
 | 
				
			||||||
        self.database_tag = 'testbed CT-US-001' # the test_rig needs to match
 | 
					        self.database_tag = 'testbed CT-US-001' # the test_rig needs to match
 | 
				
			||||||
        self.dut_set_name = 'DUT_NAME ASUSRT-AX88U' # note the name will be set as --set DUT_NAME ASUSRT-AX88U
 | 
					        self.dut_set_name = 'DUT_NAME ASUSRT-AX88U' # note the name will be set as --set DUT_NAME ASUSRT-AX88U, this is not dut_name (see above)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # grafana configuration  #dashboard
 | 
					        # grafana configuration  #dashboard
 | 
				
			||||||
@@ -404,7 +406,18 @@ blog: http://{blog}:2368
 | 
				
			|||||||
            self.lf_mgr = self.json_data["test_parameters"]["lf_mgr"]
 | 
					            self.lf_mgr = self.json_data["test_parameters"]["lf_mgr"]
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self.logger.info("lf_mgr not in test_parameters json")
 | 
					            self.logger.info("lf_mgr not in test_parameters json")
 | 
				
			||||||
 | 
					        if "lf_mgr_port" in self.json_data["test_parameters"]:
 | 
				
			||||||
 | 
					            self.lf_mgr_port = self.json_data["test_parameters"]["lf_mgr_port"]
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            self.logger.info("lf_mgr_port not in test_parameters json")
 | 
				
			||||||
 | 
					        if "dut_name" in self.json_data["test_parameters"]:
 | 
				
			||||||
 | 
					            self.dut_name = self.json_data["test_parameters"]["dut_name"]
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            self.logger.info("dut_name not in test_parameters json")
 | 
				
			||||||
 | 
					        if "dut_bssid" in self.json_data["test_parameters"]:
 | 
				
			||||||
 | 
					            self.dut_bssid = self.json_data["test_parameters"]["dut_bssid"]
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            self.logger.info("dut_bssid not in test_parameters json")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def read_test_network(self):
 | 
					    def read_test_network(self):
 | 
				
			||||||
        if "http_test_ip" in self.json_data["test_network"]:
 | 
					        if "http_test_ip" in self.json_data["test_network"]:
 | 
				
			||||||
@@ -702,6 +715,8 @@ blog: http://{blog}:2368
 | 
				
			|||||||
                    self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('LF_MGR',self.lf_mgr)
 | 
					                    self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('LF_MGR',self.lf_mgr)
 | 
				
			||||||
                if 'LF_MGR_PORT' in self.test_dict[test]['args']:
 | 
					                if 'LF_MGR_PORT' in self.test_dict[test]['args']:
 | 
				
			||||||
                    self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('LF_MGR_PORT',self.lf_mgr_port)
 | 
					                    self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('LF_MGR_PORT',self.lf_mgr_port)
 | 
				
			||||||
 | 
					                if 'DUT_NAME' in self.test_dict[test]['args']:
 | 
				
			||||||
 | 
					                    self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DUT_NAME',self.dut_name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if 'RADIO_USED' in self.test_dict[test]['args']:
 | 
					                if 'RADIO_USED' in self.test_dict[test]['args']:
 | 
				
			||||||
                    self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('RADIO_USED',self.radio_lf)
 | 
					                    self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('RADIO_USED',self.radio_lf)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user