mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
Added docstring for documentation and usage example
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
This script will create a variable number of stations or macvlans to test fileio traffic. Pre-existing stations and
|
||||
macvlans can be used as well. Command line options are available to update cross-connects as well as using a list of
|
||||
existing cross-connects if desired. if none are given, cross-connects and endpoints will be created by the script.
|
||||
Modes such as read-only, write-only, or both can be specified as well as ip addresses and starting numbers for sequential
|
||||
stations or macvlans that are created in case of limited or pre-existing configurations. The test that is run during
|
||||
this script will depend on the mode used, a read-only test will check the read-bps column, write-only will check write-bps
|
||||
and both will check both columns. If the relevant columns increase over the duration of the test it will pass,
|
||||
otherwise it will fail.
|
||||
|
||||
Use './test_fileio.py --help' to see command line usage and options
|
||||
"""
|
||||
|
||||
import sys
|
||||
if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
This script will create a variable number of stations to test generic endpoints. Multiple command types can be tested
|
||||
including ping, speedtest, generic types. The test will check the last result column for different things
|
||||
depending on what test is being run. Ping will test for successful pings, speedtest will test for download
|
||||
speed, upload speed, and ping time, generic will test for successful generic commands
|
||||
|
||||
Use './test_generic.py --help' to see command line usage and options
|
||||
"""
|
||||
|
||||
import pprint
|
||||
import sys
|
||||
import os
|
||||
@@ -187,7 +197,8 @@ def main():
|
||||
prog='test_generic.py',
|
||||
formatter_class=argparse.RawTextHelpFormatter,
|
||||
epilog='''Create generic endpoints and test for their ability to execute chosen commands\n''',
|
||||
description='''test_generic.py
|
||||
description='''
|
||||
test_generic.py
|
||||
--------------------
|
||||
Generic command example:
|
||||
python3 ./test_generic.py
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
This script will create a variable number of stations each with their own set of cross-connects and endpoints.
|
||||
It will then create layer 3 traffic over a specified amount of time, testing for increased traffic at regular intervals.
|
||||
This test will pass if all stations increase traffic over the full test duration.
|
||||
|
||||
Use './test_ipv4_variable_time.py --help' to see command line usage and options
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
@@ -141,37 +149,37 @@ def main():
|
||||
''',
|
||||
|
||||
description='''\
|
||||
test_ipv4_variable_time.py:
|
||||
--------------------
|
||||
Generic command layout:
|
||||
test_ipv4_variable_time.py:
|
||||
--------------------
|
||||
Generic command layout:
|
||||
|
||||
python3 ./test_ipv4_variable_time.py
|
||||
--upstream_port eth1
|
||||
--radio wiphy0
|
||||
--num_stations 32
|
||||
--security {open|wep|wpa|wpa2|wpa3} \\
|
||||
--mode 1
|
||||
{"auto" : "0",
|
||||
"a" : "1",
|
||||
"b" : "2",
|
||||
"g" : "3",
|
||||
"abg" : "4",
|
||||
"abgn" : "5",
|
||||
"bgn" : "6",
|
||||
"bg" : "7",
|
||||
"abgnAC" : "8",
|
||||
"anAC" : "9",
|
||||
"an" : "10",
|
||||
"bgnAC" : "11",
|
||||
"abgnAX" : "12",
|
||||
"bgnAX" : "13",
|
||||
--ssid netgear
|
||||
--password admin123
|
||||
--test_duration 2m (default)
|
||||
--a_min 1000
|
||||
--b_min 1000
|
||||
--ap "00:0e:8e:78:e1:76"
|
||||
--debug
|
||||
python3 ./test_ipv4_variable_time.py
|
||||
--upstream_port eth1
|
||||
--radio wiphy0
|
||||
--num_stations 32
|
||||
--security {open|wep|wpa|wpa2|wpa3} \\
|
||||
--mode 1
|
||||
{"auto" : "0",
|
||||
"a" : "1",
|
||||
"b" : "2",
|
||||
"g" : "3",
|
||||
"abg" : "4",
|
||||
"abgn" : "5",
|
||||
"bgn" : "6",
|
||||
"bg" : "7",
|
||||
"abgnAC" : "8",
|
||||
"anAC" : "9",
|
||||
"an" : "10",
|
||||
"bgnAC" : "11",
|
||||
"abgnAX" : "12",
|
||||
"bgnAX" : "13",
|
||||
--ssid netgear
|
||||
--password admin123
|
||||
--test_duration 2m (default)
|
||||
--a_min 1000
|
||||
--b_min 1000
|
||||
--ap "00:0e:8e:78:e1:76"
|
||||
--debug
|
||||
''')
|
||||
|
||||
required_args=None
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Script for creating a variable number of stations and attempting to connect them to an SSID using IPv6.
|
||||
A test will run to verify stations are associated and get an IP, if these conditions are both true, the test will
|
||||
pass, otherwise, the test will fail.
|
||||
|
||||
Use './test_ipv6_connection.py --help' to see command line usage and options
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
if sys.version_info[0] != 3:
|
||||
@@ -129,7 +137,7 @@ def main():
|
||||
''',
|
||||
|
||||
description='''\
|
||||
test_ipv6_connection.py:
|
||||
test_ipv6_connection.py:
|
||||
--------------------------------------------------
|
||||
Generic command example:
|
||||
python3 ./test_ipv6_connection.py
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
This script will create a variable number of stations, using IPv6, each with their own set of cross-connects and endpoints.
|
||||
It will then create layer 3 traffic over a specified amount of time, testing for increased traffic at regular intervals.
|
||||
This test will pass if all stations increase traffic over the full test duration.
|
||||
|
||||
Use './test_ipv6_variable_time.py --help' to see command line usage and options
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
Reference in New Issue
Block a user