moving nolonger used tools/*.json to scripts debrecated

Signed-off-by: smileyrekiere <smileyrekiere@gmail.com>
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
smileyrekiere
2021-08-16 09:26:53 -06:00
committed by Chuck SmileyRekiere
parent 051f82950d
commit e4ca8851a3
5 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
#!/bin/bash
# This bash script creates/updates a DUT, creates/updates a chamberview scenario,
# loads and builds that scenario, runs wifi capacity test, and saves the kpi.csv info
# into influxdb. As final step, it builds a grafana dashboard for the KPI information.
set -x
# Define some common variables. This will need to be changed to match your own testbed.
# MGR is LANforge GUI machine
MGR=192.168.100.116
#MGR=localhost
# Candela internal influx
INFLUXTOKEN=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ==
INFLUX_HOST=192.168.100.201
INFLUX_BUCKET=lanforge_qa_testing
INFLUX_ORG=Candela
GRAFANATOKEN=eyJrIjoiS1NGRU8xcTVBQW9lUmlTM2dNRFpqNjFqV05MZkM0dzciLCJuIjoibWF0dGhldyIsImlkIjoxfQ==
GRAFANA_HOST=192.168.100.201
GROUP_FILE=/tmp/lf_cv_rpt_filelocation.txt
TESTBED=CT_US-001
DUT=ASUSRT-AX88U
UPSTREAM=eth2
#LF_WAN_PORT=eth3
MGR_PORT=8080
if [ -f $HOME/influx_vars.sh ]
then
# Put private keys and other variable overrides in here.
. $HOME/influx_vars.sh
fi
# Create/update new DUT.
#Replace my arguments with your setup. Separate your ssid arguments with spaces and ensure the names are lowercase
echo "Make new DUT"
./create_chamberview_dut.py --lfmgr ${MGR} --port ${MGR_PORT} --dut_name ${DUT} \
--ssid "ssid_idx=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 0001 --model_num 88R
# Create/update chamber view scenario and apply and build it.
# Easiest way to get these lines is to build it in the GUI and then
# copy/tweak what it shows in the 'Text Output' tab after saving and re-opening
# the scenario.
echo "Build Chamber View Scenario"
#change the lfmgr to your system, set the radio to a working radio on your LANforge system, same with the ethernet port.
./create_chamberview.py --lfmgr ${MGR} --port ${MGR_PORT} --delete_scenario \
--create_scenario ucentral-scenario \
--raw_line "profile_link 1.1 STA-AC 1 'DUT: $DUT Radio-1' NA wiphy1,AUTO -1 NA" \
--raw_line "profile_link 1.1 STA-AC 1 'DUT: $DUT Radio-1' NA wiphy3,AUTO -1 NA" \
--raw_line "profile_link 1.1 upstream-dhcp 1 NA NA $UPSTREAM,AUTO -1 NA" \
# Run capacity test on the stations created by the chamber view scenario.
# Submit the KPI data into the influxdb.
#config_name doesn't matter, change the influx_host to your LANforge device,
# NOTE: My influx token is unlucky and starts with a '-', but using the syntax below
# with '=' right after the argument keyword works as hoped.
echo "run wifi capacity test"
./lf_wifi_capacity_test.py --config_name Custom --pull_report --influx_host ${INFLUX_HOST} \
--influx_port 8086 --influx_org ${INFLUX_ORG} --influx_token=${INFLUXTOKEN} --influx_bucket ${INFLUX_BUCKET} --mgr ${MGR} \
--port ${MGR_PORT} \
--instance_name testing --upstream 1.1.$UPSTREAM --test_rig ${TESTBED} --graph_groups ${GROUP_FILE} \
--batch_size "100" --protocol "TCP-IPv4" --duration 20000 --pull_report
# Build grafana dashboard and graphs view for the KPI in the capacity test.
#echo "Adding grafana dashboard"
#./grafana_profile.py --create_custom --title ${TESTBED} --influx_bucket ${INFLUX_BUCKET} --grafana_token ${GRAFANATOKEN} \
# --grafana_host ${GRAFANA_HOST} --testbed ${TESTBED} --graph-groups ${GROUPS} --scripts Dataplane --scripts 'WiFi Capacity'
rm ${GROUP_FILE}

View File

@@ -0,0 +1,135 @@
{
"script_qa":{
"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_IP in the test below is replaced by the json lf_mgr_ip",
"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_bed": "CT-US-001_QA",
"lf_mgr_ip": "192.168.100.116",
"lf_mgr_port": "8080",
"dut_name": "ASUSRT-AX88U",
"dut_bssid_5G": "3c:7c:3f:55:4d:64",
"dut_sw": "3.0.0.4.386_42820",
"test_timeout": 300,
"load_blank_db": false,
"load_factory_default_db": true,
"load_custom_db": false,
"custom_db": "DFLT_ETH1_GEN",
"email_list_production": "konikofi@candelatech.com,greearb@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,jreynolds@candelatech.com",
"host_ip_production": "192.168.100.201",
"email_list_test": "chuck.rekiere@candelatech.com,logan.lipke@candelatech.com",
"host_ip_test": "192.168.100.201",
"email_title_txt": "Lanforge Script QA Testing CT-US-001",
"email_txt": "Lanforge Script QA Testing CT-US-001 "
},
"test_network":{
"http_test_ip": "10.40.0.10",
"ftp_test_ip": "10.40.0.10",
"test_ip": "192.168.0.104"
},
"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_0_CFG":{"KEY":"RADIO_0_CFG","RADIO":"wiphy0","STATIONS":"4","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"}
},
"test_suites":{
"suite_short":{
"create_l3":{"enabled":"TRUE","command":"create_l4.py","args":"--radio RADIO_USED --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED --debug"},
"test_l3_longevity":{"enabled":"TRUE","command":"test_l3_longevity.py","args":"--test_duration 15s --polling_interval 5s --upstream_port eth1 --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_l3":{
"test_l3_longevity":{"enabled":"TRUE","load_db":"NONE","command":"test_l3_longevity.py","args":"--test_duration 15s --polling_interval 5s --upstream_port eth1 --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_daily":{
"test_l3_longevity":{
"enabled":"TRUE",
"load_db":"NONE",
"command":"test_l3_longevity.py",
"args":"",
"args_list":[
" --test_duration 15s --polling_interval 5s --upstream_port UPSTREAM_PORT",
" --radio 'radio==RADIO_USED,stations==4,ssid==SSID_USED,ssid_pw==SSID_PS_USED,security==SECURITY_USED'",
" --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"
]
},
"example_security_connection0":{
"enabled":"TRUE",
"command":"example_security_connection.py",
"args":"",
"args_list":[
" --num_stations 4 --ssid SSID_USED --passwd SSID_PW_USED --radio RADIO_USED --security SECURITY_USED --debug"
]
},
"sta_connect2":{
"enabled":"TRUE",
"command":"sta_connect2.py",
"args":" --dut_ssid SSID_USED --dut_passwd SSID_PW_USED --dut_security SECURITY_USED"
},
"test_fileio":{
"enabled":"TRUE",
"command":"test_fileio.py",
"args":"",
"args_list":[
" --macvlan_parent eth2 --num_ports 3 --use_macvlans --first_mvlan_ip 192.168.92.13",
" --netmask 255.255.255.0 --test_duration 30s --gateway 192.168.92.1"
]
},
"test_ip_connection-ipv4":{
"enabled":"TRUE",
"command":"test_ip_connection.py",
"args":"--radio RADIO_USED --num_stations 4 --ssid SSID_USED --passwd SSID_PS_USED --security SECURITY_USED --debug"},
"test_ip_variable_time0-ipv4":{
"enabled":"TRUE",
"command":"test_ip_variable_time.py",
"args":"",
"args_list":[
" --radio RADIO_USED --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"
]
},
"test_ip_variable_time1-ipv4":{"enabled":"TRUE","command":"test_ip_variable_time.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --test_duration 15s --output_format csv --layer3_cols name,tx_bytes,rx_bytes,dropped --traffic_type lf_udp --debug"},
"test_ip_connection-ipv6":{"enabled":"FALSE","command":"test_ip_connection.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --ipv6 --debug"},
"test_ip_variable_time0-ipv6":{"enabled":"TRUE","command":"test_ip_variable_time.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --test_duration 15s --output_format excel --layer3_cols name,tx_bytes,rx_bytes,dropped --ipv6 --traffic_type lf_udp --debug"},
"test_ip_variable_time1-ipv6":{"enabled":"TRUE","command":"test_ip_variable_time.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --test_duration 15s --output_format csv --layer3_cols name,tx_bytes,rx_bytes,dropped --ipv6 --traffic_type lf_udp --debug"},
"test_l4_bytes-rd":{"enabled":"TRUE","command":"test_l4.py","args":"--radio wiphy1 --num_stations 4 --security wpa2 --ssid asus11ax-5 --passwd hello123 --test_type bytes-rd --test_duration 15s --url 'dl http://10.40.0.1 /dev/null' --debug"},
"test_l4_bytes-wr":{"enabled":"FALSE","command":"test_l4.py","args":"--radio wiphy1 --num_stations 4 --security wpa2 --ssid asus11ax-5 --passwd hello123 --test_type bytes-wr --test_duration 15s --url 'ul http://10.40.0.1' --debug"},
"test_l4_urls_s":{"enabled":"TRUE","command":"test_l4.py","args":"--radio wiphy1 --num_stations 4 --security wpa2 --ssid asus11ax-5 --passwd hello123 --test_type urls --test_duration 15s --requests_per_ten 600 --target_per_ten 600 --url 'dl http://10.40.0.1 /dev/null' --debug"},
"test_l4_ftp_bytes-rd":{"enabled":"TRUE","command":"test_l4.py","args":"--radio wiphy1 --num_stations 4 --security wpa2 --ssid asus11ax-5 --passwd hello123 --ftp --test_type bytes-rd --test_duration 15s --url 'dl ftp://10.40.0.1 /dev/null' --debug"},
"test_l4_ftp_bytes-wr":{"enabled":"FALSE","command":"test_l4.py","args":"--radio wiphy1 --num_stations 4 --security wpa2 --ssid asus11ax-5 --passwd hello123 --ftp --test_type bytes-wr --test_duration 15s --url 'ul ftp://10.40.0.1' --debug"},
"test_l4_ftp_urls_s":{"enabled":"TRUE","command":"test_l4.py","args":"--radio wiphy1 --num_stations 4 --security wpa2 --ssid asus11ax-5 --passwd hello123 --ftp --test_type urls --requests_per_ten 600 --target_per_ten 600 --test_duration 15s --url 'dl ftp://10.40.0.1 /dev/null' --debug"},
"test_l3_longevity_1":{"enabled":"TRUE","command":"test_l3_longevity.py","args":"--test_duration 15s --polling_interval 5s --upstream_port eth2 --radio 'radio==wiphy0,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_powersave_traffic":{"enabled":"TRUE","command":"test_l3_powersave_traffic.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --debug"},
"test_status_msg":{"enabled":"TRUE","command":"test_status_msg.py","args":"--action run_test"},
"test_wanlink":{"enabled":"TRUE","command":"test_wanlink.py","args":"--debug"},
"create_bridge":{"enabled":"TRUE","command":"create_bridge.py","args":"--radio wiphy1 --upstream_port eth2 --target_device sta0000 --debug"},
"create_l3":{"enabled":"TRUE","command":"create_l3.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --debug"},
"create_l4":{"enabled":"TRUE","command":"create_l4.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --debug"},
"create_macvlan":{"enabled":"TRUE","command":"create_macvlan.py","args":"--radio wiphy1 --macvlan_parent eth2 --debug"},
"create_station":{"enabled":"TRUE","command":"create_station.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --debug"},
"create_vap":{"enabled":"TRUE","command":"create_vap.py","args":"--radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --debug"},
"create_qvlan":{"enabled":"TRUE","command":"create_qvlan.py","args":"--radio wiphy1 --qvlan_parent eth2"},
"wlan_capacity_calculator1":{"enabled":"TRUE","command":"./wlan_capacity_calculator.py","args":"-sta 11abg -t Voice -p 48 -m 106 -e WEP -q Yes -b 1 2 5.5 11 -pre Long -s N/A -co G.711 -r Yes -c Yes"},
"wlan_capacity_calculator2":{"enabled":"TRUE","command":"./wlan_capacity_calculator.py","args":"-sta 11n -t Voice -d 17 -ch 40 -gu 800 -high 9 -e WEP -q Yes -ip 5 -mc 42 -b 6 9 12 24 -m 1538 -co G.729 -pl Greenfield -cw 15 -r Yes -c Yes"},
"wlan_capacity_calculator3":{"enabled":"TRUE","command":"./wlan_capacity_calculator.py","args":"-sta 11ac -t Voice -d 9 -spa 3 -ch 20 -gu 800 -high 1 -e TKIP -q Yes -ip 3 -mc 0 -b 6 12 24 54 -m 1518 -co Greenfield -cw 15 -rc Yes"}
}
}
}

View File

@@ -0,0 +1,80 @@
# NAME :
# lf_check_config_template.ini
# PURPOSE :
# The lf_check_config_template.ini is a template to be copied to the test configuration file : lf_check_config.ini which
# is used by the lf_check.py.
# The lf_check_config_template.in is devided into section that are used for test selection, test configuration or configuration of lanforge.
# Test arguments for the test do not need to use the pre-defined values. The command arguments can be entered directly.
# SETUP:
# Copy lf_check_config_template.ini to lf_check_config.ini
# 1. Update the lf_check_config.ini with the tests to be run by setting the enable flag to TRUE
# 2. TEST_DICTIONARY contains the test list: test key, test name, test arguments
# NOTE: each test dictionary key must be unique
# NOTE: { } placement important, will cause parcing errors
# NO quotes around parameters in TEST_PARAMETERS section
[TEST_PARAMETERS]
TEST_TIMEOUT = 200
LOAD_BLANK_DB = FALSE
LOAD_FACTORY_DEFAULT_DB = TRUE
LOAD_CUSTOM_DB = FALSE
CUSTOM_DB = DFLT_ETH1_GEN
EMAIL_LIST_PRODUCTION = chuck.rekiere@candelatech.com
HOST_IP_PRODUCTION = 192.168.95.6
EMAIL_LIST_TEST = chuck.rekiere@candelatech.com
HOST_IP_TEST = 192.168.95.6
# Command line arguments: Configures network information used as inputs to test command line
[TEST_NETWORK]
HTTP_TEST_IP = "10.40.0.10"
FTP_TEST_IP = "10.40.0.10"
TEST_IP = "192.168.0.104"
# Command line arguments: LANForge configuration
# Also can use for single lanforge radio configuraiton , the RADIO_DICT may also be used for radio configuration
[TEST_GENERIC]
RADIO_USED = wiphy1
SSID_USED = ct523c-vap
SSID_PW_USED = ct523c-vap
SECURITY_USED = wpa2
NUM_STA = 4
COL_NAMES = name,tx_bytes,rx_bytes,dropped
UPSTREAM_PORT = eth1
# Command line arguments
# radio configuraiton may also be done in the TEST_GENEERIC arguments
# NOTE: KEY must match ELEMENT of the DICTIONARY (RADIO_1_CFG == "KEY":"RADIO_1_CFG")
[RADIO_DICTIONARY]
RADIO_DICT: {
"RADIO_0_CFG":{"KEY":"RADIO_0_CFG","RADIO":"wiphy0","STATIONS":"4","SSID":"ct523c-vap","PASSWD":"ct523c-vap","SECURITY":"wpa2"},
"RADIO_1_CFG":{"KEY":"RADIO_1_CFG","RADIO":"wiphy1","STATIONS":"4","SSID":"ct523c-vap","PASSWD":"ct523c-vap","SECURITY":"wpa2"}
}
[LF_MGR]
LF_MGR_IP= localhost
LF_MGR_PORT=8080
# REPORTS are in /home/lanforge/html-reports
# if /home/lanforge/html-reports not present then reports stored in local directory
[TEST_DICTIONARY]
TEST_DICT: {
"create_l3":{"enabled":"TRUE","command":"create_l4.py","args":"--radio RADIO_USED --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED --debug"},
"create_l4":{"enabled":"TRUE","command":"create_l4.py","args":"RADIO_1_CFG --debug"},
# the name needs to be unique for the dictionary
"create_l4_2":{"enabled":"TRUE","command":"create_l4.py","args":"--radio wiphy1 --ssid ct523c-vap --passwd ct523c-vap --security wpa2 --debug"}
}
[SUITE]
TEST_DICT: {
"create_l3":{"enabled":"TRUE","load_db":"none","command":"create_l4.py","args":"--radio RADIO_USED --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED --debug"},
"create_l4":{"enabled":"TRUE","command":"create_l4.py","args":"RADIO_1_CFG --debug"},
# the name needs to be unique for the dictionary
"create_l4_2":{"enabled":"TRUE","command":"create_l4.py","args":"--radio wiphy1 --ssid ct523c-vap --passwd ct523c-vap --security wpa2 --debug"}
}

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env python3
'''
NAME: <file name>
PURPOSE:
<what does the script do>
EXAMPLE:
<example of how to run the script command line parameters>
SETUP:
<special setup to run the sript>
NOTES:
<Include setup, other information that would be helpful to the user>
COPYRIGHT:
Copyright 2021 Candela Technologies Inc
INCLUDE_IN_README
'''