From 5b6bd4fbe1e7954342dd5dd0f52f59d002c89a62 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 19 Feb 2026 14:53:28 -0500 Subject: [PATCH] Fix async mistakes from merge --- confluent_server/confluent/networking/lldp.py | 2 +- confluent_server/confluent/networking/macmap.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/confluent_server/confluent/networking/lldp.py b/confluent_server/confluent/networking/lldp.py index 3f453ede..9b933461 100644 --- a/confluent_server/confluent/networking/lldp.py +++ b/confluent_server/confluent/networking/lldp.py @@ -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'] diff --git a/confluent_server/confluent/networking/macmap.py b/confluent_server/confluent/networking/macmap.py index 426486f3..4f47bb58 100644 --- a/confluent_server/confluent/networking/macmap.py +++ b/confluent_server/confluent/networking/macmap.py @@ -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