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

corrected location lockup for fibertlink

parent 18a8bccc
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ def get_ims_interface(interface: str) -> str:
return interface.upper()
def related_interfaces(hostname:str, interface: str) -> Iterator[str]:
def related_interfaces(hostname: str, interface: str) -> Iterator[str]:
r = common.get_current_redis()
prefix = f'netconf-interfaces:{hostname}:'
for k in r.keys(prefix + interface + '.*'):
......@@ -608,14 +608,14 @@ def get_fiberlink_trap_metadata(ne_name_str: str, object_name_str: str) \
x[0]['df_route_id'] == x[1]['df_route_id']]
if matches:
match = matches[0]
locations_a = _location_from_equipment(equipment_a, r)
locations_b = _location_from_equipment(equipment_b, r)
if locations_a:
loc_a = locations_a[0]['a']
location_a = _location_from_equipment(equipment_a, r)
location_b = _location_from_equipment(equipment_b, r)
if location_a:
loc_a = location_a
else:
loc_a = _LOCATION(equipment_a, '', '')
if locations_b:
loc_b = locations_b[0]['a']
if location_b:
loc_b = location_b
else:
loc_b = _LOCATION(equipment_b, '', '')
......
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