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

changed structure of retrieved data RE. DBOARD3-659

parent 0cde7cae
No related branches found
No related tags found
No related merge requests found
......@@ -67,14 +67,20 @@ NODE_LOCATION_SCHEMA = {
}
def get_flex_ils_entities(ds: IMS):
for f in ds.get_all_entities('FLEXILS_SCHF_SUBINTERFACES'):
yield {
'circuit_id': f['circuitid'],
'node_name': f['nodename'],
'port_name': f['port'],
'full_port_name': f['port_ref']
}
def get_flexils_by_circuitid(ds: IMS):
by_circuit = defaultdict(list)
found_keys = set()
for entity in ds.get_all_entities('FLEXILS_SCHF_SUBINTERFACES'):
k = f'{entity["nodename"]}:{entity["port_ref"]}'
if k in found_keys:
continue
found_keys.add(k)
by_circuit[entity['circuitid']].append({
'node_name': entity['nodename'],
'full_port_name': entity['port_ref'],
'key': k
})
return dict(by_circuit)
def get_non_monitored_circuit_ids(ds: IMS):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment