From c22607310f16389d2c932df8c99ace3be058a7ac Mon Sep 17 00:00:00 2001 From: Erik Reid <erik.reid@geant.org> Date: Wed, 3 Mar 2021 13:49:42 +0100 Subject: [PATCH] data format mixup --- inventory_provider/tasks/worker.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inventory_provider/tasks/worker.py b/inventory_provider/tasks/worker.py index 2a6848d5..4744a681 100644 --- a/inventory_provider/tasks/worker.py +++ b/inventory_provider/tasks/worker.py @@ -455,14 +455,15 @@ def refresh_juniper_interface_list(hostname, netconf): rp.delete(k) rp.execute() - host_interfaces = list(juniper.list_interfaces(netconf)) all_bundles = defaultdict(list) rp = r.pipeline() - rp.set(f'netconf-interfaces-hosts:{hostname}', json.dumps(host_interfaces)) + rp.set( + f'netconf-interfaces-hosts:{hostname}', + json.dumps(list(juniper.interface_addresses(netconf)))) - for ifc in host_interfaces: + for ifc in juniper.list_interfaces(netconf): bundles = ifc.get('bundle', None) for bundle in bundles: -- GitLab