mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	argument changes
This commit is contained in:
		@@ -20,11 +20,12 @@ import pprint
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class IPv4Test(LFCliBase):
 | 
					class IPv4Test(LFCliBase):
 | 
				
			||||||
    def __init__(self, host,
 | 
					    def __init__(self, 
 | 
				
			||||||
                 port,
 | 
					 | 
				
			||||||
                 ssid,
 | 
					                 ssid,
 | 
				
			||||||
                 security,
 | 
					                 security,
 | 
				
			||||||
                 password,
 | 
					                 password,
 | 
				
			||||||
 | 
					                 host="localhost",
 | 
				
			||||||
 | 
					                 port=8080,
 | 
				
			||||||
                 sta_list=None,
 | 
					                 sta_list=None,
 | 
				
			||||||
                 number_template="00000",
 | 
					                 number_template="00000",
 | 
				
			||||||
                 radio="wiphy0",
 | 
					                 radio="wiphy0",
 | 
				
			||||||
@@ -60,7 +61,6 @@ class IPv4Test(LFCliBase):
 | 
				
			|||||||
            pprint.pprint(self.sta_list)
 | 
					            pprint.pprint(self.sta_list)
 | 
				
			||||||
            print("---- ~Station List ----- ----- ----- ----- ----- ----- \n")
 | 
					            print("---- ~Station List ----- ----- ----- ----- ----- ----- \n")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # self.station_profile.station_names = self.sta_list
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build(self):
 | 
					    def build(self):
 | 
				
			||||||
        # Build stations
 | 
					        # Build stations
 | 
				
			||||||
@@ -88,10 +88,12 @@ class IPv4Test(LFCliBase):
 | 
				
			|||||||
                if (sta_status is None) or (sta_status['interface'] is None) or (sta_status['interface']['ap'] is None):
 | 
					                if (sta_status is None) or (sta_status['interface'] is None) or (sta_status['interface']['ap'] is None):
 | 
				
			||||||
                    continue
 | 
					                    continue
 | 
				
			||||||
                if (len(sta_status['interface']['ap']) == 17) and (sta_status['interface']['ap'][-3] == ':'):
 | 
					                if (len(sta_status['interface']['ap']) == 17) and (sta_status['interface']['ap'][-3] == ':'):
 | 
				
			||||||
                    # print("Associated", sta_name, sta_status['interface']['ap'], sta_status['interface']['ip'])
 | 
					                    if self.debug:
 | 
				
			||||||
 | 
					                        print("Associated", sta_name, sta_status['interface']['ap'], sta_status['interface']['ip'])
 | 
				
			||||||
                    associated_map[sta_name] = 1
 | 
					                    associated_map[sta_name] = 1
 | 
				
			||||||
                if sta_status['interface']['ip'] != '0.0.0.0':
 | 
					                if sta_status['interface']['ip'] != '0.0.0.0':
 | 
				
			||||||
                    # print("IP", sta_name, sta_status['interface']['ap'], sta_status['interface']['ip'])
 | 
					                    if self.debug:
 | 
				
			||||||
 | 
					                        print("IP", sta_name, sta_status['interface']['ap'], sta_status['interface']['ip'])
 | 
				
			||||||
                    ip_map[sta_name] = 1
 | 
					                    ip_map[sta_name] = 1
 | 
				
			||||||
            if (len(sta_list) == len(ip_map)) and (len(sta_list) == len(associated_map)):
 | 
					            if (len(sta_list) == len(ip_map)) and (len(sta_list) == len(associated_map)):
 | 
				
			||||||
                break
 | 
					                break
 | 
				
			||||||
@@ -126,7 +128,6 @@ class IPv4Test(LFCliBase):
 | 
				
			|||||||
def main():
 | 
					def main():
 | 
				
			||||||
    parser = LFCliBase.create_basic_argparse(
 | 
					    parser = LFCliBase.create_basic_argparse(
 | 
				
			||||||
        prog='test_ipv4_connection.py',
 | 
					        prog='test_ipv4_connection.py',
 | 
				
			||||||
        #formatter_class=argparse.RawDescriptionHelpFormatter,
 | 
					 | 
				
			||||||
        formatter_class=argparse.RawTextHelpFormatter,
 | 
					        formatter_class=argparse.RawTextHelpFormatter,
 | 
				
			||||||
        epilog='''\
 | 
					        epilog='''\
 | 
				
			||||||
         Create stations that attempt to authenticate, associate, and receive IP addresses on the 
 | 
					         Create stations that attempt to authenticate, associate, and receive IP addresses on the 
 | 
				
			||||||
@@ -171,7 +172,6 @@ Generic command example:
 | 
				
			|||||||
                       radio=args.radio,
 | 
					                       radio=args.radio,
 | 
				
			||||||
                       _debug_on=args.debug)
 | 
					                       _debug_on=args.debug)
 | 
				
			||||||
    ip_test.cleanup(station_list)
 | 
					    ip_test.cleanup(station_list)
 | 
				
			||||||
    #ip_test.timeout = 60
 | 
					 | 
				
			||||||
    ip_test.build()
 | 
					    ip_test.build()
 | 
				
			||||||
    if not ip_test.passes():
 | 
					    if not ip_test.passes():
 | 
				
			||||||
        print(ip_test.get_fail_message())
 | 
					        print(ip_test.get_fail_message())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,9 @@ import datetime
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class IPV4VariableTime(LFCliBase):
 | 
					class IPV4VariableTime(LFCliBase):
 | 
				
			||||||
    def __init__(self, host, port, ssid, security, password, sta_list, name_prefix, upstream, radio,
 | 
					    def __init__(self,
 | 
				
			||||||
 | 
					                 ssid, security, password, sta_list, name_prefix, upstream, radio,
 | 
				
			||||||
 | 
					                 host="localhost", port=8080,
 | 
				
			||||||
                 side_a_min_rate=56, side_a_max_rate=0,
 | 
					                 side_a_min_rate=56, side_a_max_rate=0,
 | 
				
			||||||
                 side_b_min_rate=56, side_b_max_rate=0,
 | 
					                 side_b_min_rate=56, side_b_max_rate=0,
 | 
				
			||||||
                 number_template="00000", test_duration="5m", use_ht160=False,
 | 
					                 number_template="00000", test_duration="5m", use_ht160=False,
 | 
				
			||||||
@@ -164,8 +166,6 @@ class IPV4VariableTime(LFCliBase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def main():
 | 
					def main():
 | 
				
			||||||
    lfjson_port = 8080
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    parser = LFCliBase.create_basic_argparse(
 | 
					    parser = LFCliBase.create_basic_argparse(
 | 
				
			||||||
        prog='test_ipv4_variable_time.py',
 | 
					        prog='test_ipv4_variable_time.py',
 | 
				
			||||||
        formatter_class=argparse.RawTextHelpFormatter,
 | 
					        formatter_class=argparse.RawTextHelpFormatter,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user