Skip to content
Snippets Groups Projects
Commit c2260731 authored by Erik Reid's avatar Erik Reid
Browse files

data format mixup

parent 0199b7bf
No related branches found
No related tags found
No related merge requests found
...@@ -455,14 +455,15 @@ def refresh_juniper_interface_list(hostname, netconf): ...@@ -455,14 +455,15 @@ def refresh_juniper_interface_list(hostname, netconf):
rp.delete(k) rp.delete(k)
rp.execute() rp.execute()
host_interfaces = list(juniper.list_interfaces(netconf))
all_bundles = defaultdict(list) all_bundles = defaultdict(list)
rp = r.pipeline() 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) bundles = ifc.get('bundle', None)
for bundle in bundles: for bundle in bundles:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment