mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	changed logic for var_time, improved error message for incorrect monitor_interval input
Signed-off-by: Dipti <dipti.dhond@candelatech.com>
This commit is contained in:
		| @@ -645,8 +645,8 @@ class LFCliBase: | |||||||
|             dataframe_two = dataframe_two.drop(list(cols_to_remove), axis=1) |             dataframe_two = dataframe_two.drop(list(cols_to_remove), axis=1) | ||||||
|             #for time elapsed section and endpoint name combo |             #for time elapsed section and endpoint name combo | ||||||
|             # |             # | ||||||
|             print(dataframe_one) |             #print(dataframe_one) | ||||||
|             print(dataframe_two) |             #print(dataframe_two) | ||||||
|      |      | ||||||
|          |          | ||||||
|         #take those columns and separate those columns from others in DF. |         #take those columns and separate those columns from others in DF. | ||||||
|   | |||||||
| @@ -684,7 +684,7 @@ class Realm(LFCliBase): | |||||||
|                 else: |                 else: | ||||||
|                     duration_time = datetime.timedelta(seconds=dur_time) |                     duration_time = datetime.timedelta(seconds=dur_time) | ||||||
|             else: |             else: | ||||||
|                 raise ValueError("Unknown value for time_string: %s" % time_string) |                 raise ValueError("Cannot compute time string provided: %s" % time_string) | ||||||
|         else: |         else: | ||||||
|             raise ValueError("time_string must be of type str. Type %s provided" % type(time_string)) |             raise ValueError("time_string must be of type str. Type %s provided" % type(time_string)) | ||||||
|         return duration_time |         return duration_time | ||||||
|   | |||||||
| @@ -344,7 +344,7 @@ python3 ./test_ipv4_variable_time.py | |||||||
|     if not ip_var_test.passes(): |     if not ip_var_test.passes(): | ||||||
|         print(ip_var_test.get_fail_message()) |         print(ip_var_test.get_fail_message()) | ||||||
|         ip_var_test.exit_fail() |         ip_var_test.exit_fail() | ||||||
|     ip_var_test.start(False, False) |      | ||||||
|  |  | ||||||
|     try: |     try: | ||||||
|         layer3connections = ','.join([[*x.keys()][0] for x in ip_var_test.json_get('endp')['endpoint']]) |         layer3connections = ','.join([[*x.keys()][0] for x in ip_var_test.json_get('endp')['endpoint']]) | ||||||
| @@ -368,9 +368,13 @@ python3 ./test_ipv4_variable_time.py | |||||||
|         print(layer3_cols) |         print(layer3_cols) | ||||||
|         print("Port Manager column names are...") |         print("Port Manager column names are...") | ||||||
|         print(port_mgr_cols) |         print(port_mgr_cols) | ||||||
|  |     try: | ||||||
|     monitor_interval = Realm.parse_time(args.monitor_interval).total_seconds() |         monitor_interval = Realm.parse_time(args.monitor_interval).total_seconds() | ||||||
|  |     except ValueError as error: | ||||||
|  |         print(str(error)) | ||||||
|  |         print(ValueError("The time string provided for monitor_interval argument is invalid. Please see supported time stamp increments and inputs for monitor_interval in --help. ")) | ||||||
|  |         exit(1) | ||||||
|  |     ip_var_test.start(False, False) | ||||||
|     ip_var_test.l3cxprofile.monitor(layer3_cols=layer3_cols, |     ip_var_test.l3cxprofile.monitor(layer3_cols=layer3_cols, | ||||||
|                                     sta_list=station_list, |                                     sta_list=station_list, | ||||||
|                                     port_mgr_cols=port_mgr_cols, |                                     port_mgr_cols=port_mgr_cols, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dipti
					Dipti