From b8e2b1a1096e29f90e76489b93d1a432a75f525f Mon Sep 17 00:00:00 2001 From: Logan Lipke Date: Tue, 29 Dec 2020 16:56:16 -0800 Subject: [PATCH] Added docstring for documentation and usage example --- py-scripts/test_ipv4_connection.py | 2 +- py-scripts/test_ipv4_l4.py | 8 ++++++++ py-scripts/test_ipv4_l4_ftp_upload.py | 8 ++++++++ py-scripts/test_ipv4_l4_ftp_urls_per_ten.py | 9 +++++++++ py-scripts/test_ipv4_l4_ftp_wifi.py | 10 +++++++++- py-scripts/test_ipv4_l4_urls_per_ten.py | 9 +++++++++ py-scripts/test_ipv4_l4_wifi.py | 8 ++++++++ 7 files changed, 52 insertions(+), 2 deletions(-) diff --git a/py-scripts/test_ipv4_connection.py b/py-scripts/test_ipv4_connection.py index 7781316d..76cb0ec8 100755 --- a/py-scripts/test_ipv4_connection.py +++ b/py-scripts/test_ipv4_connection.py @@ -5,7 +5,7 @@ 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_ipv4_connection.py` --help to see command line usage and options + Use './test_ipv4_connection.py' --help to see command line usage and options """ import sys diff --git a/py-scripts/test_ipv4_l4.py b/py-scripts/test_ipv4_l4.py index ae88bf6c..35b0f324 100755 --- a/py-scripts/test_ipv4_l4.py +++ b/py-scripts/test_ipv4_l4.py @@ -1,5 +1,13 @@ #!/usr/bin/env python3 +""" + This script will create a variable number of stations that will attempt to use layer 4 endpoints to generate traffic. + A test will run for a specified amount of time with periodic checks for traffic successfully being received. The test will + monitor the bytes-rd column of the endpoints. An increase at every test interval will pass the test, otherwise it will fail + + Use './test_ipv4_l4.py --help' to see command line usage and options +""" + import sys if sys.version_info[0] != 3: diff --git a/py-scripts/test_ipv4_l4_ftp_upload.py b/py-scripts/test_ipv4_l4_ftp_upload.py index c172d780..7db91924 100755 --- a/py-scripts/test_ipv4_l4_ftp_upload.py +++ b/py-scripts/test_ipv4_l4_ftp_upload.py @@ -1,5 +1,13 @@ #!/usr/bin/env python3 +""" + This script will create a variable number of stations that will attempt to use layer 4 endpoints to generate traffic over ftp. + A test will run for a specified amount of time with periodic checks for traffic successfully being received. The test will + monitor the bytes-wr column of the endpoints. An increase at every test interval will pass the test, otherwise it will fail + + Use './test_ipv4_l4_ftp_upload.py --help' to see command line usage and options +""" + import sys if sys.version_info[0] != 3: diff --git a/py-scripts/test_ipv4_l4_ftp_urls_per_ten.py b/py-scripts/test_ipv4_l4_ftp_urls_per_ten.py index fd18e361..c2e2a9f3 100755 --- a/py-scripts/test_ipv4_l4_ftp_urls_per_ten.py +++ b/py-scripts/test_ipv4_l4_ftp_urls_per_ten.py @@ -1,5 +1,14 @@ #!/usr/bin/env python3 +""" + This script will create a variable number of stations that will attempt to use layer 4 endpoints to generate traffic over ftp. + A test will run a specified number of times with periodic checks for traffic successfully being received every ten minutes. + The test will monitor the urls/s column of the endpoints. Being at or above 90% of the chosen url rate at each interval + will pass the test, otherwise it will fail + + Use './test_ipv4_l4_ftp_urls_per_ten.py --help' to see command line usage and options +""" + import sys import os if sys.version_info[0] != 3: diff --git a/py-scripts/test_ipv4_l4_ftp_wifi.py b/py-scripts/test_ipv4_l4_ftp_wifi.py index 6b39a574..fc08c7cf 100755 --- a/py-scripts/test_ipv4_l4_ftp_wifi.py +++ b/py-scripts/test_ipv4_l4_ftp_wifi.py @@ -1,5 +1,13 @@ #!/usr/bin/env python3 +""" + This script will create a variable number of stations that will attempt to use layer 4 endpoints to generate traffic over ftp. + A test will run for a specified amount of time with periodic checks for traffic successfully being received. The test will + monitor the bytes-wr column of the endpoints. An increase at every test interval will pass the test, otherwise it will fail + + Use './test_ipv4_l4_ftp_wifi.py --help' to see command line usage and options +""" + import sys if sys.version_info[0] != 3: @@ -160,7 +168,7 @@ def main(): # formatter_class=argparse.RawDescriptionHelpFormatter, formatter_class=argparse.RawTextHelpFormatter, epilog='''\ - Create layer-4 endpoints and test that the bytes-rd from the chosen URL are increasing over the + Create layer-4 endpoints and test that the bytes-wr from the chosen URL are increasing over the duration of the test ''', diff --git a/py-scripts/test_ipv4_l4_urls_per_ten.py b/py-scripts/test_ipv4_l4_urls_per_ten.py index dbe5ec8f..eacfdc5b 100755 --- a/py-scripts/test_ipv4_l4_urls_per_ten.py +++ b/py-scripts/test_ipv4_l4_urls_per_ten.py @@ -1,5 +1,14 @@ #!/usr/bin/env python3 +""" + This script will create a variable number of stations that will attempt to use layer 4 endpoints to generate traffic. + A test will run a specified number of times with periodic checks for traffic successfully being received every ten minutes. + The test will monitor the urls/s column of the endpoints. Being at or above 90% of the chosen url rate at each interval + will pass the test, otherwise it will fail + + Use './test_ipv4_l4_urls_per_ten.py --help' to see command line usage and options +""" + import sys import os if sys.version_info[0] != 3: diff --git a/py-scripts/test_ipv4_l4_wifi.py b/py-scripts/test_ipv4_l4_wifi.py index 59e71b94..b16f7c48 100755 --- a/py-scripts/test_ipv4_l4_wifi.py +++ b/py-scripts/test_ipv4_l4_wifi.py @@ -1,5 +1,13 @@ #!/usr/bin/env python3 +""" + This script will create a variable number of stations that will attempt to use layer 4 endpoints to generate traffic. + A test will run for a specified amount of time with periodic checks for traffic successfully being received. The test will + monitor the bytes-rd column of the endpoints. An increase at every test interval will pass the test, otherwise it will fail + + Use './test_ipv4_l4_wifi.py --help' to see command line usage and options +""" + import sys if sys.version_info[0] != 3: