diff --git a/inventory_provider/tasks/worker.py b/inventory_provider/tasks/worker.py index 2a6848d55f7f9314206538c6632271c7c9d8003f..4744a681f44d5d6ba781955bbe52473d1ee16a51 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: