Skip to content
Snippets Groups Projects
Commit a7451cce authored by Robert Latta's avatar Robert Latta
Browse files

Added job to get 'geant lambdas' from OpsDB

parent 28897208
No related branches found
No related tags found
No related merge requests found
......@@ -200,6 +200,21 @@ def update_interface_statuses():
logger.debug('<<< update_interface_statuses')
@app.task
def update_geant_lambdas():
logger = logging.getLogger(__name__)
logger.debug('>>> update_geant_lambdas')
r = get_redis(InventoryTask.config)
for key in r.scan_iter('opsdb:geant_lambdas:*'):
r.delete(key)
with db.connection(InventoryTask.config["ops-db"]) as cx:
for ld in opsdb.get_geant_lambdas(cx):
r.set('opsdb:geant_lambdas:%s' % ld['name'], json.dumps(ld))
logger.debug('<<< geant_lambdas')
@app.task(base=InventoryTask, bind=True)
def update_junosspace_device_list(self):
logger = logging.getLogger(__name__)
......@@ -457,6 +472,7 @@ def launch_refresh_cache_all(config):
subtasks = [
update_junosspace_device_list.s(),
update_interfaces_to_services.s(),
update_geant_lambdas.s(),
update_circuit_hierarchy.s()
]
......
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