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

added (service-based only) location data to infinera response

parent 6778f8b2
No related branches found
No related tags found
No related merge requests found
......@@ -364,7 +364,9 @@ def get_trap_metadata(source_equipment, interface, circuit_id):
if result:
result = result.decode('utf-8')
else:
result = {}
result = {
'locations': []
}
top_level_services = []
services = r.get(
......@@ -377,6 +379,8 @@ def get_trap_metadata(source_equipment, interface, circuit_id):
top_level_services.extend(tls)
if top_level_services:
result['related-services'] = top_level_services
l = [_location_from_service_dict(s) for s in result['services']]
result['locations'] += l
gl = r.get('opsdb:geant_lambdas:%s' % circuit_id.lower())
if gl:
......
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