mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-03 20:27:54 +00:00 
			
		
		
		
	Revert "test_l3_longevity.py : move results to report-data"
This reverts commit 2ec33b65de.
			
			
This commit is contained in:
		@@ -1199,7 +1199,7 @@ python3 test_l3_longevity.py --cisco_ctlr 192.168.100.112 --cisco_dfs True --mgr
 | 
				
			|||||||
    parser.add_argument('-t', '--endp_type', help='--endp_type <types of traffic> example --endp_type \"lf_udp lf_tcp mc_udp\"  Default: lf_udp , options: lf_udp, lf_udp6, lf_tcp, lf_tcp6, mc_udp, mc_udp6',
 | 
					    parser.add_argument('-t', '--endp_type', help='--endp_type <types of traffic> example --endp_type \"lf_udp lf_tcp mc_udp\"  Default: lf_udp , options: lf_udp, lf_udp6, lf_tcp, lf_tcp6, mc_udp, mc_udp6',
 | 
				
			||||||
                        default='lf_udp', type=valid_endp_types)
 | 
					                        default='lf_udp', type=valid_endp_types)
 | 
				
			||||||
    parser.add_argument('-u', '--upstream_port', help='--upstream_port <cross connect upstream_port> example: --upstream_port eth1',default='eth1')
 | 
					    parser.add_argument('-u', '--upstream_port', help='--upstream_port <cross connect upstream_port> example: --upstream_port eth1',default='eth1')
 | 
				
			||||||
    parser.add_argument('-o','--report_file', help="--report_file <report_file>")
 | 
					    parser.add_argument('-o','--csv_outfile', help="--csv_outfile <Output file for csv data>", default='longevity_results')
 | 
				
			||||||
    parser.add_argument('--polling_interval', help="--polling_interval <seconds>", default='60s')
 | 
					    parser.add_argument('--polling_interval', help="--polling_interval <seconds>", default='60s')
 | 
				
			||||||
    #parser.add_argument('-c','--csv_output', help="Generate csv output", default=False) 
 | 
					    #parser.add_argument('-c','--csv_output', help="Generate csv output", default=False) 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1232,22 +1232,10 @@ python3 test_l3_longevity.py --cisco_ctlr 192.168.100.112 --cisco_dfs True --mgr
 | 
				
			|||||||
    if args.radio:
 | 
					    if args.radio:
 | 
				
			||||||
        radios = args.radio
 | 
					        radios = args.radio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    time_now = str(datetime.datetime.now().strftime("%Y-%m-%d-%H-%M")).replace(':','_')
 | 
					    if args.csv_outfile != None:
 | 
				
			||||||
    new_file_path = time_now + '_test_l3_longevity' #create path name
 | 
					        current_time = time.strftime("%m_%d_%Y_%H_%M_%S", time.localtime())
 | 
				
			||||||
    try:
 | 
					        csv_outfile = "{}_{}.csv".format(args.csv_outfile,current_time)
 | 
				
			||||||
        path = os.path.join('/home/lanforge/report-data/',new_file_path)
 | 
					        print("csv output file : {}".format(csv_outfile))
 | 
				
			||||||
        os.mkdir(path)
 | 
					 | 
				
			||||||
    except:
 | 
					 | 
				
			||||||
        curr_dir_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 | 
					 | 
				
			||||||
        path = os.path.join(curr_dir_path, new_file_path)
 | 
					 | 
				
			||||||
        os.mkdir(path)  
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if args.report_file != None:
 | 
					 | 
				
			||||||
        print('Defaulting to csv data file output type, naming it {}_{}.csv.'.format(time_now,args.report_file))
 | 
					 | 
				
			||||||
        report_file= str(path)+'/{}_{}.csv'.format(time_now,args.report_file)
 | 
					 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        print('Defaulting to csv data file output type, naming it {}_{}.csv.'.format(time_now,args.report_file))
 | 
					 | 
				
			||||||
        report_file= str(path)+'/{}_test_l3_longevity.csv'.format(time_now)
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MAX_NUMBER_OF_STATIONS = 1000
 | 
					    MAX_NUMBER_OF_STATIONS = 1000
 | 
				
			||||||
@@ -1336,7 +1324,7 @@ python3 test_l3_longevity.py --cisco_ctlr 192.168.100.112 --cisco_dfs True --mgr
 | 
				
			|||||||
                                    side_a_min_rate=256000, 
 | 
					                                    side_a_min_rate=256000, 
 | 
				
			||||||
                                    side_b_min_rate=256000, 
 | 
					                                    side_b_min_rate=256000, 
 | 
				
			||||||
                                    debug=debug, 
 | 
					                                    debug=debug, 
 | 
				
			||||||
                                    outfile=report_file)
 | 
					                                    outfile=csv_outfile)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ip_var_test.pre_cleanup()
 | 
					    ip_var_test.pre_cleanup()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1352,11 +1340,11 @@ python3 test_l3_longevity.py --cisco_ctlr 192.168.100.112 --cisco_dfs True --mgr
 | 
				
			|||||||
        print(ip_var_test.get_fail_message())
 | 
					        print(ip_var_test.get_fail_message())
 | 
				
			||||||
         
 | 
					         
 | 
				
			||||||
    try: 
 | 
					    try: 
 | 
				
			||||||
        sub_output = subprocess.run(["./csv_processor.py", "--infile",report_file],capture_output=True, check=True)
 | 
					        sub_output = subprocess.run(["./csv_processor.py", "--infile",csv_outfile],capture_output=True, check=True)
 | 
				
			||||||
        pss = sub_output.stdout.decode('utf-8', 'ignore')
 | 
					        pss = sub_output.stdout.decode('utf-8', 'ignore')
 | 
				
			||||||
        print(pss)
 | 
					        print(pss)
 | 
				
			||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
        print("Exception: {} failed creating summary and raw for {}, are all packages installed , pandas?".format(e,report_file))
 | 
					        print("Exception: {} failed creating summary and raw for {}, are all packages installed , pandas?".format(e,csv_outfile))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print("Pausing {} seconds after run for manual inspection before we clean up.".format(args.wait))
 | 
					    print("Pausing {} seconds after run for manual inspection before we clean up.".format(args.wait))
 | 
				
			||||||
    time.sleep(int(args.wait))
 | 
					    time.sleep(int(args.wait))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user