mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
addition of report comparison in ipv4_var_time
This commit is contained in:
@@ -1143,7 +1143,8 @@ class L3CXProfile(BaseProfile):
|
|||||||
report_file=None,
|
report_file=None,
|
||||||
output_format=None,
|
output_format=None,
|
||||||
script_name=None,
|
script_name=None,
|
||||||
arguments=None):
|
arguments=None,
|
||||||
|
compared_report=None):
|
||||||
try:
|
try:
|
||||||
duration_sec = self.parse_time(duration_sec).seconds
|
duration_sec = self.parse_time(duration_sec).seconds
|
||||||
except:
|
except:
|
||||||
@@ -1237,6 +1238,8 @@ class L3CXProfile(BaseProfile):
|
|||||||
df["Timestamp milliseconds"]=df["Timestamp milliseconds"].astype(int)
|
df["Timestamp milliseconds"]=df["Timestamp milliseconds"].astype(int)
|
||||||
df["Timestamp"]=df["Timestamp"].apply(lambda x:x.strftime("%m/%d/%Y %I:%M:%S"))
|
df["Timestamp"]=df["Timestamp"].apply(lambda x:x.strftime("%m/%d/%Y %I:%M:%S"))
|
||||||
df=df[["Timestamp","Timestamp milliseconds", *header_row[:-2]]]
|
df=df[["Timestamp","Timestamp milliseconds", *header_row[:-2]]]
|
||||||
|
#compare previous data to current data
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
systeminfo = ast.literal_eval(requests.get('http://'+str(self.lfclient_host)+':'+str(self.lfclient_port)).text)
|
systeminfo = ast.literal_eval(requests.get('http://'+str(self.lfclient_host)+':'+str(self.lfclient_port)).text)
|
||||||
|
|||||||
@@ -192,7 +192,8 @@ python3 ./test_ipv4_variable_time.py
|
|||||||
optional_args.add_argument('--a_min', help='--a_min bps rate minimum for side_a', default=256000)
|
optional_args.add_argument('--a_min', help='--a_min bps rate minimum for side_a', default=256000)
|
||||||
optional_args.add_argument('--b_min', help='--b_min bps rate minimum for side_b', default=256000)
|
optional_args.add_argument('--b_min', help='--b_min bps rate minimum for side_b', default=256000)
|
||||||
optional_args.add_argument('--test_duration', help='--test_duration sets the duration of the test', default="2m")
|
optional_args.add_argument('--test_duration', help='--test_duration sets the duration of the test', default="2m")
|
||||||
optional_args.add_argument('--col_names', help='Which columns you want to monitor', default=['name','tx bytes', 'rx bytes','dropped'])
|
optional_args.add_argument('--col_names', help='Columns wished to be monitor', default=['name','tx bytes', 'rx bytes','dropped'])
|
||||||
|
optional_args.add_argument('--compared_report',help='report path and file which is wished to be compared with new report', default=None)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
num_sta = 2
|
num_sta = 2
|
||||||
@@ -221,6 +222,15 @@ python3 ./test_ipv4_variable_time.py
|
|||||||
output=str(args.report_file).split('.')[-1]
|
output=str(args.report_file).split('.')[-1]
|
||||||
else:
|
else:
|
||||||
output=args.output_format
|
output=args.output_format
|
||||||
|
#Retrieve last data file
|
||||||
|
if args.compared_report:
|
||||||
|
#check if last report format is same as current rpt format
|
||||||
|
last_report_format = args.compared_report.split('.')[-1]
|
||||||
|
if output == last_report_format:
|
||||||
|
compared_rept = args.compared_report
|
||||||
|
else:
|
||||||
|
ValueError("Compared report format is not the same as the new report format. Please make sure they are of the same file type.")
|
||||||
|
|
||||||
|
|
||||||
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=num_sta-1, padding_number_=10000, radio=args.radio)
|
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=num_sta-1, padding_number_=10000, radio=args.radio)
|
||||||
ip_var_test = IPV4VariableTime(host=args.mgr,
|
ip_var_test = IPV4VariableTime(host=args.mgr,
|
||||||
@@ -262,6 +272,7 @@ python3 ./test_ipv4_variable_time.py
|
|||||||
duration_sec=ip_var_test.local_realm.parse_time(args.test_duration).total_seconds(),
|
duration_sec=ip_var_test.local_realm.parse_time(args.test_duration).total_seconds(),
|
||||||
created_cx= layer3connections,
|
created_cx= layer3connections,
|
||||||
output_format=output,
|
output_format=output,
|
||||||
|
compared_report=compared_rept,
|
||||||
script_name='test_ipv4_variable_time',
|
script_name='test_ipv4_variable_time',
|
||||||
arguments=args)
|
arguments=args)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user