2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-29 13:00:03 +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:
Jarrod Johnson 2020-11-09 11:23:54 -05:00
parent 8f99d87fda
commit dc262c366c

View File

@ -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: