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

added geant-lamda info to endpoint

parent 13a62d13
No related branches found
No related tags found
No related merge requests found
......@@ -658,6 +658,20 @@ def get_trap_metadata(source_equipment: str, interface: str, circuit_id: str) \
t_interface,
r
))
if result:
order = ['operational', 'installed', 'planned']
gl = list(filter(
lambda x: x['service_type'] == 'GEANT LAMBDA'
and x['status'] in order,
result.get('services', [])))
if gl:
gl.sort(key=lambda x: order.index(x['status']))
result['geant-lambda'] = {
'id': gl[0]['id'],
'name': gl[0]['name'],
'status': gl[0]['status'],
'project': gl[0]['project']
}
if not result:
return Response(
......
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