mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-11-04 05:12:32 +00:00 
			
		
		
		
	Fix false positive in affluent detection
Make sure we don't receive a redirect or other when asking for mac tables.
This commit is contained in:
		@@ -138,7 +138,9 @@ def _affluent_map_switch(args):
 | 
			
		||||
    wc =  webclient.SecureHTTPConnection(
 | 
			
		||||
                switch, 443, verifycallback=kv, timeout=5)
 | 
			
		||||
    wc.set_basic_credentials(user, password)
 | 
			
		||||
    macs = wc.grab_json_response('/affluent/macs/by-port')
 | 
			
		||||
    macs, retcode = wc.grab_json_response_with_status('/affluent/macs/by-port')
 | 
			
		||||
    if retcode != 200:
 | 
			
		||||
        raise Exception("No affluent detected")
 | 
			
		||||
    _macsbyswitch[switch] = macs
 | 
			
		||||
 | 
			
		||||
    for iface in macs:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user