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

Added 'geant lambda' retrieval from OpsDB

parent 462f4e8e
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,14 @@ equipment_location_query = """SELECT
'operational')"""
geant_lambda_sql = """SELECT
name,
status
FROM circuit
WHERE
status != 'terminated'
AND service_type = 'geant lambda'"""
circuit_hierarchy_query = """SELECT
pc.name AS parent_circuit,
pc.absid AS parent_circuit_id,
......@@ -189,10 +197,18 @@ def _update_fields(r):
return func(r) if func else r
def get_geant_lambdas(connection):
with db.cursor(connection) as crs:
crs.execute(geant_lambda_sql)
r = _convert_to_dict(crs)
return r
def get_circuits(connection):
with db.cursor(connection) as crs:
crs.execute(retrieve_services_query)
r = _convert_to_dict(crs)
r = list(map(_update_fields, r))
return r
......
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