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

added update_junosspace_device_list

parent 80e760a7
No related branches found
No related tags found
No related merge requests found
......@@ -226,3 +226,19 @@ def update_inventory_system_cache():
update_interface_statuses.s()
])
g.apply_async()
@app.task()
def update_junosspace_device_list():
logger = logging.getLogger(constants.TASK_LOGGER_NAME)
logger.error('HERE: update_junosspace_device_list')
r = get_redis(InventoryTask.config)
logger.error(InventoryTask.config["junosspace"])
for d in juniper.load_routers_from_junosspace(
InventoryTask.config["junosspace"]):
logger.error(d)
r.set(
'junosspace:' + d['hostname'],
json.dumps(d).encode('utf-8'))
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