From aab29c60d95a9dbc71b0cb5a819838c9f0c4ba1d Mon Sep 17 00:00:00 2001 From: Robert Latta <robert.latta@geant.org> Date: Wed, 3 Apr 2019 14:46:19 +0100 Subject: [PATCH] Added 'geant lamdas' to cached info --- inventory_provider/routes/classifier.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inventory_provider/routes/classifier.py b/inventory_provider/routes/classifier.py index 2c9f7f41..2e33ff6d 100644 --- a/inventory_provider/routes/classifier.py +++ b/inventory_provider/routes/classifier.py @@ -68,6 +68,14 @@ def get_trap_metadata(source_equipment, interface): 'opsdb:interface_services:%s:%s' % (source_equipment, interface)) if services: result['services'] = json.loads(services.decode('utf=8')) + geant_lambdas = [] + for s in result['services']: + gl = r.get('opsdb:geant_lambdas:%s' % s['name']) + if gl: + geant_lambdas.append(json.loads(gl.decode('utf=8'))) + + if geant_lambdas: + result['geant_lambdas'] = geant_lambdas ifc_info = r.get( 'netconf-interfaces:%s:%s' % (source_equipment, interface)) -- GitLab