From 12c8985424515fdd3497f889aef1a6c0ce1c9518 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Tue, 2 Nov 2021 07:52:55 -0600 Subject: [PATCH] l3_cxprofile.py append 'alias' soon to the columns test_ip_variable_time.py update example Signed-off-by: Chuck SmileyRekiere --- py-json/l3_cxprofile.py | 7 +++++-- py-scripts/test_ip_variable_time.py | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/py-json/l3_cxprofile.py b/py-json/l3_cxprofile.py index fbb30b3d..d3545a16 100644 --- a/py-json/l3_cxprofile.py +++ b/py-json/l3_cxprofile.py @@ -163,6 +163,11 @@ class L3CXProfile(LFCliBase): layer3_fields = ",".join(layer3_cols) default_cols = ['Timestamp', 'Timestamp milliseconds epoch', 'Timestamp seconds epoch', 'Duration elapsed'] default_cols.extend(layer3_cols) + # append alias to port_mgr_cols if not present needed later + if port_mgr_cols is not None: + if 'alias' not in port_mgr_cols: + port_mgr_cols.append('alias') + if port_mgr_cols is not None: default_cols.extend(port_mgr_cols) header_row = default_cols @@ -235,8 +240,6 @@ class L3CXProfile(LFCliBase): layer3.columns = ['l3-' + x for x in layer3.columns] if port_mgr_cols is not None: # create dataframe from port mgr results - if 'alias' not in port_mgr_cols: - port_mgr_cols.append('alias') result = dict() if type(port_mgr_response) is dict: for dictionary in port_mgr_response['interfaces']: diff --git a/py-scripts/test_ip_variable_time.py b/py-scripts/test_ip_variable_time.py index bbb334cb..11cc9906 100755 --- a/py-scripts/test_ip_variable_time.py +++ b/py-scripts/test_ip_variable_time.py @@ -374,6 +374,12 @@ python3 ./test_ip_variable_time.py --create_sta False (False, means it will not create stations and use the sta_names specified below) --sta_names sta000,sta001,sta002 (used if --create_sta False, comma separated names of stations) + Example Command: + python3 ./test_ip_variable_time.py --mgr 192.168.100.116 --radio wiphy1 + --ssid asus11ax-5 --passwd hello123 --security wpa2 --test_duration 60s + --output_format excel --traffic_type lf_tcp --a_min 1000000 --b_min 1000000 + --upstream_port eth2 --mode "5" --layer3_cols 'name','tx rate','rx rate' + --port_mgr_cols 'alias','channel','activity','mode' =============================================================================== ** FURTHER INFORMATION **