mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-03 20:27:54 +00:00 
			
		
		
		
	test_ipv6_connection.py : added try except for checking if interface is up. test_ipv4_conneciton.py : moved print to debug
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
		@@ -106,6 +106,7 @@ class IPv4Test(LFCliBase):
 | 
				
			|||||||
                eidn = self.local_realm.name_to_eid(sta_name)
 | 
					                eidn = self.local_realm.name_to_eid(sta_name)
 | 
				
			||||||
                url = "/port/1/%s/%s" % (eidn[1], eidn[2])
 | 
					                url = "/port/1/%s/%s" % (eidn[1], eidn[2])
 | 
				
			||||||
                sta_status = self.json_get(url + "?fields=port,alias,ip,ap", debug_=self.debug)
 | 
					                sta_status = self.json_get(url + "?fields=port,alias,ip,ap", debug_=self.debug)
 | 
				
			||||||
 | 
					                if self.debug:
 | 
				
			||||||
                    print(sta_status)
 | 
					                    print(sta_status)
 | 
				
			||||||
                try:                
 | 
					                try:                
 | 
				
			||||||
                    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):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,7 +95,10 @@ class IPv6Test(LFCliBase):
 | 
				
			|||||||
                                           debug_=self.debug)
 | 
					                                           debug_=self.debug)
 | 
				
			||||||
                if self.debug:
 | 
					                if self.debug:
 | 
				
			||||||
                    print(sta_status)
 | 
					                    print(sta_status)
 | 
				
			||||||
                if sta_status is None or sta_status['interface'] is None or sta_status['interface']['ap'] is None:
 | 
					                try:                
 | 
				
			||||||
 | 
					                    if (sta_status is None) or (sta_status['interface'] is None) or (sta_status['interface']['ap'] is None):
 | 
				
			||||||
 | 
					                        continue
 | 
				
			||||||
 | 
					                except:
 | 
				
			||||||
                    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] == ':':
 | 
				
			||||||
                    if self.debug:
 | 
					                    if self.debug:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user