Fixing some warnings which were popping up by replace is to -- and is not to !=

Minor help text fixes
Improving regression_test

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
Matthew Stidham
2021-09-20 09:42:18 -07:00
parent bad7c2102d
commit b8430794a5
4 changed files with 17 additions and 12 deletions

View File

@@ -370,7 +370,7 @@ def main():
# Password (if Security is not Open)
if (args.password is not None):
password = args.password
if (args.password is 'open'):
if (args.password == 'open'):
password = "[Blank]"
if (args.password is None):
password = "[Blank]"
@@ -397,9 +397,9 @@ def main():
if (args.min_mbps is not None):
min_bps = int(args.min_mbps)*1000000
if (args.max_mbps is not None and args.max_mbps is not "same"):
if (args.max_mbps is not None and args.max_mbps != "same"):
max_bps = int(args.max_mbps)*1000000
if (args.max_mbps is not None and args.max_mbps is "same"):
if (args.max_mbps is not None and args.max_mbps == "same"):
max_bps = args.min_mbps
if (args.duration is not None):
duration = (args.duration * 60)/5

4
py-scripts/lf_ftp.py Normal file → Executable file
View File

@@ -1,5 +1,5 @@
""" ftp_test.py will verify that N clients connected on specified band and can simultaneously download/upload some amount of file from FTP server and measuring the time taken by client to download/upload the file.
cli- python3 ftp_test.py --mgr localhost --mgr_port 8080 --upstream_port eth1 --ssid FTP --security open --passwd BLANK --ap_name WAC505 --ap_ip 192.168.213.90 --bands Both --directions Download --twog_radio wiphy1 --fiveg_radio wiphy0 --file_size 2MB --num_stations 40 --Both_duration 1 --traffic_duration 2 --ssh_port 22_
""" lf_ftp.py will verify that N clients connected on specified band and can simultaneously download/upload some amount of file from FTP server and measuring the time taken by client to download/upload the file.
cli- python3 lf_ftp.py --mgr localhost --mgr_port 8080 --upstream_port eth1 --ssid FTP --security open --passwd BLANK --ap_name WAC505 --ap_ip 192.168.213.90 --bands Both --directions Download --twog_radio wiphy1 --fiveg_radio wiphy0 --file_size 2MB --num_stations 40 --Both_duration 1 --traffic_duration 2 --ssh_port 22_
Copyright 2021 Candela Technologies Inc
License: Free to distribute and modify. LANforge systems must be licensed.
"""

View File

@@ -14,7 +14,7 @@ SETUP:
EXAMPLE:
'./ftp_test.py --ssid "jedway-wap2-x2048-5-3" --passwd "jedway-wpa2-x2048-5-3" --security wpa2 --bands "5G" --direction "Download" \
'./lf_ftp_test.py --ssid "jedway-wap2-x2048-5-3" --passwd "jedway-wpa2-x2048-5-3" --security wpa2 --bands "5G" --direction "Download" \
--file_size "2MB" --num_stations 2
INCLUDE_IN_README
@@ -50,7 +50,7 @@ ftp_html = importlib.import_module("py-scripts.ftp_html")
class ftp_test(LFCliBase):
def __init__(self, lfclient_host="localhost", lfclient_port=8080, radio = "wiphy0", sta_prefix="sta", start_id=0, num_sta= None,
dut_ssid=None,dut_security=None, dut_passwd=None, file_size=None, band=None,
upstream="eth1",_debug_on=False, _exit_on_error=False, _exit_on_fail=False, direction= None):
upstream="eth1",_debug_on=False, _exit_on_error=False, _exit_on_fail=False, direction= None,user='lanforge'):
super().__init__(lfclient_host, lfclient_port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
print("Test is about to start")
self.host = lfclient_host
@@ -72,6 +72,7 @@ class ftp_test(LFCliBase):
self.cx_profile = self.local_realm.new_http_profile()
self.port_util = realm.PortUtils(self.local_realm)
self.cx_profile.requests_per_ten = self.requests_per_ten
self.user = user
print("Test is Initialized")
@@ -464,6 +465,7 @@ def main():
parser.add_argument('--directions', nargs="+", help='--directions defaults ["Download","Upload"]', 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_client is number of stations', default=40)
parser.add_argument('--user', default='lanforge')
args = parser.parse_args()
@@ -489,7 +491,8 @@ def main():
num_sta= args.num_stations,
band=band,
file_size=file_size,
direction=direction
direction=direction,
user=args.user
)
iteraration_num=iteraration_num+1
@@ -542,11 +545,11 @@ def main():
"user": "root",
"Contact": "support@candelatech.com"
}
generate_report(ftp_data,
ftp_html.generate_report(ftp_data,
date,
test_setup_info,
input_setup_info,
graph_path="/home/lanforge/html-reports/FTP-Test")
graph_path="/home/%s/html-reports/FTP-Test" % args.user)
if __name__ == '__main__':

View File

@@ -193,8 +193,10 @@ if [[ $MGRLEN -gt 0 ]]; then
--influx_tag testbed Ferndale-01"
#./lf_dfs_test
#./lf_dut_sta_vap_test
#./lf_ftp
#./lf_ftp_test
#"./lf_ftp.py --mgr $MGR --mgr_port 8080 --upstream_port $UPSTREAM --ssid $SSID --security $SECURITY --passwd $PASSWD_USED \
# --ap_name WAC505 --ap_ip 192.168.213.90 --bands Both --directions Download --twog_radio wiphy1 --fiveg_radio wiphy0 --file_size 2MB --num_stations 40 --Both_duration 1 --traffic_duration 2 --ssh_port 22_"
"./lf_ftp_test.py --mgr $MGR --ssid $SSID --passwd $PASSWD_USED --security $SECURITY --bands 5G --direction Download \
--file_size 2MB --num_stations 2"
#./lf_graph
#./lf_influx_db
#./lf_mesh_test