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

re-add deleted handling of unmanaged interfaces

parent e07fe7d7
No related branches found
No related tags found
No related merge requests found
......@@ -215,18 +215,6 @@ def _unmanaged_interfaces(self):
_convert,
InventoryTask.config.get('unmanaged-interfaces', []))
# if interfaces:
# r = get_next_redis(InventoryTask.config)
# rp = r.pipeline()
# for ifc in interfaces:
# rp.set(
# f'reverse_interface_addresses:{ifc["name"]}',
# json.dumps(ifc))
# rp.set(
# f'subnets:{ifc["interface address"]}',
# json.dumps([ifc]))
# rp.execute()
@app.task(base=InventoryTask, bind=True, name='update_access_services')
@log_task_entry_and_exit
......@@ -710,6 +698,10 @@ def _build_subnet_db(update_callback=lambda s: None):
entry = subnets.setdefault(ifc['interface address'], [])
entry.append(ifc)
for ifc in _unmanaged_interfaces():
entry = subnets.setdefault(ifc['interface address'], [])
entry.append(ifc)
update_callback('saving {} subnets'.format(len(subnets)))
rp = r.pipeline()
......
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