mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	arg additions
This commit is contained in:
		@@ -1168,24 +1168,6 @@ class L3CXProfile(BaseProfile):
 | 
			
		||||
            output_format = report_file.split('.')[-1]
 | 
			
		||||
        #retrieve compared report if specified - turn into dataframe
 | 
			
		||||
        if compared_report is not None:
 | 
			
		||||
            compared_format = compared_report.split('.')[-1]
 | 
			
		||||
            #initial dataframe
 | 
			
		||||
            previous_data_df = pd.DataFrame()
 | 
			
		||||
            if compared_format == 'hdf':
 | 
			
		||||
                #df.to_hdf(report_file, 'table', append=True)
 | 
			
		||||
                continue
 | 
			
		||||
            if compared_format == 'parquet':
 | 
			
		||||
                #df.to_parquet(report_file, engine='pyarrow')
 | 
			
		||||
                continue
 | 
			
		||||
            if compared_format == 'png':
 | 
			
		||||
                #fig = df.plot().get_figure()
 | 
			
		||||
                #fig.savefig(report_file)
 | 
			
		||||
                continue
 | 
			
		||||
            if compared_format.lower() in ['excel', 'xlsx'] or report_file.split('.')[-1] == 'xlsx':
 | 
			
		||||
                continue
 | 
			
		||||
            if compared_format == 'df':
 | 
			
		||||
                #return df
 | 
			
		||||
                continue
 | 
			
		||||
            supported_formats = ['csv', 'json', 'stata', 'pickle','html']
 | 
			
		||||
            for format in supported_formats:
 | 
			
		||||
                if compared_format.lower() == format:
 | 
			
		||||
@@ -1237,6 +1219,7 @@ class L3CXProfile(BaseProfile):
 | 
			
		||||
                self._fail("FAIL: Not all stations increased traffic")
 | 
			
		||||
                self.exit_fail()
 | 
			
		||||
            old_cx_rx_values = new_cx_rx_values
 | 
			
		||||
            #write csv file here - open, write,  and close file
 | 
			
		||||
            time.sleep(monitor_interval)
 | 
			
		||||
        print(value_map)
 | 
			
		||||
 | 
			
		||||
@@ -1266,7 +1249,6 @@ class L3CXProfile(BaseProfile):
 | 
			
		||||
        df=df[["Timestamp","Timestamp milliseconds", *header_row[:-2]]]
 | 
			
		||||
        #compare previous data to current data
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
            systeminfo = ast.literal_eval(requests.get('http://'+str(self.lfclient_host)+':'+str(self.lfclient_port)).text)
 | 
			
		||||
        except:
 | 
			
		||||
 
 | 
			
		||||
@@ -196,6 +196,7 @@ python3 ./test_ipv4_variable_time.py
 | 
			
		||||
        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()
 | 
			
		||||
    #['name','tx bytes', 'rx bytes','dropped']
 | 
			
		||||
 | 
			
		||||
    num_sta = 2
 | 
			
		||||
    if (args.num_stations is not None) and (int(args.num_stations) > 0):
 | 
			
		||||
@@ -223,7 +224,9 @@ python3 ./test_ipv4_variable_time.py
 | 
			
		||||
            output=str(args.report_file).split('.')[-1]
 | 
			
		||||
        else:
 | 
			
		||||
            output=args.output_format
 | 
			
		||||
 | 
			
		||||
    #Retrieve last data file
 | 
			
		||||
    compared_rept=None
 | 
			
		||||
    if args.compared_report:
 | 
			
		||||
        #check if last report format is same as current rpt format
 | 
			
		||||
        last_report_format = args.compared_report.split('.')[-1]
 | 
			
		||||
@@ -267,6 +270,7 @@ python3 ./test_ipv4_variable_time.py
 | 
			
		||||
        col_names=None
 | 
			
		||||
    else:
 | 
			
		||||
        col_names = args.col_names
 | 
			
		||||
    if args.debug:
 | 
			
		||||
        print(col_names)
 | 
			
		||||
    ip_var_test.l3cxprofile.monitor(col_names=col_names,
 | 
			
		||||
                                    report_file=report_f,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user