diff --git a/py-json/vap_profile.py b/py-json/vap_profile.py index 173610f2..9287e9ac 100644 --- a/py-json/vap_profile.py +++ b/py-json/vap_profile.py @@ -33,10 +33,12 @@ class VAPProfile(LFCliBase): self.COMMANDS = ["add_vap", "set_port"] self.desired_add_vap_flags = ["wpa2_enable", "80211u_enable", "create_admin_down"] self.desired_add_vap_flags_mask = ["wpa2_enable", "80211u_enable", "create_admin_down"] + self.shelf = 1 + self.resource = 1 self.add_vap_data = { - "shelf": 1, - "resource": 1, + "shelf": self.shelf, + "resource": self.resource, "radio": None, "ap_name": None, "flags": 0, @@ -51,16 +53,16 @@ class VAPProfile(LFCliBase): self.desired_set_port_current_flags = ["if_down"] self.desired_set_port_interest_flags = ["current_flags", "ifdown"] self.set_port_data = { - "shelf": 1, - "resource": 1, + "shelf": self.shelf, + "resource": self.resource, "port": None, "current_flags": 0, "interest": 0, # (0x2 + 0x4000 + 0x800000) # current, dhcp, down } self.wifi_extra_data_modified = False self.wifi_extra_data = { - "shelf": 1, - "resource": 1, + "shelf": self.shelf, + "resource": self.resource, "port": None, "key_mgmt": None, "eap": None, @@ -70,6 +72,7 @@ class VAPProfile(LFCliBase): "realm": None, "domain": None } + self.up = None def set_wifi_extra(self, key_mgmt="WPA-EAP", @@ -219,6 +222,14 @@ class VAPProfile(LFCliBase): def create(self, resource, radio, channel=None, up_=None, debug=False, use_ht40=True, use_ht80=True, use_ht160=False, suppress_related_commands_=True, use_radius=False, hs20_enable=False, bridge=True): + eid = LFUtils.name_to_eid(radio) + self.shelf = eid[0] + self.resource = eid[1] + radio = eid[2] + + if resource: + self.resource = resource + port_list = self.local_realm.json_get("port/1/1/list") if port_list is not None: port_list = port_list['interfaces'] @@ -248,19 +259,19 @@ class VAPProfile(LFCliBase): # print("MODE ========= ", self.mode) - jr = self.local_realm.json_get("/radiostatus/1/%s/%s?fields=channel,frequency,country" % (resource, radio), + jr = self.local_realm.json_get("/radiostatus/1/%s/%s?fields=channel,frequency,country" % (self.resource, radio), debug_=self.debug) if jr is None: - raise ValueError("No radio %s.%s found" % (resource, radio)) + raise ValueError("No radio %s.%s found" % (self.resource, radio)) - eid = "1.%s.%s" % (resource, radio) + eid_2 = "1.%s.%s" % (self.resource, radio) country = 0 - if eid in jr: - country = jr[eid]["country"] + if eid_2 in jr: + country = jr[eid_2]["country"] data = { - "shelf": 1, - "resource": resource, + "shelf": self.shelf, + "resource": self.resource, "radio": radio, "mode": self.mode, # "NA", #0 for AUTO or "NA" "channel": channel, @@ -355,7 +366,7 @@ class VAPProfile(LFCliBase): if self.up: self.admin_up(resource) - def cleanup(self, resource, delay=0.03): + def cleanup(self, resource): print("Cleaning up VAPs") desired_ports = ["1.%s.%s" % (resource, self.vap_name), "1.%s.br0" % resource] diff --git a/py-json/wifi_monitor_profile.py b/py-json/wifi_monitor_profile.py index 7089c8b0..0ace016e 100644 --- a/py-json/wifi_monitor_profile.py +++ b/py-json/wifi_monitor_profile.py @@ -28,9 +28,13 @@ class WifiMonitor: self.flag_mask_names = [] self.flags_mask = add_monitor.default_flags_mask self.aid = "NA" # used when sniffing /ax radios - self.bsssid = "00:00:00:00:00:00" # used when sniffing on /ax radios + self.bssid = "00:00:00:00:00:00" # used when sniffing on /ax radios def create(self, resource_=1, channel=None, mode="AUTO", radio_="wiphy0", name_="moni0"): + radio_eid = self.local_realm.name_to_eid(radio_) + radio_shelf = radio_eid[0] + self.resource = radio_eid[1] + radio_ = radio_eid[2] print("Creating monitor " + name_) self.monitor_name = name_ computed_flags = 0 @@ -40,20 +44,19 @@ class WifiMonitor: # we want to query the existing country code of the radio # there's no reason to change it but we get hollering from server # if we don't provide a value for the parameter - jr = self.local_realm.json_get("/radiostatus/1/%s/%s?fields=channel,frequency,country" % (resource_, radio_), + jr = self.local_realm.json_get("/radiostatus/1/%s/%s?fields=channel,frequency,country" % (self.resource, radio_), debug_=self.debug) if jr is None: - raise ValueError("No radio %s.%s found" % (resource_, radio_)) + raise ValueError("No radio %s.%s found" % (self.resource, radio_)) - eid = "1.%s.%s" % (resource_, radio_) # frequency = 0 country = 0 - if eid in jr: - country = jr[eid]["country"] + if radio_ in jr: + country = jr[radio_]["country"] data = { - "shelf": 1, - "resource": resource_, + "shelf": radio_shelf, + "resource": self.resource, "radio": radio_, "mode": set_radio_mode[mode], # "NA", #0 for AUTO or "NA" "channel": channel, @@ -64,8 +67,8 @@ class WifiMonitor: self.local_realm.json_post("/cli-json/set_wifi_radio", _data=data) time.sleep(1) self.local_realm.json_post("/cli-json/add_monitor", { - "shelf": 1, - "resource": resource_, + "shelf": radio_shelf, + "resource": self.resource, "radio": radio_, "ap_name": self.monitor_name, "flags": computed_flags, @@ -81,31 +84,31 @@ class WifiMonitor: del self.flag_names[param_name] self.flags_mask |= add_monitor.flags[param_name] - def cleanup(self, resource_=1, desired_ports=None): + def cleanup(self, desired_ports=None): print("Cleaning up monitors") if (desired_ports is None) or (len(desired_ports) < 1): if (self.monitor_name is None) or (self.monitor_name == ""): print("No monitor name set to delete") return - LFUtils.removePort(resource=resource_, + LFUtils.removePort(resource=self.resource, port_name=self.monitor_name, baseurl=self.lfclient_url, debug=self.debug) else: names = ",".join(desired_ports) - existing_ports = self.local_realm.json_get("/port/1/%d/%s?fields=alias" % (resource_, names), debug_=False) + existing_ports = self.local_realm.json_get("/port/1/%d/%s?fields=alias" % (self.resource, names), debug_=False) if (existing_ports is None) or ("interfaces" not in existing_ports) or ("interface" not in existing_ports): print("No monitor names found to delete") return if "interfaces" in existing_ports: for eid, info in existing_ports["interfaces"].items(): - LFUtils.removePort(resource=resource_, + LFUtils.removePort(resource=self.resource, port_name=info["alias"], baseurl=self.lfclient_url, debug=self.debug) if "interface" in existing_ports: for eid, info in existing_ports["interface"].items(): - LFUtils.removePort(resource=resource_, + LFUtils.removePort(resource=self.resource, port_name=info["alias"], baseurl=self.lfclient_url, debug=self.debug) @@ -124,7 +127,7 @@ class WifiMonitor: raise ValueError("Need a capture file name") data = { "shelf": 1, - "resource": 1, + "resource": self.resource, "port": self.monitor_name, "display": "NA", "flags": 0x2, diff --git a/py-scripts/README.md b/py-scripts/README.md index e405dd9c..44ccdb3e 100644 --- a/py-scripts/README.md +++ b/py-scripts/README.md @@ -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`: diff --git a/py-scripts/create_macvlan.py b/py-scripts/create_macvlan.py index 7123b23e..aa89abd2 100755 --- a/py-scripts/create_macvlan.py +++ b/py-scripts/create_macvlan.py @@ -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, diff --git a/py-scripts/lf_cleanup.py b/py-scripts/lf_cleanup.py index b1a1901f..c9fb0616 100755 --- a/py-scripts/lf_cleanup.py +++ b/py-scripts/lf_cleanup.py @@ -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() diff --git a/py-scripts/lf_ftp.py b/py-scripts/lf_ftp.py index 4de260eb..13a8face 100755 --- a/py-scripts/lf_ftp.py +++ b/py-scripts/lf_ftp.py @@ -712,24 +712,24 @@ def main(): FTP Test Script - lf_ftp.py --------------------------- CLI Example: -./lf_ftp.py --ssid --passwd --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 --passwd --file_sizes 2MB --fiveg_duration --mgr 192.168.1.101 --traffic_duration --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() diff --git a/py-scripts/lf_webpage.py b/py-scripts/lf_webpage.py index 32f80daf..49adce69 100755 --- a/py-scripts/lf_webpage.py +++ b/py-scripts/lf_webpage.py @@ -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 ", 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() diff --git a/py-scripts/regression_test.sh b/py-scripts/regression_test.sh index 212041c2..fc039a2b 100755 --- a/py-scripts/regression_test.sh +++ b/py-scripts/regression_test.sh @@ -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="STDERR" - else - echo "No errors detected" fi results+=("${CURR_TEST_NAME} ${testcommand} @@ -662,12 +667,12 @@ td.testname { " - tail="" + f="" fname="${HOMEPATH}/html-reports/regression_file-${NOW}.html" echo "$header" >> "$fname" echo "${results[@]}" >> "$fname" - echo " + echo "

System information

@@ -694,7 +699,9 @@ td.testname { ${PYTHON_ENVIRONMENT} - " >> "$fname" + + +" >> "$fname" echo "$tail" >> "$fname" if [ -f "${HOMEPATH}/html-reports/latest.html" ]; then rm -f "${HOMEPATH}/html-reports/latest.html" diff --git a/py-scripts/sandbox/README.md b/py-scripts/sandbox/README.md new file mode 100644 index 00000000..e405dd9c --- /dev/null +++ b/py-scripts/sandbox/README.md @@ -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`: diff --git a/py-scripts/sta_connect.py b/py-scripts/sta_connect.py index a9fac8f4..1cb18fa9 100755 --- a/py-scripts/sta_connect.py +++ b/py-scripts/sta_connect.py @@ -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: diff --git a/py-scripts/sta_connect2.py b/py-scripts/sta_connect2.py index 08cb9836..232b59a0 100755 --- a/py-scripts/sta_connect2.py +++ b/py-scripts/sta_connect2.py @@ -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() # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/py-scripts/sta_connect_example.py b/py-scripts/sta_connect_example.py index 685d1961..68621f83 100755 --- a/py-scripts/sta_connect_example.py +++ b/py-scripts/sta_connect_example.py @@ -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() diff --git a/py-scripts/test_ipv4_ttls.py b/py-scripts/test_ipv4_ttls.py index 4057f77e..cefa4ad4 100755 --- a/py-scripts/test_ipv4_ttls.py +++ b/py-scripts/test_ipv4_ttls.py @@ -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") diff --git a/py-scripts/test_l3_powersave_traffic.py b/py-scripts/test_l3_powersave_traffic.py index 88b87f27..3ed3b337 100755 --- a/py-scripts/test_l3_powersave_traffic.py +++ b/py-scripts/test_l3_powersave_traffic.py @@ -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() diff --git a/py-scripts/tools/ct_us_001_rig.json b/py-scripts/tools/ct_us_001_rig.json index 125b8454..51e9bba9 100644 --- a/py-scripts/tools/ct_us_001_rig.json +++ b/py-scripts/tools/ct_us_001_rig.json @@ -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 " diff --git a/py-scripts/tools/ct_us_002_rig.json b/py-scripts/tools/ct_us_002_rig.json index 2f6b8651..7be43276 100644 --- a/py-scripts/tools/ct_us_002_rig.json +++ b/py-scripts/tools/ct_us_002_rig.json @@ -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" diff --git a/py-scripts/tools/ct_us_003_rig.json b/py-scripts/tools/ct_us_003_rig.json index e5683a1e..cc51dff9 100644 --- a/py-scripts/tools/ct_us_003_rig.json +++ b/py-scripts/tools/ct_us_003_rig.json @@ -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" diff --git a/py-scripts/tools/ct_us_004_rig.json b/py-scripts/tools/ct_us_004_rig.json index 304427d7..97157d43 100644 --- a/py-scripts/tools/ct_us_004_rig.json +++ b/py-scripts/tools/ct_us_004_rig.json @@ -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 " diff --git a/py-scripts/tools/ct_us_scripts.json b/py-scripts/tools/ct_us_scripts.json new file mode 100644 index 00000000..3460dd24 --- /dev/null +++ b/py-scripts/tools/ct_us_scripts.json @@ -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 ", + "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" + ] + } + } + } +} + + + + \ No newline at end of file