Merge ../lanforge-scripts

This commit is contained in:
shivamcandela
2021-12-15 23:33:41 +05:30
19 changed files with 1298 additions and 443 deletions

View File

@@ -1,268 +1,63 @@
# LANForge Python Scripts
This directory contains python scripts useful for unit-tests. It uses libraries in ../py-json. Please place new tests in this directory. Unless they are libraries, please avoid adding python scripts to ../py-json. Please read https://www.candelatech.com/cookbook/cli/json-python to learn about how to use the LANforge client JSON directly. Review http://www.candelatech.com/scripting_cookbook.php to understand more about scripts in general.
This directory contains python scripts to intract with LANforge Wifi and Ethernet Traffic Generators for testing Access Points and other Wifi networks.
## LANforge Python Scripts in py-scripts General Classifications
* create_ - creates network element in LANforge wiphy radio
* lf_ or test_ - performs a test against an Access Point or Wifi network
* other files are various utilities
## Still not sure what the script does ?
* LANforge scripts support --help , to provide a more detailed description of scripts functionality
## LANforge Python Scripts Directory Structure
* py-scripts - configuration, unit test, module, and library scripts
* cv_examples - bash scripts for ochastrating Chamberview tests
* py-json - core libraries providing direct intraction with LANforge Traffic Generator
* py-json/LANforge - JSON intraction with LANforge Traffic Generator.
* lanforge_client/ - alpha version of JSON interface to LANforge Traffic Generator.
## Where is the create_basic_argparse and create_bare_argsparse?
* py-json/LANforge/lfcli_base.py
## Updating scripts python library dependencies
* for F27 systems from lanforge-scripts run: `pip3 install --user -r python.3.6.requirements.txt --upgrade`
* from lanforge-scripts run: `pip3 install --user -r requirements.txt --upgrade`
## Scripts accessing Serial ports.
* to access serial ports add user to `dialout` and `tty` groups to gain access to serial ports without needing root access.
* Most scripts run in user space to use the installed python package and not affect the os python packages.
## References
* https://www.candelatech.com/cookbook/cli/json-python
* http://www.candelatech.com/scripting_cookbook.php
# Getting Started
The first step is to make sure all dependencies are installed in your system by running update_deps.py in this folder.
The first step is to make sure all dependencies are installed in your system.
Please consider using the `LFCliBase` class as your script superclass. It will help you with a consistent set of JSON handling methods and pass and fail methods for recording test results. Below is a sample snippet that includes LFCliBase:
if 'py-json' not in sys.path:
sys.path.append('../py-json')
from LANforge import LFUtils
from LANforge import lfcli_base
from LANforge.lfcli_base import LFCliBase
from LANforge.LFUtils import *
import realm
from realm import Realm
class Eggzample(LFCliBase):
def __init__(self, lfclient_host, lfclient_port):
super().__init__(lfclient_host, lfclient_port, debug=True)
def main():
eggz = Eggzample("http://localhost", 8080)
frontpage_json = eggz.json_get("/")
pprint.pprint(frontpage_json)
data = {
"message": "hello world"
}
eggz.json_post("/cli-json/gossip", data, debug_=True)
if __name__ == "__main__":
main()
The above example will stimulate output on the LANforge client websocket `ws://localhost:8081`. You can monitor system activity over that channel.
## Useful URIs:
* /: provides version information and a list of supported URIs
* /DUT/: Device Under Test records
* /alerts/: port or connection alerts
* /cli-form: post multi-part form data to this URI
* /cli-json: post JSON data to this URI
* /help: list of CLI commands and refence links
* /help/set_port: each CLI command has a command composer
* /cx: connections
* /endp: endpoints that make up connections
* /gui-cli: post multi-part form data for GUI automation
* /gui-json: post JSON data to this URI for GUI automation
* /port: list ports and stations, oriented by shelf, resource and name: `/port/1/1/eth0` is typically your management port
* /stations: entities that are associated to your virtual access points (vAP)
There are more URIs you can explore, these are the more useful ones.
#### Scripts included are:
* `cicd_TipIntegration.py`: battery of TIP tests that include upgrading DUT and executing sta_connect script
* `cicd_testrail.py`:
* `function send_get`: Issues a GET request (read) against the API.
* `function send_post`: Issues a write against the API.
* `function __send_request`:
* `function get_project_id`: Gets the project ID using the project name
* `function get_run_id`: Gets the run ID using test name and project name
* `function update_testrail`: Update TestRail for a given run_id and case_id
* `cicd_testrailAndInfraSetup.py`:
* class `GetBuild`:
* function `get_latest_image`: extract a tar file from the latest file name from a URL
* function run_`opensyncgw_in_docker`:
* function `run_opensyncgw_in_aws`:
* class `openwrt_linksys`:
* function `ap_upgrade`: transfers file from local host to remote host. Upgrade access point with new information (?)
* class `RunTest`:
* function `TestCase_938`: checks single client connectivity
* function `TestCase_941`: checks for multi-client connectivity
* function `TestCase_939`: checks for client count in MQTT log and runs the clients (?)
* `run_cv_scenario.py`:
* class `RunCvScenario`: imports the LFCliBase class.
* function `get_report_file_name`: returns report name
* function `build`: loads and sends the ports available?
* function `start`: /gui_cli takes commands keyed on 'cmd' and this function create an array of commands
* `sta_connect.py`: This function creates a station, create TCP and UDP traffic, run it a short amount of time,
and verify whether traffic was sent and received. It also verifies the station connected
to the requested BSSID if bssid is specified as an argument.
The script will clean up the station and connections at the end of the test.
* class `StaConnect(LFCliBase)`:
* function `get_realm`: returns the local realm
* function `get_station_url`:
* function `get_upstream_url`:
* function `compare_vals`: compares pre-test values to post-test values
* function `remove_stations`: removes all stations
* function `num_associated`:
* function `clear_test_results`:
* function `run`:
* function `setup`:
* function `start`:
* function `stop`:
* function `finish`:
* function `cleanup`:
* function `main`:
* `sta_connect2.py`: This will create a station, create TCP and UDP traffic, run it a short amount of time,
and verify whether traffic was sent and received. It also verifies the station connected
to the requested BSSID if bssid is specified as an argument. The script will clean up the station and connections at the end of the test.
* function `get_realm`: returns local realm
* function `get_station_url`:
* function `get_upstream_url`:
* function `compare_vals`: compares pre-test values to post-test values
* function `remove_stations`: removes all ports
* function `num_associated`:
* function `clear_test_results`
* function `setup`: verifies upstream url, creates stations and turns dhcp on, creates endpoints,
UDP endpoints,
* function `start`:
* function `stop`:
* function `cleanup`:
* function `main`:
* `sta_connect_example.py`: example of how to instantiate StaConnect and run the test
* `sta_connect_multi_example.py`: example of how to instantiate StaConnect and run the test and create multiple OPEN stations,have
some stations using WPA2
* `stations_connected.py`: Contains examples of using realm to query stations and get specific information from them
* `test_ipv4_connection.py`: This script will create a variable number of stations that will attempt to connect to a chosen SSID using a provided password and security type.
The test is considered passed if all stations are able to associate and obtain IPV4 addresses
* class `IPv4Test`
* function `build`: This function will use the given parameters (Number of stations, SSID, password, and security type) to create a series of stations.
* function `start`: This function will admin-up the stations created in the build phase. It will then check all stations periodically for association and IP addresses.
This will continue until either the specified timeout has been reached or all stations obtain an IP address.
* function `stop`: This function will admin-down all stations once one of the ending criteria is met.
* function `cleanup`: This function will clean up all stations created during the test.
* command line options :
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_ipv6_connection.py`: This script will create a variable number of stations that will attempt to connect to a chosen SSID using a provided password and security type.
The test is considered passed if all stations are able to associate and obtain IPV6 addresses
* class `IPv6Test`
* function `build`: This function will use the given parameters (Number of stations, SSID, password, and security type) to create a series of stations.
* function `start`: This function will admin-up the stations created in the build phase. It will then check all stations periodically for association and IP addresses.
This will continue until either the specified timeout has been reached or all stations obtain an IP address.
* function `stop`: This function will admin-down all stations once one of the ending criteria is met.
* function `cleanup`: This function will clean up all stations created during the test.
* Command line options :
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_l3_unicast_traffic_gen.py`: This script will create stations, create traffic between upstream port and stations, run traffic.
The traffic on the stations will be checked once per minute to verify that traffic is transmitted and received.
Test will exit on failure of not receiving traffic for one minute on any station.
* class `L3VariableTimeLongevity`
* function `build`: This function will create a group of stations and cross connects that are used in the test.
* function `start`: This function will admin-up all stations and start traffic over the cross-connects. Values in the cross-connects
will be checked every minute to verify traffic is transmitted and received.
* function `stop`: This function will stop all cross-connects from generating traffic and admin-down all stations.
* function `cleanup`: This function will cleanup all cross-connects and stations created during the test.
* Command line options:
* `-d, --test_duration`: Determines the total length of the test. Consists of number followed by letter indicating length
10m would be 10 minutes or 3d would be 3 days. Available options for length are Day (d), Hour (h), Minute (m), or Second (s)
* `-t, --endp_type`: Specifies type of endpoint to be used in the test. Options are lf_udp, lf_udp6, lf_tcp, lf_tcp6
* `-u, --upstream_port`: This is the upstream port to be used for traffic. An upstream port is some data source on the wired LAN or WAN beyond the AP
* `-r, --radio`: This switch will determine the radio name, number of stations, ssid, and ssid password. Security type is fixed at WPA2.
Usage of this switch could look like: `--radio wiphy1 64 candelaTech-wpa2-x2048-5-3 candelaTech-wpa2-x2048-5-3`
* `test_ipv4_l4_urls_per_ten.py`: This script measure the number of urls per ten minutes over layer 4 traffic
* class `IPV4L4`
* function `build`: This function will create all stations and cross-connects to be used in the test
* function `start`: This function will admin-up stations and start all traffic over the cross-connects. It will then measure the amount of traffic that passed through
the cross-connects every ten minutes. These values are compared to 90% of the chosen target traffic per ten minutes. If this value is exceeded, a pass will occur,
otherwise, a fail is recorded.
* function `stop`: This function will admin-down stations and stop all traffic.
* function `cleanup`: This function will cleanup any stations or cross-connects associated with the test.
* Command line options:
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--requests_per_ten`: Configures the number of request per ten minutes
* `--num_tests`: Configures the number of tests to be run. Each test runs for ten minutes
* `--url`: Specifies the upload/download, address, and destination. Example: dl http://10.40.0.1 /dev/null
* `--target_per_ten`: Rate of target urls per ten minutes. 90% of this value will be considered the threshold for a passed test.
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
## Example of running a chamber view test
### example from cv_examples/ferndale_ucentral.bash
* ./create_chamberview_dut.py : Replace arguments with your setup. Separate your ssid arguments with spaces and ensure the names are lowercase
* ./create_chamberview_dut.py --lfmgr `${MGR}` --port `${MGR_PORT}` --dut_name `${DUT}` \
--ssid `"ssid_idx=0 ssid=Default-SSID-2g security=WPA2 password=12345678 bssid=c4:41:1e:f5:3f:24"` \
--ssid `"ssid_idx=1 ssid=Default-SSID-5gl security=WPA2 password=12345678 bssid=c4:41:1e:f5:3f:25"` \
--sw_version `"ucentral-01"` --hw_version `ea8450` --serial_num `1001` --model_num `8450`
* ./create_chamberview.py : change the lfmgr to your system, set the radio to a working radio on your LANforge system, same with the ethernet port. 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.
* ./create_chamberview.py --lfmgr `${MGR}` --port `${MGR_PORT}` --delete_scenario \
--create_scenario `ucentral-scenario` \
--raw_line `"profile_link 1.1 STA-AC 50 'DUT: $DUT Radio-1' NA wiphy0,AUTO -1 NA"` \
--raw_line `"profile_link 1.1 STA-AC 50 'DUT: $DUT Radio-1' NA wiphy2,AUTO -1 NA"` \
--raw_line `"profile_link 1.1 STA-AC 50 'DUT: $DUT Radio-2' NA wiphy1,AUTO -1 NA"` \
--raw_line `"profile_link 1.1 STA-AC 46 'DUT: $DUT Radio-2' NA wiphy3,AUTO -1 NA"` \
--raw_line `"profile_link 1.1 upstream-dhcp 1 NA NA $UPSTREAM,AUTO -1 NA" `\
--raw_line `"profile_link 1.1 uplink-nat 1 'DUT: upstream LAN 192.168.100.1/24' NA $LF_WAN_PORT,$UPSTREAM -1 NA"` \
--raw_line `"profile_link 1.1 STA-AC 1 'DUT: $DUT Radio-2' NA ALL-AX,AUTO -1 NA"`
* ./lf_wifi_capacity_test.py : Run capacity test on the stations created by the chamber view scenario.
* ./lf_wifi_capacity_test.py --config_name Custom --pull_report --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`
* `test_ipv4_l4_ftp_urls_per_ten.py`: This script measure the number of urls per ten minutes over layer 4 ftp traffic
* class `IPV4L4`
* function `build`: This function will create all stations and cross-connects to be used in the test
* function `start`: This function will admin-up stations and start all traffic over the cross-connects. It will then measure the amount of traffic that passed through
the cross-connects every ten minutes. These values are compared to 90% of the chosen target traffic per ten minutes. If this value is exceeded, a pass will occur,
otherwise, a fail is recorded.
* function `stop`: This function will admin-down stations and stop all traffic.
* function `cleanup`: This function will cleanup any stations or cross-connects associated with the test.
* Command line options:
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--requests_per_ten`: Configures the number of request per ten minutes
* `--num_tests`: Configures the number of tests to be run. Each test runs for ten minutes
* `--url`: Specifies the upload/download, address, and destination. Example: dl http://10.40.0.1 /dev/null
* `--target_per_ten`: Rate of target urls per ten minutes. 90% of this value will be considered the threshold for a passed test.
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_generic`:
* class `GenTest`: This script will create
* function `build`: This function will create the stations and cross-connects to be used during the test.
* function `start`: This function will start traffic and measure different values dependent on the command chosen.
Commands currently available for use: lfping, generic, and speedtest.
* function `stop`: This function will admin-down stations, stop traffic on cross-connects and cleanup any stations or cross-connects associated with the test.
* function `cleanup`: This function will remove any stations and cross-connects created during the test.
* Command line options:
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--upstream_port`: This is the upstream port to be used for traffic. An upstream port is some data source on the wired LAN or WAN beyond the AP
* `--type`: Specifies type of generic connection to make. (generic, lfping, iperf3-client, speedtest, iperf3-server, lf_curl)
* `--dest`: Specifies the destination for some commands to use
* `--interval`: Specifies the interval between tests in the start function
* `--test_duration`: Specifies the full duration of the test. Consists of number followed by letter indicating length
10m would be 10 minutes or 3d would be 3 days. Available options for length are Day (d), Hour (h), Minute (m), or Second (s)
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_ipv4_variable_time.py`:
* class `IPv4VariableTime`
* function `__set_all_cx_state`:
* function `run_test`:
* function `cleanup`:
* function `run`:
* `test_wanlink.py`:
* class `LANtoWAN`
* function `run_test`:
* function `create_wanlinks`:
* function `run`:
* function `cleanup`:
* `vap_stations_example.py`:
* class `VapStations`
* function `run`:
* function `main`:

View File

@@ -52,7 +52,9 @@ class CreateMacVlan(Realm):
self.mvlan_profile.num_macvlans = int(num_ports)
self.mvlan_profile.desired_macvlans = self.port_list
self.mvlan_profile.macvlan_parent = self.macvlan_parent
self.mvlan_profile.macvlan_parent = self.macvlan_parent[2]
self.mvlan_profile.shelf = self.macvlan_parent[0]
self.mvlan_profile.resource = self.macvlan_parent[1]
self.mvlan_profile.dhcp = dhcp
self.mvlan_profile.netmask = netmask
self.mvlan_profile.first_ip_addr = first_mvlan_ip
@@ -153,6 +155,7 @@ Generic command layout:
default=None)
args = parser.parse_args()
args.macvlan_parent = LFUtils.name_to_eid(args.macvlan_parent)
port_list = []
ip_list = []
if args.first_port is not None and args.use_ports is not None:
@@ -168,12 +171,12 @@ Generic command layout:
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:
int(args.num_ports) > 0) and args.macvlan_parent[2] 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 + "#",
prefix=args.macvlan_parent[2] + "#",
start_id=start_num,
end_id=start_num + num_ports - 1,
padding_number=100000,
@@ -187,7 +190,7 @@ Generic command layout:
if args.use_ports is None:
num_ports = int(args.num_ports)
port_list = LFUtils.port_name_series(
prefix=args.macvlan_parent + "#",
prefix=args.macvlan_parent[2] + "#",
start_id=0,
end_id=num_ports - 1,
padding_number=100000,

View File

@@ -63,12 +63,12 @@ class lf_clean(Realm):
}
super().json_post(req_url, data)
time.sleep(.5)
time.sleep(1)
time.sleep(1)
else:
print("No cross connects found to cleanup")
still_looking_cxs = False
print("clean_cxs still_looking_cxs {cxs_looking}".format(cxs_looking=still_looking_cxs))
if not still_looking_cxs:
if not still_looking_cxs:
self.cxs_done = True
return still_looking_cxs
@@ -98,7 +98,7 @@ class lf_clean(Realm):
print("No endpoints found to cleanup")
still_looking_endp = False
print("clean_endp still_looking_endp {ednp_looking}".format(ednp_looking=still_looking_endp))
if not still_looking_endp:
if not still_looking_endp:
self.endp_done = True
return still_looking_endp
@@ -143,6 +143,17 @@ class lf_clean(Realm):
# print(data)
super().json_post(req_url, data)
time.sleep(.5)
if 'moni' in alias:
info = self.name_to_eid(alias)
req_url = "cli-json/rm_vlan"
data = {
"shelf": info[0],
"resource": info[1],
"port": info[2]
}
# print(data)
super().json_post(req_url, data)
time.sleep(.5)
if 'Unknown' in alias:
info = self.name_to_eid(alias)
req_url = "cli-json/rm_vlan"
@@ -156,29 +167,30 @@ class lf_clean(Realm):
time.sleep(.5)
if ('Unknown' not in alias) and ('wlan' not in alias) and ('sta' not in alias):
still_looking_sta = False
time.sleep(1)
time.sleep(1)
else:
print("No stations found to cleanup")
still_looking_sta = False
still_looking_sta = False
print("clean_sta still_looking_sta {sta_looking}".format(sta_looking=still_looking_sta))
if not still_looking_sta:
if not still_looking_sta:
self.sta_done = True
return still_looking_sta
'''
1: delete cx
2: delete endp
3: delete sta
when deleting sta first, you will end up with phantom CX
'''
def cleanup(self):
if self.clean_cxs:
# also clean the endp when cleaning cxs
still_looking_cxs = self.cxs_clean()
still_looking_endp = self.endp_clean()
print("clean_cxs: still_looking_cxs {looking_cxs} still_looking_endp {looking_endp}".format(looking_cxs=still_looking_cxs,looking_endp=still_looking_endp))
print("clean_cxs: still_looking_cxs {looking_cxs} still_looking_endp {looking_endp}".format(
looking_cxs=still_looking_cxs, looking_endp=still_looking_endp))
if self.clean_endp and not self.clean_cxs:
still_looking_endp = self.endp_clean()
print("clean_endp: still_looking_endp {looking_endp}".format(looking_endp=still_looking_endp))
@@ -187,6 +199,7 @@ class lf_clean(Realm):
still_looking_sta = self.sta_clean()
print("clean_sta: still_looking_sta {looking_sta}".format(looking_sta=still_looking_sta))
def main():
parser = argparse.ArgumentParser(
@@ -228,8 +241,8 @@ python3 ./lf_clean.py --mgr MGR
args = parser.parse_args()
if args.cxs or args.endp or args.sta:
clean = lf_clean(host=args.mgr,clean_cxs=args.cxs,clean_endp=args.endp,clean_sta=args.sta )
print("cleaning cxs: {cxs} endpoints: {endp} stations: {sta} start".format(cxs=args.cxs,endp=args.endp,sta=args.sta))
clean = lf_clean(host=args.mgr, clean_cxs=args.cxs, clean_endp=args.endp, clean_sta=args.sta)
print("cleaning cxs: {cxs} endpoints: {endp} stations: {sta} start".format(cxs=args.cxs, endp=args.endp, sta=args.sta))
if args.cxs:
print("cleaning cxs will also clean endp")
clean.cxs_clean()
@@ -242,7 +255,8 @@ python3 ./lf_clean.py --mgr MGR
# print("Clean cxs_done {cxs_done} endp_done {endp_done} sta_done {sta_done}"
# .format(cxs_done=clean.cxs_done,endp_done=clean.endp_done,sta_done=clean.sta_done))
else:
print("please add option of --cxs ,--endp, or --sta to clean")
print("please add option of --cxs ,--endp, or --sta to clean")
if __name__ == "__main__":
main()

View File

@@ -712,24 +712,24 @@ def main():
FTP Test Script - lf_ftp.py
---------------------------
CLI Example:
./lf_ftp.py --ssid <SSID> --passwd <PASSWORD> --file_sizes 2MB --fiveg_duration 4 --mgr 192.168.1.101 --traffic_duration 2 --security wpa2 --bands 5G --fiveg_radio wiphy1 --directions Download Upload
./lf_ftp.py --ssid <SSID> --passwd <PASSWORD> --file_sizes 2MB --fiveg_duration <MIN> --mgr 192.168.1.101 --traffic_duration <MIN> --security wpa2 --bands 5G --fiveg_radio wiphy1 --directions Download Upload
---------------------------
''')
parser.add_argument('--mgr', help='hostname for where LANforge GUI is running', default='localhost')
parser.add_argument('--mgr_port', help='port LANforge GUI HTTP service is running on', default=8080)
parser.add_argument('--upstream_port', help='non-station port that generates traffic: eg: eth1', default='eth1')
parser.add_argument('--mgr', help='hostname for where LANforge GUI is running [default = localhost]', default='localhost')
parser.add_argument('--mgr_port', help='port LANforge GUI HTTP service is running on [default = 8080]', default=8080)
parser.add_argument('--upstream_port', help='non-station port that generates traffic: eg: eth1 [default = eth1]', default='eth1')
parser.add_argument('--ssid', type=str, help='--ssid')
parser.add_argument('--passwd', type=str, help='--passwd')
parser.add_argument('--security', type=str, help='--security')
parser.add_argument('--ap_name', type=str, help='--ap_name')
parser.add_argument('--ap_ip', type=str, help='--ap_ip')
parser.add_argument('--twog_radio', type=str, help='specify radio for 2.4G clients', default='wiphy1')
parser.add_argument('--fiveg_radio', type=str, help='specify radio for 5G client', default='wiphy0')
parser.add_argument('--twog_radio', type=str, help='specify radio for 2.4G clients [default = wiphy1]', default='wiphy1')
parser.add_argument('--fiveg_radio', type=str, help='specify radio for 5G client [default = wiphy0]', default='wiphy0')
parser.add_argument('--twog_duration', nargs="+", help='Pass and Fail duration for 2.4G band in minutes')
parser.add_argument('--fiveg_duration', nargs="+", help='Pass and Fail duration for 5G band in minutes')
parser.add_argument('--both_duration', nargs="+", help='Pass and Fail duration for Both band in minutes')
parser.add_argument('--traffic_duration', type=int, help='duration for layer 4 traffic running')
parser.add_argument('--ssh_port', type=int, help="specify the shh port eg 22", default=22)
parser.add_argument('--traffic_duration', type=int, help='duration for layer 4 traffic running in minutes')
parser.add_argument('--ssh_port', type=int, help="specify the shh port: eg 22 [default = 22]", default=22)
# Test variables
parser.add_argument('--bands', nargs="+", help='--bands defaults ["5G","2.4G","Both"]',
@@ -738,7 +738,7 @@ CLI Example:
default=["Download", "Upload"])
parser.add_argument('--file_sizes', nargs="+", help='--File Size defaults ["2MB","500MB","1000MB"]',
default=["2MB", "500MB", "1000MB"])
parser.add_argument('--num_stations', type=int, help='--num_stations is number of stations', default=40)
parser.add_argument('--num_stations', type=int, help='--num_stations is number of stations [default = 40 stations]', default=40)
args = parser.parse_args()

View File

@@ -1,13 +1,11 @@
#!/usr/bin/env python3
"""
This script will create 40 clients on 5Ghz , 2.4Ghz and Both and generate layer4 traffic on LANforge ,The Webpage Download Test is designed to test the performance of the Access Point.The goal is to check whether the
webpage loading time meets the expectation when clients connected on single radio as well as dual radio.
"""This script will create 40 clients on 5Ghz , 2.4Ghz and Both and generate layer4 traffic on LANforge ,The Webpage
Download Test is designed to test the performance of the Access Point.The goal is to check whether the webpage
loading time meets the expectation when clients connected on single radio as well as dual radio.
how to run -
python3 lf_webpage.py --mgr 192.168.200.29 --mgr_port 8080 --upstream_port eth1 --num_stations 10 --security open --ssid testap210 --passwd [BLANK] --target_per_ten 1 --bands 5G --file_size 10MB --fiveg_radio wiphy0 --twog_radio wiphy1 --duration 1
Copyright 2021 Candela Technologies Inc
04 - April - 2021
"""
how to run - python3 lf_webpage.py --mgr 192.168.200.29 --mgr_port 8080 --upstream_port eth1 --num_stations 10
--security open --ssid testap210 --passwd [BLANK] --target_per_ten 1 --bands 5G --file_size 10MB --fiveg_radio
wiphy0 --twog_radio wiphy1 --duration 1 Copyright 2021 Candela Technologies Inc 04 - April - 2021 """
import sys
import os
import importlib
@@ -53,7 +51,7 @@ class HttpDownload(Realm):
self.station_profile = self.local_realm.new_station_profile()
self.http_profile = self.local_realm.new_http_profile()
self.http_profile.requests_per_ten = self.target_per_ten
#self.http_profile.url = self.url
# self.http_profile.url = self.url
self.port_util = PortUtils(self.local_realm)
self.http_profile.debug = _debug_on
self.created_cx = {}
@@ -490,47 +488,33 @@ class HttpDownload(Realm):
#
# 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.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.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 = []
@@ -682,7 +666,6 @@ def main():
parser.add_argument("--test_id", default="lf_webpage", help="test-id for kpi.csv, script or test name")
parser.add_argument('--csv_outfile', help="--csv_outfile <Output file for csv data>", default="")
args = parser.parse_args()
test_time = datetime.now()
test_time = test_time.strftime("%b %d %H:%M:%S")
@@ -853,6 +836,5 @@ def main():
test_input_infor=test_input_infor, csv_outfile=args.csv_outfile)
if __name__ == '__main__':
main()

View File

@@ -348,9 +348,10 @@ else
"./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
"./sta_connect_example.py --mgr $MGR --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --radio $RADIO_USED --upstream_port $UPSTREAM --test_duration 15s"
"./sta_connect.py --mgr $MGR --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --radio $RADIO_USED --upstream_port $UPSTREAM --test_duration 15s"
"./sta_scan_test.py --ssid $SSID_USED --security $SECURITY --passwd $PASSWD_USED --radio $RADIO_USED"
"./sta_connect_example.py --mgr $MGR --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --radio $RADIO_USED --upstream_port $UPSTREAM --test_duration 15s --debug"
"./sta_connect.py --mgr $MGR --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --radio $RADIO_USED --upstream_port $UPSTREAM --test_duration 15s --debug"
"./sta_connect2.py --dest $MGR --dut_ssid $SSID_USED --dut_passwd $PASSWD_USED --dut_security $SECURITY --radio $RADIO_USED --upstream_port $UPSTREAM"
"./sta_scan_test.py --ssid $SSID_USED --security $SECURITY --passwd $PASSWD_USED --radio $RADIO_USED --debug"
#station_layer3.py
#stations_connected.py
#"./test_1k_clients_jedtest.py
@@ -554,19 +555,23 @@ function test() {
then
TEXTCLASS="partial_failure"
TDTEXT="Partial Failure"
echo "Partial Failure"
elif [[ $TEXT =~ "FAILED" ]]
then
TEXTCLASS="partial_failure"
TDTEXT="ERROR"
echo "ERROR"
else
TEXTCLASS="success"
TDTEXT="Success"
echo "No errors detected"
fi
if (( FILESIZE > 0))
then
echo "Errors detected"
TEXTCLASS="failure"
TDTEXT="Failure"
STDERR="<a href=\"${URL2}/${NAME}_stderr.txt\" target=\"_blank\">STDERR</a>"
else
echo "No errors detected"
fi
results+=("<tr><td>${CURR_TEST_NAME}</td>
<td class='scriptdetails'>${testcommand}</td>
@@ -662,12 +667,12 @@ td.testname {
</tr>
</thead>
<tbody>"
tail="</body></html>"
f="</body></html>"
fname="${HOMEPATH}/html-reports/regression_file-${NOW}.html"
echo "$header" >> "$fname"
echo "${results[@]}" >> "$fname"
echo "</table>
echo "</tbody>
</table>
<br />
<h3>System information</h3>
@@ -694,7 +699,9 @@ td.testname {
<td id='python_environment'>${PYTHON_ENVIRONMENT}</td>
</tr>
</tbody>
</table>" >> "$fname"
</table>
<script> sortTable('myTable2', 2); </script>
" >> "$fname"
echo "$tail" >> "$fname"
if [ -f "${HOMEPATH}/html-reports/latest.html" ]; then
rm -f "${HOMEPATH}/html-reports/latest.html"

View File

@@ -0,0 +1,268 @@
# LANForge Python Scripts
This directory contains python scripts useful for unit-tests. It uses libraries in ../py-json. Please place new tests in this directory. Unless they are libraries, please avoid adding python scripts to ../py-json. Please read https://www.candelatech.com/cookbook/cli/json-python to learn about how to use the LANforge client JSON directly. Review http://www.candelatech.com/scripting_cookbook.php to understand more about scripts in general.
# Getting Started
The first step is to make sure all dependencies are installed in your system by running update_deps.py in this folder.
Please consider using the `LFCliBase` class as your script superclass. It will help you with a consistent set of JSON handling methods and pass and fail methods for recording test results. Below is a sample snippet that includes LFCliBase:
if 'py-json' not in sys.path:
sys.path.append('../py-json')
from LANforge import LFUtils
from LANforge import lfcli_base
from LANforge.lfcli_base import LFCliBase
from LANforge.LFUtils import *
import realm
from realm import Realm
class Eggzample(LFCliBase):
def __init__(self, lfclient_host, lfclient_port):
super().__init__(lfclient_host, lfclient_port, debug=True)
def main():
eggz = Eggzample("http://localhost", 8080)
frontpage_json = eggz.json_get("/")
pprint.pprint(frontpage_json)
data = {
"message": "hello world"
}
eggz.json_post("/cli-json/gossip", data, debug_=True)
if __name__ == "__main__":
main()
The above example will stimulate output on the LANforge client websocket `ws://localhost:8081`. You can monitor system activity over that channel.
## Useful URIs:
* /: provides version information and a list of supported URIs
* /DUT/: Device Under Test records
* /alerts/: port or connection alerts
* /cli-form: post multi-part form data to this URI
* /cli-json: post JSON data to this URI
* /help: list of CLI commands and refence links
* /help/set_port: each CLI command has a command composer
* /cx: connections
* /endp: endpoints that make up connections
* /gui-cli: post multi-part form data for GUI automation
* /gui-json: post JSON data to this URI for GUI automation
* /port: list ports and stations, oriented by shelf, resource and name: `/port/1/1/eth0` is typically your management port
* /stations: entities that are associated to your virtual access points (vAP)
There are more URIs you can explore, these are the more useful ones.
#### Scripts included are:
* `cicd_TipIntegration.py`: battery of TIP tests that include upgrading DUT and executing sta_connect script
* `cicd_testrail.py`:
* `function send_get`: Issues a GET request (read) against the API.
* `function send_post`: Issues a write against the API.
* `function __send_request`:
* `function get_project_id`: Gets the project ID using the project name
* `function get_run_id`: Gets the run ID using test name and project name
* `function update_testrail`: Update TestRail for a given run_id and case_id
* `cicd_testrailAndInfraSetup.py`:
* class `GetBuild`:
* function `get_latest_image`: extract a tar file from the latest file name from a URL
* function run_`opensyncgw_in_docker`:
* function `run_opensyncgw_in_aws`:
* class `openwrt_linksys`:
* function `ap_upgrade`: transfers file from local host to remote host. Upgrade access point with new information (?)
* class `RunTest`:
* function `TestCase_938`: checks single client connectivity
* function `TestCase_941`: checks for multi-client connectivity
* function `TestCase_939`: checks for client count in MQTT log and runs the clients (?)
* `run_cv_scenario.py`:
* class `RunCvScenario`: imports the LFCliBase class.
* function `get_report_file_name`: returns report name
* function `build`: loads and sends the ports available?
* function `start`: /gui_cli takes commands keyed on 'cmd' and this function create an array of commands
* `sta_connect.py`: This function creates a station, create TCP and UDP traffic, run it a short amount of time,
and verify whether traffic was sent and received. It also verifies the station connected
to the requested BSSID if bssid is specified as an argument.
The script will clean up the station and connections at the end of the test.
* class `StaConnect(LFCliBase)`:
* function `get_realm`: returns the local realm
* function `get_station_url`:
* function `get_upstream_url`:
* function `compare_vals`: compares pre-test values to post-test values
* function `remove_stations`: removes all stations
* function `num_associated`:
* function `clear_test_results`:
* function `run`:
* function `setup`:
* function `start`:
* function `stop`:
* function `finish`:
* function `cleanup`:
* function `main`:
* `sta_connect2.py`: This will create a station, create TCP and UDP traffic, run it a short amount of time,
and verify whether traffic was sent and received. It also verifies the station connected
to the requested BSSID if bssid is specified as an argument. The script will clean up the station and connections at the end of the test.
* function `get_realm`: returns local realm
* function `get_station_url`:
* function `get_upstream_url`:
* function `compare_vals`: compares pre-test values to post-test values
* function `remove_stations`: removes all ports
* function `num_associated`:
* function `clear_test_results`
* function `setup`: verifies upstream url, creates stations and turns dhcp on, creates endpoints,
UDP endpoints,
* function `start`:
* function `stop`:
* function `cleanup`:
* function `main`:
* `sta_connect_example.py`: example of how to instantiate StaConnect and run the test
* `sta_connect_multi_example.py`: example of how to instantiate StaConnect and run the test and create multiple OPEN stations,have
some stations using WPA2
* `stations_connected.py`: Contains examples of using realm to query stations and get specific information from them
* `test_ipv4_connection.py`: This script will create a variable number of stations that will attempt to connect to a chosen SSID using a provided password and security type.
The test is considered passed if all stations are able to associate and obtain IPV4 addresses
* class `IPv4Test`
* function `build`: This function will use the given parameters (Number of stations, SSID, password, and security type) to create a series of stations.
* function `start`: This function will admin-up the stations created in the build phase. It will then check all stations periodically for association and IP addresses.
This will continue until either the specified timeout has been reached or all stations obtain an IP address.
* function `stop`: This function will admin-down all stations once one of the ending criteria is met.
* function `cleanup`: This function will clean up all stations created during the test.
* command line options :
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_ipv6_connection.py`: This script will create a variable number of stations that will attempt to connect to a chosen SSID using a provided password and security type.
The test is considered passed if all stations are able to associate and obtain IPV6 addresses
* class `IPv6Test`
* function `build`: This function will use the given parameters (Number of stations, SSID, password, and security type) to create a series of stations.
* function `start`: This function will admin-up the stations created in the build phase. It will then check all stations periodically for association and IP addresses.
This will continue until either the specified timeout has been reached or all stations obtain an IP address.
* function `stop`: This function will admin-down all stations once one of the ending criteria is met.
* function `cleanup`: This function will clean up all stations created during the test.
* Command line options :
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_l3_unicast_traffic_gen.py`: This script will create stations, create traffic between upstream port and stations, run traffic.
The traffic on the stations will be checked once per minute to verify that traffic is transmitted and received.
Test will exit on failure of not receiving traffic for one minute on any station.
* class `L3VariableTimeLongevity`
* function `build`: This function will create a group of stations and cross connects that are used in the test.
* function `start`: This function will admin-up all stations and start traffic over the cross-connects. Values in the cross-connects
will be checked every minute to verify traffic is transmitted and received.
* function `stop`: This function will stop all cross-connects from generating traffic and admin-down all stations.
* function `cleanup`: This function will cleanup all cross-connects and stations created during the test.
* Command line options:
* `-d, --test_duration`: Determines the total length of the test. Consists of number followed by letter indicating length
10m would be 10 minutes or 3d would be 3 days. Available options for length are Day (d), Hour (h), Minute (m), or Second (s)
* `-t, --endp_type`: Specifies type of endpoint to be used in the test. Options are lf_udp, lf_udp6, lf_tcp, lf_tcp6
* `-u, --upstream_port`: This is the upstream port to be used for traffic. An upstream port is some data source on the wired LAN or WAN beyond the AP
* `-r, --radio`: This switch will determine the radio name, number of stations, ssid, and ssid password. Security type is fixed at WPA2.
Usage of this switch could look like: `--radio wiphy1 64 candelaTech-wpa2-x2048-5-3 candelaTech-wpa2-x2048-5-3`
* `test_ipv4_l4_urls_per_ten.py`: This script measure the number of urls per ten minutes over layer 4 traffic
* class `IPV4L4`
* function `build`: This function will create all stations and cross-connects to be used in the test
* function `start`: This function will admin-up stations and start all traffic over the cross-connects. It will then measure the amount of traffic that passed through
the cross-connects every ten minutes. These values are compared to 90% of the chosen target traffic per ten minutes. If this value is exceeded, a pass will occur,
otherwise, a fail is recorded.
* function `stop`: This function will admin-down stations and stop all traffic.
* function `cleanup`: This function will cleanup any stations or cross-connects associated with the test.
* Command line options:
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--requests_per_ten`: Configures the number of request per ten minutes
* `--num_tests`: Configures the number of tests to be run. Each test runs for ten minutes
* `--url`: Specifies the upload/download, address, and destination. Example: dl http://10.40.0.1 /dev/null
* `--target_per_ten`: Rate of target urls per ten minutes. 90% of this value will be considered the threshold for a passed test.
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_ipv4_l4_ftp_urls_per_ten.py`: This script measure the number of urls per ten minutes over layer 4 ftp traffic
* class `IPV4L4`
* function `build`: This function will create all stations and cross-connects to be used in the test
* function `start`: This function will admin-up stations and start all traffic over the cross-connects. It will then measure the amount of traffic that passed through
the cross-connects every ten minutes. These values are compared to 90% of the chosen target traffic per ten minutes. If this value is exceeded, a pass will occur,
otherwise, a fail is recorded.
* function `stop`: This function will admin-down stations and stop all traffic.
* function `cleanup`: This function will cleanup any stations or cross-connects associated with the test.
* Command line options:
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--requests_per_ten`: Configures the number of request per ten minutes
* `--num_tests`: Configures the number of tests to be run. Each test runs for ten minutes
* `--url`: Specifies the upload/download, address, and destination. Example: dl http://10.40.0.1 /dev/null
* `--target_per_ten`: Rate of target urls per ten minutes. 90% of this value will be considered the threshold for a passed test.
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_generic`:
* class `GenTest`: This script will create
* function `build`: This function will create the stations and cross-connects to be used during the test.
* function `start`: This function will start traffic and measure different values dependent on the command chosen.
Commands currently available for use: lfping, generic, and speedtest.
* function `stop`: This function will admin-down stations, stop traffic on cross-connects and cleanup any stations or cross-connects associated with the test.
* function `cleanup`: This function will remove any stations and cross-connects created during the test.
* Command line options:
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
* `--ssid`: Specifies SSID to be used in the test
* `--password`: Specifies the password for the SSID to be used in the test
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
* `--num_stations`: Specifies number of stations to create for the test
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
* `--upstream_port`: This is the upstream port to be used for traffic. An upstream port is some data source on the wired LAN or WAN beyond the AP
* `--type`: Specifies type of generic connection to make. (generic, lfping, iperf3-client, speedtest, iperf3-server, lf_curl)
* `--dest`: Specifies the destination for some commands to use
* `--interval`: Specifies the interval between tests in the start function
* `--test_duration`: Specifies the full duration of the test. Consists of number followed by letter indicating length
10m would be 10 minutes or 3d would be 3 days. Available options for length are Day (d), Hour (h), Minute (m), or Second (s)
* `--debug`: Turns on debug output for the test
* `--help`: Displays help output for the script
* `test_ipv4_variable_time.py`:
* class `IPv4VariableTime`
* function `__set_all_cx_state`:
* function `run_test`:
* function `cleanup`:
* function `run`:
* `test_wanlink.py`:
* class `LANtoWAN`
* function `run_test`:
* function `create_wanlinks`:
* function `run`:
* function `cleanup`:
* `vap_stations_example.py`:
* class `VapStations`
* function `run`:
* function `main`:

View File

@@ -20,7 +20,9 @@ removeCX = LFUtils.removeCX
removeEndps = LFUtils.removeEndps
realm = importlib.import_module("py-json.realm")
Realm = realm.Realm
set_port = importlib.import_module("py-json.LANforge.set_port")
add_sta = importlib.import_module("py-json.LANforge.add_sta")
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
OPEN = "open"
WEP = "wep"
WPA = "wpa"
@@ -31,7 +33,7 @@ MODE_AUTO = 0
class StaConnect(Realm):
def __init__(self, host, port, _dut_ssid="MyAP", _dut_passwd="NA", _dut_bssid="",
_user="lanforge", _passwd="lanforge", _sta_mode="0", _radio="wiphy0",
_resource=1, _upstream_resource=1, _upstream_port="eth2",
_resource=1, _upstream_resource=None, _upstream_port="eth2",
_sta_name=None, _debugOn=False, _dut_security=OPEN, _exit_on_error=False,
_cleanup_on_exit=True, _runtime_sec=60, _exit_on_fail=False):
# do not use `super(LFCLiBase,self).__init__(self, host, port, _debugOn)
@@ -52,8 +54,12 @@ class StaConnect(Realm):
self.sta_mode = _sta_mode # See add_sta LANforge CLI users guide entry
self.radio = _radio
self.resource = _resource
self.upstream_resource = _upstream_resource
self.upstream_port = _upstream_port
_upstream_port = LFUtils.name_to_eid(_upstream_port)
if _upstream_resource:
self.upstream_resource = _upstream_resource
else:
self.upstream_resource = _upstream_port[1]
self.upstream_port = _upstream_port[2]
self.runtime_secs = _runtime_sec
self.cleanup_on_exit = _cleanup_on_exit
self.sta_url_map = None # defer construction
@@ -68,6 +74,13 @@ class StaConnect(Realm):
self.cx_profile = self.new_l3_cx_profile()
self.cx_profile.host = self.host
self.cx_profile.port = self.port
print(self.upstream_port)
self.desired_set_port_current_flags = ["if_down", "use_dhcp"]
self.desired_set_port_interest_flags = ["current_flags", "ifdown", "dhcp"]
self.desired_add_sta_flags = ["wpa2_enable", "80211u_enable", "create_admin_down"]
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:
@@ -132,6 +145,26 @@ class StaConnect(Realm):
return False
return True
@staticmethod
def add_named_flags(desired_list, command_ref):
if desired_list is None:
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 wants a maps of flag values")
result = 0
for name in desired_list:
if (name is None) or (name == ""):
continue
if name not in command_ref:
raise ValueError("flag %s not in map" % name)
result += command_ref[name]
return result
def setup(self):
self.clear_test_results()
self.check_connect()
@@ -149,26 +182,24 @@ class StaConnect(Realm):
if response is not None:
if response["interface"] is not None:
print("removing old station")
LFUtils.removePort(self.resource, sta_name, self.lfclient_url, debug=False)
LFUtils.waitUntilPortsDisappear(self.resource, self.lfclient_url, self.station_names)
if self.port_exists(sta_name):
self.rm_port(sta_name)
self.wait_until_ports_disappear(self.station_names)
# Create stations and turn dhcp on
flags = 0x10000
if self.dut_security == WPA2:
flags += 0x400
elif self.dut_security == OPEN:
pass
radio = LFUtils.name_to_eid(self.radio)
add_sta_data = {
"shelf": 1,
"resource": self.resource,
"radio": self.radio,
"shelf": radio[0],
"resource": radio[1],
"radio": radio[2],
"ssid": self.dut_ssid,
"key": self.dut_passwd,
"mode": self.sta_mode,
"mac": "xx:xx:xx:xx:*:xx",
"flags": flags # verbose, wpa2
"flags": self.add_named_flags(self.desired_add_sta_flags, add_sta.add_sta_flags), # verbose, wpa2
"flags_mask": self.add_named_flags(self.desired_add_sta_flags_mask, add_sta.add_sta_flags)
}
print("Adding new stations ", end="")
for sta_name in self.station_names:
@@ -177,24 +208,26 @@ class StaConnect(Realm):
self.json_post("/cli-json/add_sta", add_sta_data, suppress_related_commands_=True)
time.sleep(0.01)
set_port_data = {
"shelf": 1,
"resource": self.resource,
"current_flags": 0x80000000, # use DHCP, not down
"interest": 0x4002 # set dhcp, current flags
}
set_port_data = {"shelf": 1, "resource": self.resource,
"current_flags": self.add_named_flags(self.desired_set_port_current_flags,
set_port.set_port_current_flags),
"interest": self.add_named_flags(self.desired_set_port_interest_flags,
set_port.set_port_interest_flags),
'report_timer': 1500, 'suppress_preexec_cli': 'yes',
'suppress_preexec_method': 1}
print("\nConfiguring ")
for sta_name in self.station_names:
set_port_data["port"] = sta_name
print(" %s," % sta_name, end="")
self.json_post("/cli-json/set_port", set_port_data, suppress_related_commands_=True)
set_port_r = LFRequest.LFRequest(self.lfclient_url + "/cli-json/set_port")
set_port_r.addPostData(set_port_data)
set_port_r.jsonPost()
time.sleep(0.01)
print("\nBringing ports up...")
data = {"shelf": 1,
"resource": self.resource,
"port": "ALL",
"probe_flags": 1}
self.json_post("/cli-json/nc_show_ports", data, suppress_related_commands_=True)
for port in self.station_names:
self.admin_up(port)
LFUtils.waitUntilPortsAdminUp(self.resource, self.lfclient_url, self.station_names)
# station_info = self.jsonGet(self.mgr_url, "%s?fields=port,ip,ap" % (self.getStaUrl()))
@@ -237,7 +270,6 @@ class StaConnect(Realm):
self.json_post("/cli-json/nc_show_ports", data, suppress_related_commands_=True)
# make a copy of the connected stations for test records
for sta_name in self.station_names:
sta_url = self.get_station_url(sta_name)
station_info = self.json_get(sta_url) # + "?fields=port,ip,ap")
@@ -368,7 +400,7 @@ class StaConnect(Realm):
}
self.json_post("/cli-json/set_cx_report_timer", data, suppress_related_commands_=True)
self.wait_until_endps_appear(self.cx_names)
self.wait_until_cxs_appear(self.cx_names)
return True
def start(self):
@@ -446,9 +478,10 @@ class StaConnect(Realm):
def cleanup(self):
for sta_name in self.station_names:
LFUtils.removePort(self.resource, sta_name, self.lfclient_url, debug=False)
self.rm_port(sta_name)
endp_names = []
removeCX(self.lfclient_url, self.cx_names.keys())
for cx in self.cx_names.keys():
self.rm_cx(cx)
for cx_name in self.cx_names:
endp_names.append(self.cx_names[cx_name]["a"])
endp_names.append(self.cx_names[cx_name]["b"])
@@ -482,14 +515,12 @@ Example:
if args.port is not None:
lfjson_port = args.port
staConnect = StaConnect(lfjson_host, lfjson_port, _runtime_sec=monitor_interval)
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.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:

View File

@@ -20,8 +20,6 @@ sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
removeCX = LFUtils.removeCX
removeEndps = LFUtils.removeEndps
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
LFCliBase = lfcli_base.LFCliBase
realm = importlib.import_module("py-json.realm")
Realm = realm.Realm
influx = importlib.import_module("py-scripts.influx_utils")
@@ -35,7 +33,7 @@ WPA3 = "wpa3"
MODE_AUTO = 0
class StaConnect2(LFCliBase):
class StaConnect2(Realm):
def __init__(self, host, port, _dut_ssid="jedway-open-1", _dut_passwd="NA", _dut_bssid="",
_user="", _passwd="", _sta_mode="0", _radio="wiphy0",
_influx_host=None, _influx_db=None, _influx_user=None,
@@ -47,7 +45,9 @@ class StaConnect2(LFCliBase):
# do not use `super(LFCLiBase,self).__init__(self, host, port, _debugOn)
# that is py2 era syntax and will force self into the host variable, making you
# very confused.
super().__init__(host, port, _debug=debug_, _exit_on_fail=_exit_on_fail)
super().__init__(host, port, debug_=debug_, _exit_on_fail=_exit_on_fail)
self.host = host
self.port = port
self.debug = debug_
self.dut_security = _dut_security
self.dut_ssid = _dut_ssid
@@ -70,8 +70,6 @@ class StaConnect2(LFCliBase):
self.station_names = [_sta_name]
self.sta_prefix = _sta_prefix
self.bringup_time_sec = _bringup_time_sec
# self.localrealm :Realm = Realm(lfclient_host=host, lfclient_port=port) # py > 3.6
self.localrealm = Realm(lfclient_host=host, lfclient_port=port) # py > 3.6
self.resulting_stations = {}
self.resulting_endpoints = {}
self.station_profile = None
@@ -81,10 +79,14 @@ class StaConnect2(LFCliBase):
self.influx_db = _influx_db
self.influx_user = _influx_user
self.influx_passwd = _influx_passwd
self.name_prefix = "tcp"
self.use_existing_sta = False
self.cx_profile = self.new_l3_cx_profile()
self.cx_profile.host = self.host
self.cx_profile.port = self.port
self.cx_profile.name_prefix = self.name_prefix
# def get_realm(self) -> Realm: # py > 3.6
def get_realm(self):
return self.localrealm
def get_station_url(self, sta_name_=None):
if sta_name_ is None:
@@ -116,7 +118,7 @@ class StaConnect2(LFCliBase):
counter = 0
# print("there are %d results" % len(self.station_results))
fields = "_links,port,alias,ip,ap,port+type"
self.station_results = self.localrealm.find_ports_like("%s*" % self.sta_prefix, fields, debug_=False)
self.station_results = self.find_ports_like("%s*" % self.sta_prefix, fields, debug_=False)
if (self.station_results is None) or (len(self.station_results) < 1):
self.get_failed_result_list()
for eid, record in self.station_results.items():
@@ -154,7 +156,7 @@ class StaConnect2(LFCliBase):
# remove old stations
if self.clean_all_sta:
print("Removing all stations on resource.")
self.localrealm.remove_all_stations(self.resource)
self.remove_all_stations(self.resource)
else:
print("Removing old stations to be created by this test.")
for sta_name in self.station_names:
@@ -166,7 +168,7 @@ class StaConnect2(LFCliBase):
LFUtils.wait_until_ports_disappear(self.lfclient_url, self.station_names)
# Create stations and turn dhcp on
self.station_profile = self.localrealm.new_station_profile()
self.station_profile = self.new_station_profile()
if self.dut_security == WPA2:
self.station_profile.use_security(security_type="wpa2", ssid=self.dut_ssid, passwd=self.dut_passwd)
@@ -187,14 +189,14 @@ class StaConnect2(LFCliBase):
LFUtils.wait_until_ports_appear(self.lfclient_url, self.station_names, debug=self.debug)
# Create UDP endpoints
self.l3_udp_profile = self.localrealm.new_l3_cx_profile()
self.l3_udp_profile = self.new_l3_cx_profile()
self.l3_udp_profile.side_a_min_bps = 128000
self.l3_udp_profile.side_b_min_bps = 128000
self.l3_udp_profile.side_a_min_pdu = 1200
self.l3_udp_profile.side_b_min_pdu = 1500
self.l3_udp_profile.report_timer = 1000
self.l3_udp_profile.name_prefix = "udp"
port_list = list(self.localrealm.find_ports_like("%s+" % self.sta_prefix))
port_list = list(self.find_ports_like("%s+" % self.sta_prefix))
if (port_list is None) or (len(port_list) < 1):
raise ValueError("Unable to find ports named '%s'+" % self.sta_prefix)
self.l3_udp_profile.create(endp_type="lf_udp",
@@ -203,13 +205,13 @@ class StaConnect2(LFCliBase):
suppress_related_commands=True)
# Create TCP endpoints
self.l3_tcp_profile = self.localrealm.new_l3_cx_profile()
self.l3_tcp_profile = self.new_l3_cx_profile()
self.l3_tcp_profile.side_a_min_bps = 128000
self.l3_tcp_profile.side_b_min_bps = 56000
self.l3_tcp_profile.name_prefix = "tcp"
self.l3_tcp_profile.name_prefix = self.name_prefix
self.l3_tcp_profile.report_timer = 1000
self.l3_tcp_profile.create(endp_type="lf_tcp",
side_a=list(self.localrealm.find_ports_like("%s+" % self.sta_prefix)),
side_a=list(self.find_ports_like("%s+" % self.sta_prefix)),
side_b="%d.%s" % (self.resource, self.upstream_port),
suppress_related_commands=True)
@@ -390,6 +392,12 @@ class StaConnect2(LFCliBase):
curr_endp_names.append(endp_names[1])
removeEndps(self.lfclient_url, curr_endp_names, debug=self.debug)
def pre_cleanup(self):
self.cx_profile.cleanup_prefix()
# do not clean up station if existed prior to test
if not self.use_existing_sta:
for sta in self.station_names:
self.rm_port(sta, check_exists=True, debug_=False)
# ~class
@@ -475,7 +483,7 @@ Example:
staConnect.station_names = ["%s0000" % args.prefix]
staConnect.bringup_time_sec = args.bringup_time
# staConnect.cleanup()
staConnect.pre_cleanup()
staConnect.setup()
staConnect.start()
print("napping %f sec" % staConnect.runtime_secs)
@@ -490,7 +498,7 @@ Example:
print("PASS: All tests pass")
print(staConnect.get_all_message())
staConnect.cleanup()
staConnect.pre_cleanup()
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@@ -18,7 +18,7 @@ lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
LFCliBase = lfcli_base.LFCliBase
sta_connect = importlib.import_module("py-scripts.sta_connect")
StaConnect = sta_connect.StaConnect
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
def main():
parser = LFCliBase.create_basic_argparse(
@@ -40,10 +40,11 @@ def main():
args.security = sta_connect.WPA2
if args.radio is None:
args.radio = "wiphy0"
upstream_port = LFUtils.name_to_eid(args.upstream_port)
staConnect = StaConnect(args.mgr, args.mgr_port, _debugOn=args.debug, _runtime_sec=monitor_interval)
staConnect.sta_mode = 0
staConnect.upstream_resource = 1
staConnect.upstream_port = args.upstream_port
staConnect.upstream_resource = upstream_port[1]
staConnect.upstream_port = upstream_port[2]
staConnect.radio = args.radio
staConnect.resource = 1
staConnect.dut_security = args.security
@@ -52,7 +53,7 @@ def main():
staConnect.station_names = ["sta000"]
staConnect.setup()
staConnect.start()
time.sleep(20)
staConnect.run()
staConnect.stop()
# staConnect.finish()
staConnect.cleanup()

View File

@@ -26,6 +26,7 @@ class TTLSTest(Realm):
security="wpa2",
password="[BLANK]",
radio="wiphy0",
upstream_port="eth2",
key_mgmt="WPA-EAP",
pairwise="NA",
group="NA",
@@ -112,7 +113,7 @@ class TTLSTest(Realm):
self.debug = _debug_on
self.station_profile = self.new_station_profile()
self.vap = vap
self.upstream_port = "eth1"
self.upstream_port = upstream_port
self.upstream_resource = 1
if self.vap:
self.vap_profile = self.new_vap_profile()
@@ -276,6 +277,13 @@ class TTLSTest(Realm):
LFUtils.wait_until_ports_disappear(base_url=self.lfclient_url, port_list=sta_list,
debug=self.debug)
def pre_cleanup(self):
self.cx_profile.cleanup_prefix()
# do not clean up station if existed prior to test
if not self.use_existing_sta:
for sta in self.sta_list:
self.rm_port(sta, check_exists=True, debug_=False)
def collect_endp_stats(self, endp_map, traffic_type="TCP"):
print("Collecting Data")
fields = "?fields=name,tx+bytes,rx+bytes"
@@ -364,6 +372,7 @@ test_ipv4_ttls.py:
ssid=args.ssid,
password=args.passwd,
security=args.security,
upstream_port=args.upstream_port,
sta_list=station_list,
radio=args.radio,
key_mgmt=args.key_mgmt,
@@ -380,6 +389,7 @@ test_ipv4_ttls.py:
enable_pkc=args.enable_pkc,
)
ttls_test.cleanup(station_list)
ttls_test.pre_cleanup()
ttls_test.build()
if not ttls_test.passes():
print(ttls_test.get_fail_message())
@@ -391,6 +401,7 @@ test_ipv4_ttls.py:
exit(1)
time.sleep(30)
ttls_test.cleanup(station_list)
ttls_test.pre_cleanup()
if ttls_test.passes():
print("Full test passed, all stations associated and got IP")

View File

@@ -26,6 +26,7 @@ class L3PowersaveTraffic(LFCliBase):
def __init__(self, host, port, ssid, security, password, station_list, side_a_min_rate=56, side_b_min_rate=56,
side_a_max_rate=0,
side_b_max_rate=0, pdu_size=1000, prefix="00000", test_duration="5m",
station_radio="wiphy0", monitor_radio="wiphy1",
_debug_on=False, _exit_on_error=False, _exit_on_fail=False):
super().__init__(host, port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
self.host = host
@@ -35,6 +36,8 @@ class L3PowersaveTraffic(LFCliBase):
self.password = password
self.sta_list = station_list
self.prefix = prefix
self.station_radio = station_radio
self.monitor_radio = monitor_radio
self.debug = _debug_on
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port, debug_=False)
# upload
@@ -69,8 +72,8 @@ class L3PowersaveTraffic(LFCliBase):
# channel = self.json_get("/port/1/%s/%s/"%(1,"wiphy0"))
# rint("The channel name is...")
self.new_monitor.create(resource_=1, channel=149, radio_="wiphy1", name_="moni0")
self.station_profile.create(radio="wiphy0", sta_names_=self.sta_list, debug=False)
self.new_monitor.create(resource_=1, channel=149, radio_=self.monitor_radio, name_="moni0")
self.station_profile.create(radio=self.station_radio, sta_names_=self.sta_list, debug=False)
# station_channel = self.json_get("/port/1/%s/%s")
# pprint.pprint(station_channel)
@@ -127,11 +130,19 @@ class L3PowersaveTraffic(LFCliBase):
temp.append(self.local_realm.name_to_eid(station)[2])
port_info = self.json_get("port/1/1/%s?fields=alias,ap,mac" % ','.join(temp))
if port_info is not None:
for item in port_info['interfaces']:
for k, v in item.items():
print("sta_name %s" % v['alias'])
print("mac %s" % v['mac'])
print("ap %s\n" % v['ap'])
if 'interfaces' in port_info:
for item in port_info['interfaces']:
for k, v in item.items():
print("sta_name %s" % v['alias'])
print("mac %s" % v['mac'])
print("ap %s\n" % v['ap'])
elif 'interface' in port_info:
print("sta_name %s" % port_info['interface']['alias'])
print("mac %s" % port_info['interface']['mac'])
print("ap %s\n" % port_info['interface']['ap'])
else:
print('interfaces and interface not in port_mgr_response')
exit(1)
while cur_time < end_time:
# DOUBLE CHECK
@@ -155,6 +166,7 @@ class L3PowersaveTraffic(LFCliBase):
def main():
# Realm.create_basic_argparse defined in lanforge-scripts/py-json/LANforge/lfcli_base.py
parser = Realm.create_basic_argparse(
prog='test_l3_powersave_traffic.py',
formatter_class=argparse.RawTextHelpFormatter,
@@ -165,16 +177,18 @@ def main():
description='''\
Example of creating traffic on an l3 connection
''')
parser.add_argument('--monitor_radio', help="--monitor_radio radio to be used in monitor creation", default="wiphy1")
args = parser.parse_args()
lfjson_host = args.mgr
lfjson_port = 8080
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=4, padding_number_=10000)
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=0, padding_number_=10000)
ip_powersave_test = L3PowersaveTraffic(lfjson_host, lfjson_port, ssid=args.ssid, security=args.security,
password=args.passwd, station_list=station_list, side_a_min_rate=2000,
side_b_min_rate=2000, side_a_max_rate=0,
side_b_max_rate=0, prefix="00000", test_duration="30s",
_debug_on=False, _exit_on_error=True, _exit_on_fail=True)
side_b_min_rate=2000, side_a_max_rate=0, station_radio=args.radio,
monitor_radio=args.monitor_radio, side_b_max_rate=0, prefix="00000",
test_duration="30s", _debug_on=False, _exit_on_error=True, _exit_on_fail=True)
ip_powersave_test.cleanup()
ip_powersave_test.build()
ip_powersave_test.start()

View File

@@ -15,7 +15,7 @@
"LF_MGR_PASS": "lanforge",
"UPSTREAM_PORT":"1.1.eth2",
"TEST_TIMEOUT": 600,
"EMAIL_LIST_PRODUCTION": "konikofi@candelatech.com,greearb@candelatech.com,,jreynolds@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,erin.grimes@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com",
"EMAIL_LIST_PRODUCTION": "konikofi@candelatech.com,greearb@candelatech.com,,jreynolds@candelatech.com,scott.wedge@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,erin.grimes@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com",
"EMAIL_LIST_TEST": "chuck.rekiere@candelatech.com",
"EMAIL_TITLE_TXT": "Lanforge QA Testing CT-US-001",
"EMAIL_TXT": "Lanforge QA Testing CT-US-001 "

View File

@@ -15,7 +15,7 @@
"LF_MGR_PASS": "lanforge",
"UPSTREAM_PORT": "1.1.eth2",
"TEST_TIMEOUT": 600,
"EMAIL_LIST_PRODUCTION": "konikofi@candelatech.com,greearb@candelatech.com,,jreynolds@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,erin.grimes@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com",
"EMAIL_LIST_PRODUCTION": "konikofi@candelatech.com,greearb@candelatech.com,,jreynolds@candelatech.com,scott.wedge@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,erin.grimes@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com",
"EMAIL_LIST_TEST": "chuck.rekiere@candelatech.com",
"EMAIL_TITLE_TXT": "Lanforge QA Testing CT-US-002",
"EMAIL_TXT": "Lanforge QA Testing CT-US-002"

View File

@@ -15,7 +15,7 @@
"LF_MGR_PASS": "lanforge",
"UPSTREAM_PORT":"1.1.eth1",
"TEST_TIMEOUT": 600,
"EMAIL_LIST_PRODUCTION": "konikofi@candelatech.com,greearb@candelatech.com,,jreynolds@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,erin.grimes@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com",
"EMAIL_LIST_PRODUCTION": "konikofi@candelatech.com,greearb@candelatech.com,jreynolds@candelatech.com,scott.wedge@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,erin.grimes@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com",
"EMAIL_LIST_TEST": "chuck.rekiere@candelatech.com",
"EMAIL_TITLE_TXT": "Lanforge QA Testing CT-US-003",
"EMAIL_TXT": "Lanforge QA Testing CT-US-003"

View File

@@ -15,7 +15,7 @@
"LF_MGR_PASS": "lanforge",
"UPSTREAM_PORT": "1.1.eth2",
"TEST_TIMEOUT": 300,
"EMAIL_LIST_PRODUCTION": "konikofi@candelatech.com,greearb@candelatech.com,,jreynolds@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,erin.grimes@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com",
"EMAIL_LIST_PRODUCTION": "konikofi@candelatech.com,greearb@candelatech.com,,jreynolds@candelatech.com,scott.wedge@candelatech.com,matthew@candelatech.com,iain.davidson@candelatech.com,erin.grimes@candelatech.com,logan.lipke@candelatech.com,dipti.dhond@candelatech.com,chuck.rekiere@candelatech.com",
"EMAIL_LIST_TEST": "chuck.rekiere@candelatech.com",
"EMAIL_TITLE_TXT": "Lanforge QA Testing CT-US-004",
"EMAIL_TXT": "Lanforge QA Testing CT-US-004 "

View File

@@ -0,0 +1,707 @@
{
"ct_tests_001_scripts":{
"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.",
"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"
]
},
"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",
"load_db":"skip",
"command":"lf_help_check.bash",
"args":"",
"args_list":[
" "
]
},
"lf_cleanup":{
"enabled":"TRUE",
"load_db":"skip",
"command":"lf_cleanup.py",
"args":"",
"args_list":[
"--mgr LF_MGR_IP --cxs --sta "
]
},
"create_chamberview_dut_ATH10K_9984__wc":{
"enabled":"TRUE",
"load_db":"skip",
"command":"create_chamberview_dut.py",
"args":"",
"args_list":[
" --lfmgr LF_MGR_IP --port LF_MGR_PORT --dut_name USE_DUT_NAME",
" --ssid 'ssid_idx=0 ssid=SSID_USED security=SECURITY_USED password=SSID_PW_USED bssid=BSSID_TO_USE'",
" --ssid 'ssid_idx=1 ssid=SSID_USED security=SECURITY_USED password=SSID_PW_USED bssid=BSSID_TO_USE'",
" --sw_version DUT_SW --hw_version DUT_HW --serial_num DUT_SERIAL --model_num USE_DUT_NAME"
]
},
"create_chamberview_ATH10K_9984__wc":{
"enabled":"TRUE",
"load_db":"skip",
"command":"create_chamberview.py",
"args":"",
"args_list":[
" --lfmgr LF_MGR_IP --port LF_MGR_PORT --delete_scenario",
" --create_scenario ATH10K_9984__wc ",
" --raw_line \"profile_link 1.1 STA-AUTO 32 'DUT: USE_DUT_NAME Radio-2' NA wiphy1,AUTO -1 NA\" ",
" --raw_line \"profile_link 1.1 upstream-dhcp 1 NA NA UPSTREAM_PORT,AUTO -1 NA\""
]
},
"wifi_capacity_ATH10K_9984_":{
"enabled":"TRUE",
"timeout":"600",
"iterations":"1",
"load_db":"skip",
"command":"lf_wifi_capacity_test.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --port LF_MGR_PORT --lf_user lanforge --lf_password lanforge --instance_name ATH10K_9984__wc",
" --upstream 1.1.eth2 --batch_size 1,5,25,32 --loop_iter 1 --protocol UDP-IPv4 --duration 6000",
" --pull_report --local_lf_report_dir REPORT_PATH --test_tag 'ATH10K_9984_'",
" --test_rig TEST_RIG ",
" --set DUT_SET_NAME"
]
},
"create_chamberview_dut_ATH10K_9984__dp":{
"enabled":"TRUE",
"load_db":"skip",
"command":"create_chamberview_dut.py",
"args":"",
"args_list":[
" --lfmgr LF_MGR_IP --port LF_MGR_PORT --dut_name USE_DUT_NAME",
" --ssid 'ssid_idx=0 ssid=SSID_USED security=SECURITY_USED password=SSID_PW_USED bssid=BSSID_TO_USE'",
" --ssid 'ssid_idx=1 ssid=SSID_USED security=SECURITY_USED password=SSID_PW_USED bssid=BSSID_TO_USE'",
" --sw_version DUT_SW --hw_version DUT_HW --serial_num DUT_SERIAL --model_num USE_DUT_NAME"
]
},
"create_chamberview_ATH10K_9984__dp":{
"enabled":"TRUE",
"load_db":"skip",
"command":"create_chamberview.py",
"args":"",
"args_list":[
" --lfmgr LF_MGR_IP --port LF_MGR_PORT --delete_scenario",
" --create_scenario ATH10K_9984__dp",
" --raw_line \"profile_link 1.1 STA-AC 1 'DUT: USE_DUT_NAME Radio-2' NA wiphy1,AUTO -1 NA\" ",
" --raw_line \"profile_link 1.1 upstream-dhcp 1 NA NA UPSTREAM_PORT,AUTO -1 NA\""
]
},
"dataplane_ATH10K_9984_":{
"enabled":"TRUE",
"load_db":"skip",
"timeout":"600",
"iterations":"1",
"command":"lf_dataplane_test.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --port LF_MGR_PORT --lf_user lanforge --lf_password lanforge --instance_name ATH10K_9984__dp",
" --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;Custom' ",
" --raw_line 'cust_pkt_sz: 88;256;512;768;1024;MTU' ",
" --raw_line 'directions: DUT Transmit' --raw_line 'traffic_types: UDP' --raw_line 'bandw_options: AUTO'",
" --raw_line 'spatial_streams: AUTO' --pull_report --local_lf_report_dir REPORT_PATH --test_tag 'ATH10K_9984_' ",
" --test_rig TEST_RIG",
" --set DUT_SET_NAME"
]
},
"test_l3_longevity":{
"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 15s --polling_interval 5s --upstream_port UPSTREAM_PORT ",
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED' ",
" --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_for_l3":{
"enabled":"TRUE",
"command":"lf_cleanup.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --cxs --sta"
]},
"test_l3_longevity_enable_flags":{
"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 15s --polling_interval 5s --upstream_port UPSTREAM_PORT ",
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,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_AX200_5g":{
"enabled":"TRUE",
"command":"lf_cleanup.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --cxs --sta"
]},
"test_l3_longevity_flags_AX200_5g":{
"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 60s --polling_interval 5s --upstream_port UPSTREAM_PORT ",
" 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_AX200_2g":{
"enabled":"TRUE",
"command":"lf_cleanup.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --cxs --sta"
]},
"test_l3_longevity_flags_AX200_2g":{
"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 60s --polling_interval 5s --upstream_port UPSTREAM_PORT ",
" use_ssid_idx=0 --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=0 --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=0 --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=0 --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_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 60s --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 60s --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_0":{
"enabled":"TRUE",
"command":"lf_cleanup.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --cxs --sta"
]
},
"test_ip_connection-ipv4":{
"enabled":"TRUE",
"command":"test_ip_connection.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --num_stations 4 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=1 --radio wiphy1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED",
" --debug"]},
"clean_up_cxs_endp_sta":{
"enabled":"TRUE",
"command":"lf_cleanup.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --cxs --sta"
]
},
"test_ip_variable_time_ipv4_24g":{
"enabled":"TRUE",
"command":"test_ip_variable_time.py",
"timeout":"360",
"args":"",
"args_list":[
" --mgr LF_MGR_IP ",
" use_ssid_idx=0 --radio wiphy0 --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_time_ipv4_5g":{
"enabled":"TRUE",
"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'"
]
},
"test_ip_variable_time_ipv4_5g_udp":{
"enabled":"FALSE",
"command":"test_ip_variable_time.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --radio wiphy1 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED",
" --test_duration 15s --output_format csv --layer3_cols name,tx_bytes,rx_bytes,dropped",
" --traffic_type lf_udp",
" --debug"]},
"test_ip_variable_time_ipv4_5g_tcp":{
"enabled":"FALSE",
"command":"test_ip_variable_time.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --radio wiphy1 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED",
" --test_duration 15s --output_format csv --layer3_cols name,tx_bytes,rx_bytes,dropped",
" --traffic_type lf_tcp",
" --debug"]},
"test_ip_connection_ipv6_udp":{
"enabled":"FALSE",
"command":"test_ip_connection.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --radio wiphy1 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED",
" --test_duration 15s --output_format csv --layer3_cols name,tx_bytes,rx_bytes,dropped",
" --traffic_type lf_udp",
" --ipv6",
" --debug"]},
"test_ip_variable_time_ipv6_tcp":{
"enabled":"FALSE",
"command":"test_ip_variable_time.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --radio wiphy1 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED",
" --test_duration 15s --output_format csv --layer3_cols name,tx_bytes,rx_bytes,dropped",
" --traffic_type lf_tcp",
" --ipv6",
" --debug"]},
"test_ip_variable_time1-ipv6":{
"enabled":"FALSE",
"command":"test_ip_variable_time.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --radio wiphy1 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED",
" --test_duration 15s --output_format csv --layer3_cols name,tx_bytes,rx_bytes,dropped",
" --traffic_type lf_tcp",
" --ipv6",
" --debug"
]
},
"create_bridge":{
"enabled":"TRUE",
"command":"create_bridge.py",
"args":"",
"args_list":["--mgr LF_MGR_IP --radio wiphy1 --upstream_port UPSTREAM_PORT --target_device sta0000 --debug"
]
},
"create_l3_stations":{
"enabled":"TRUE",
"load_db":"NONE",
"command":"create_l3_stations.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --radio wiphy1 --num_stations 4 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED "
]
},
"lf_report_test":{
"enabled":"TRUE",
"load_db":"NONE",
"timeout":"60",
"command":"lf_report_test.py",
"args":"",
"args_list":[" --mgr LF_MGR_IP "
]
},
"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",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED "
]
},
"test_ipv4_ttls":{
"enabled":"FALSE",
"command":"test_ipv4_ttls.py",
"args":"",
"args_list":[
"--mgr LF_MGR_IP --radio 1.1.wiphy0 --upstream_port 1.1.eth2 ",
" use_ssid_idx=0 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED "
]
},
"clean_up_cxs_endp_sta_l3_powersave":{
"enabled":"TRUE",
"command":"lf_cleanup.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --cxs --sta"
]},
"test_l3_powersave_traffic":{
"enabled":"TRUE",
"command":"test_l3_powersave_traffic.py",
"args":"",
"args_list":[
"--mgr LF_MGR_IP --radio 1.1.wiphy4 --monitor_radio 1.1.wiphy6 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=0 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED "
]
},
"clean_up_cxs_endp_sta_l4":{
"enabled":"TRUE",
"command":"lf_cleanup.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --cxs --sta"
]},
"test_l4":{
"enabled":"TRUE",
"command":"test_l4.py",
"args":"",
"args_list":[
"--mgr LF_MGR_IP --radio wiphy1 ",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED ",
" --test_duration 30s"
]
},
"test_l3_longevity_1":{
"enabled":"TRUE",
"command":"test_l3_longevity.py",
"args":"",
"args_list":[
" --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 15s --polling_interval 5s --upstream_port UPSTREAM_PORT ",
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED' ",
" --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"
]
},
"create_l4":{
"enabled":"TRUE",
"command":"create_l4.py",
"args":"",
"args_list":[
" --mgr LF_MGR_IP --radio wiphy1 --num_stations 4 --upstream_port UPSTREAM_PORT",
" use_ssid_idx=1 --ssid SSID_USED --passwd SSID_PW_USED --security SECURITY_USED",
" --debug"
]
},
"test_status_msg":{
"enabled":"TRUE",
"command":"test_status_msg.py",
"args":"",
"args_list":["--mgr LF_MGR_IP --action run_test"
]
},
"wlan_capacity_calculator1":{
"enabled":"TRUE",
"command":"./wlan_capacity_calculator.py",
"args":"",
"args_list":["-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":"",
"args_list":["-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":"",
"args_list":["-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"
]
},
"lf_graph":{
"enabled":"TRUE",
"load_db":"NONE",
"timeout":"60",
"command":"lf_graph.py",
"args":"",
"args_list":[" --mgr LF_MGR_IP "
]
},
"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"
]
}
}
}
}