mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
flexible lfclient_port and correct l3 field names
This commit is contained in:
committed by
Jed Reynolds
parent
ca5a673a4f
commit
51ea187b2f
@@ -1170,8 +1170,12 @@ class L3CXProfile(BaseProfile):
|
||||
else:
|
||||
output_format = report_file.split('.')[-1]
|
||||
|
||||
# Step 1, column names
|
||||
fields = ",".join(col_names)
|
||||
# Step 1, column names . what is this for?
|
||||
fields=None
|
||||
if col_names is not None and len(col_names) > 0:
|
||||
fields = ",".join(col_names)
|
||||
else:
|
||||
header_row=list((list(self.json_get("/endp/all")['endpoint'][0].values())[0].keys()))
|
||||
print(fields)
|
||||
# Step 2, monitor columns
|
||||
start_time = datetime.datetime.now()
|
||||
@@ -1185,7 +1189,7 @@ class L3CXProfile(BaseProfile):
|
||||
timestamps = []
|
||||
# for x in range(0,int(round(iterations,0))):
|
||||
while datetime.datetime.now() < end_time:
|
||||
if fields == None:
|
||||
if fields is None:
|
||||
response = self.json_get("/endp/all")
|
||||
else:
|
||||
response = self.json_get("/endp/%s?fields=%s" % (created_cx, fields))
|
||||
|
||||
@@ -200,8 +200,10 @@ python3 ./test_ipv4_variable_time.py
|
||||
num_sta = int(args.num_stations)
|
||||
|
||||
#Create directory
|
||||
homedir=str(datetime.datetime.now()).replace(':','-')+'test_ipv4_variable_time'
|
||||
os.mkdir('/home/lanforge/report_data/'+homedir)
|
||||
homedir = str(datetime.datetime.now().strftime("%Y-%m-%d-%H-%M")).replace(':','-')+'test_ipv4_variable_time'
|
||||
path = os.path.join('/home/lanforge/report-data/',homedir)
|
||||
os.mkdir(path)
|
||||
|
||||
if args.report_file is None:
|
||||
if args.output_format in ['csv','json','html','hdf','stata','pickle','pdf','png','df','parquet','xlsx']:
|
||||
report_f='/home/lanforge/report-data/'+homedir+'/data.' + args.output_format
|
||||
@@ -253,7 +255,6 @@ python3 ./test_ipv4_variable_time.py
|
||||
created_cx= layer3connections,
|
||||
output_format=output,
|
||||
script_name='test_ipv4_variable_time',
|
||||
show=show,
|
||||
arguments=args)
|
||||
|
||||
ip_var_test.stop()
|
||||
@@ -265,7 +266,7 @@ python3 ./test_ipv4_variable_time.py
|
||||
if ip_var_test.passes():
|
||||
ip_var_test.exit_success()
|
||||
|
||||
IPV4VariableTime.cx_profile.stop_cx() #is this needed?
|
||||
IPV4VariableTime.cx_profile.stop_cx() #is this needed?
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user