2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-07-31 18:19:44 +00:00

Fix async mistakes from merge

This commit is contained in:
Jarrod Johnson
2026-02-19 14:53:28 -05:00
parent 18d06409d4
commit 5b6bd4fbe1
2 changed files with 4 additions and 4 deletions
@@ -247,7 +247,7 @@ async def _extract_neighbor_data_srlinux(switch, user, password, cfm, lldpdata,
_neighdata[switch] = lldpdata
def _extract_neighbor_data_affluent(switch, user, password, cfm, lldpdata, wc):
async def _extract_neighbor_data_affluent(switch, user, password, cfm, lldpdata, wc):
wc.set_basic_credentials(user, password)
neighdata = await wc.grab_json_response('/affluent/lldp/all')
chassisid = neighdata['chassis']['id']
@@ -158,18 +158,18 @@ async def _fast_map_switch(args):
if backend == 'affluent':
return await _affluent_map_switch(switch, password, user, cfgm, macdata)
elif backend == 'nxapi':
return _nxapi_map_switch(switch, password, user, cfgm)
return await _nxapi_map_switch(switch, password, user, cfgm)
elif backend == 'srlinux':
return _srlinux_map_switch(switch, password, user, cfgm)
raise Exception("No fast backend match")
async def _srlinux_map_switch(switch, password, user, cfgm):
cli = srlinux.SRLinuxClient(switch, user, password, cfgm)
mt = cli.get_mac_table()
mt = await cli.get_mac_table()
_macsbyswitch[switch] = mt
_fast_backend_fixup(mt, switch)
def _nxapi_map_switch(switch, password, user, cfgm):
async def _nxapi_map_switch(switch, password, user, cfgm):
cli = nxapi.NxApiClient(switch, user, password, cfgm)
mt = await cli.get_mac_table()
_macsbyswitch[switch] = mt