mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
lf_check.py: update support for database, dashboard, blog
ct_us_001.json : update to configuration Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -40,10 +40,13 @@
|
|||||||
"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_ig_dut":{
|
"suite_wc_dp_0":{
|
||||||
"CT-US-001_wifi_capacity_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_wifi_capacity_test.py","args":"--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.sta0000,1.1.sta0001 --create_stations --radio wiphy1 --ssid asus11ax-5 --security wpa2 --paswd hello123 --test_rig CT-US-001 --influx_host 192.168.100.201 --influx_port 8086 --influx_org Candela --influx_token=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ== --influx_bucket lanforge_qa_testing --influx_tag testbed CT-US-001 --raw_line 'dut-model-num: ASUS RT-AX88U'"},
|
"CT-US-001_wifi_capacity_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_wifi_capacity_test.py",
|
||||||
"CT-US-001_dataplane_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_dataplane_test.py","args":"--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.sta0000 --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: 4 --pull_report --local_lf_report_dir REPORT_PATH --influx_host 192.168.100.201 --influx_port 8086 --influx_org Candela --influx_token=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ== --influx_bucket lanforge_qa_testing --influx_tag testbed CT-US-001 "},
|
"args":"--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_BED --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_NAME"},
|
||||||
"GHOST":{"enabled":"TRUE","load_db":"skip","command":"ghost_profile.py","args":"--ghost_token 60df4b0175953f400cd30650:d50e1fabf9a9b5d3d30fe97bc3bf04971d05496a89e92a169a0d72357c81f742 --ghost_host 192.168.100.153 --authors LANForge --grafana_host 192.168.100.201 --grafana_token eyJrIjoiS1NGRU8xcTVBQW9lUmlTM2dNRFpqNjFqV05MZkM0dzciLCJuIjoibWF0dGhldyIsImlkIjoxfQ== --parent_folder REPORT_PATH --user_push lanforge --password_push lanforge --customer candela --grafana_bucket lanforge_qa_testing --kpi_to_ghost"}
|
"CT-US-001_dataplane_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_dataplane_test.py",
|
||||||
|
"args":"--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":"--ghost_token BLOG_TOKEN --ghost_host BLOG_HOST --authors BLOG_AUTHORS --customer BLOG_CUSTOMER --user_push BLOG_USER_PUSH --password BLOG_PASSWROD_PUSH BLOG_FLAG --grafana_token DASHBOARD_TOKEN --grafana_host DASHBOARD_HOST --grafana_bucket DASHBOARD_BUCKET --parent_folder REPORT_PATH --influx_host DATABASE_HOST --influx_org DATABASE_ORT --influx_token=DATABASE_TOKEN --influx_bucket DATABASE_BUCKET --influx_tag DATABASE_TAG "}
|
||||||
},
|
},
|
||||||
"suite_wc_dp":{
|
"suite_wc_dp":{
|
||||||
"CT-US-001_wifi_capacity_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_wifi_capacity_test.py","args":"--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 CT-US-001 --influx_host 192.168.100.201 --influx_port 8086 --influx_org Candela --influx_token=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ== --influx_bucket lanforge_qa_testing --influx_tag testbed CT-US-001 --set DUT_NAME ASUSRT-AX88U"},
|
"CT-US-001_wifi_capacity_ATH10K(9984)":{"enabled":"TRUE","load_db":"skip","command":"lf_wifi_capacity_test.py","args":"--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 CT-US-001 --influx_host 192.168.100.201 --influx_port 8086 --influx_org Candela --influx_token=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ== --influx_bucket lanforge_qa_testing --influx_tag testbed CT-US-001 --set DUT_NAME ASUSRT-AX88U"},
|
||||||
|
|||||||
@@ -134,32 +134,36 @@ class lf_check():
|
|||||||
self.lf_mgr = ""
|
self.lf_mgr = ""
|
||||||
self.lf_mgr_port = ""
|
self.lf_mgr_port = ""
|
||||||
|
|
||||||
|
#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 database configuration
|
# database configuration # database
|
||||||
self.influx_json = ""
|
self.database_json = ""
|
||||||
self.influx_config = False
|
self.database_config = False
|
||||||
self.influx_host = ""
|
self.database_host = "c7-grafana.candelatech.com" # influx and grafana have the same host "192.168.100.201"
|
||||||
self.influx_port = ""
|
self.database_port = "8086"
|
||||||
self.influx_org = ""
|
self.database_token = "-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ=="
|
||||||
self.influx_token = ""
|
self.database_org = "Candela"
|
||||||
self.influx_bucket = ""
|
self.database_bucket = "lanforge_qa_testing"
|
||||||
self.influx_tag = ""
|
self.database_tag = 'testbed CT-US-001' # due to the space will need to single quote below
|
||||||
|
self.dut_name = 'DUT_NAME ASUSRT-AX88U' # note the name will be set as --set DUT_NAME ASUSRT-AX88U
|
||||||
|
|
||||||
|
# grafana configuration #dashboard
|
||||||
|
self.dashboard_json = ""
|
||||||
|
self.dashboard_host = "c7-grafana.candelatech.com" # 192.168.100.201
|
||||||
|
self.dashboard_token = "eyJrIjoiS1NGRU8xcTVBQW9lUmlTM2dNRFpqNjFqV05MZkM0dzciLCJuIjoibWF0dGhldyIsImlkIjoxfQ=="
|
||||||
|
|
||||||
|
# ghost configuration
|
||||||
|
self.blog_json = ""
|
||||||
|
self.blog_config = False
|
||||||
|
self.blog_host = "192.168.100.153"
|
||||||
|
self.blog_token = "60df4b0175953f400cd30650:d50e1fabf9a9b5d3d30fe97bc3bf04971d05496a89e92a169a0d72357c81f742"
|
||||||
|
self.blog_authors = "Matthew"
|
||||||
|
self.blog_customer = "candela"
|
||||||
|
self.blog_user_push = "lanforge"
|
||||||
|
self.blog_password_push = "lanforge"
|
||||||
|
self.blog_flag = "--kpi_to_ghost"
|
||||||
|
|
||||||
# ghost configuration
|
|
||||||
self.ghost_json = ""
|
|
||||||
self.ghost_config = False
|
|
||||||
self.ghost_token = ""
|
|
||||||
self.ghost_host = ""
|
|
||||||
self.grafana_host = ""
|
|
||||||
self.grafana_token = ""
|
|
||||||
self.parent_folder = ""
|
|
||||||
self.server = ""
|
|
||||||
self.user_push = ""
|
|
||||||
self.password_push = ""
|
|
||||||
self.customer = ""
|
|
||||||
self.user_pull = ""
|
|
||||||
self.password_pull = ""
|
|
||||||
self.grafana_dashboard = ""
|
|
||||||
self.test_run = ""
|
self.test_run = ""
|
||||||
|
|
||||||
# NOT complete : will send the email results
|
# NOT complete : will send the email results
|
||||||
@@ -598,7 +602,7 @@ NOTE: for now to see stdout and stderr remove /home/lanforge from path.
|
|||||||
self.logger.info("test: {} skipped".format(test))
|
self.logger.info("test: {} skipped".format(test))
|
||||||
# load the default database
|
# load the default database
|
||||||
elif self.test_dict[test]['enabled'] == "TRUE":
|
elif self.test_dict[test]['enabled'] == "TRUE":
|
||||||
# make the command replace ment a separate method call.
|
# Configure Tests
|
||||||
# loop through radios
|
# loop through radios
|
||||||
for radio in self.radio_dict:
|
for radio in self.radio_dict:
|
||||||
# replace RADIO, SSID, PASSWD, SECURITY with actual config values (e.g. RADIO_0_CFG to values)
|
# replace RADIO, SSID, PASSWD, SECURITY with actual config values (e.g. RADIO_0_CFG to values)
|
||||||
@@ -640,6 +644,44 @@ NOTE: for now to see stdout and stderr remove /home/lanforge from path.
|
|||||||
if 'REPORT_PATH' in self.test_dict[test]['args']:
|
if 'REPORT_PATH' in self.test_dict[test]['args']:
|
||||||
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('REPORT_PATH',self.report_path)
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('REPORT_PATH',self.report_path)
|
||||||
|
|
||||||
|
# database configuration
|
||||||
|
if 'DATABASE_HOST' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DATABASE_HOST',self.database_host)
|
||||||
|
if 'DATABASE_PORT' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DATABASE_PORT',self.database_port)
|
||||||
|
if 'DATABASE_TOKEN' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DATABASE_TOKEN',self.database_token)
|
||||||
|
if 'DATABASE_ORG' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DATABASE_ORG',self.database_org)
|
||||||
|
if 'DATABASE_BUCKET' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DATABASE_BUCKET',self.database_org)
|
||||||
|
if 'DATABASE_TAG' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DATABASE_TAG',self.database_tag)
|
||||||
|
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)
|
||||||
|
|
||||||
|
# dashboard configuration
|
||||||
|
if 'DASHBOARD_HOST' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DASHBOARD_HOST',self.dashboard_host)
|
||||||
|
if 'DASHBOARD_TOKEN' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DASHBOARD_TOKEN',self.dashboard_token)
|
||||||
|
|
||||||
|
# blog configuration
|
||||||
|
if 'BLOG_HOST' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('BLOG_HOST',self.blog_host)
|
||||||
|
if 'BLOG_TOKEN' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('BLOG_TOKEN',self.blog_token)
|
||||||
|
if 'BLOG_AUTHORS' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('BLOG_AUTHORS',self.blog_authors)
|
||||||
|
if 'BLOG_CUSTOMER' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('BLOG_CUSTOMER',self.blog_customer)
|
||||||
|
if 'BLOG_USER_PUSH' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('BLOG_USER_PUSH',self.blog_user_push)
|
||||||
|
if 'BLOG_PASSWORD_PUSH' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('BLOG_PASSWORD_PUSH',self.blog_password_push)
|
||||||
|
if 'BLOG_FLAG' in self.test_dict[test]['args']:
|
||||||
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('BLOG_FLAG',self.blog_flag)
|
||||||
|
|
||||||
if 'load_db' in self.test_dict[test]:
|
if 'load_db' in self.test_dict[test]:
|
||||||
self.logger.info("load_db : {}".format(self.test_dict[test]['load_db']))
|
self.logger.info("load_db : {}".format(self.test_dict[test]['load_db']))
|
||||||
if str(self.test_dict[test]['load_db']).lower() != "none" and str(self.test_dict[test]['load_db']).lower() != "skip":
|
if str(self.test_dict[test]['load_db']).lower() != "none" and str(self.test_dict[test]['load_db']).lower() != "skip":
|
||||||
|
|||||||
Reference in New Issue
Block a user