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

Added equipment to fiberlink classification data. RE DBOARD3-211

parent 4cdd4877
Branches
Tags
No related merge requests found
......@@ -435,8 +435,10 @@ def get_fiberlink_trap_metadata(ne_name_str, object_name_str):
if result:
result = result.decode('utf-8')
else:
nes_a = f'{matches[0][0]}-{shelves[0]}'
nes_b = f'{matches[1][0]}-{shelves[1]}'
equipment_a = matches[0][0]
equipment_b = matches[1][0]
nes_a = f'{equipment_a}-{shelves[0]}'
nes_b = f'{equipment_b}-{shelves[1]}'
result = []
df_a = r.get(f'opsdb:ne_fibre_spans:{nes_a}')
df_b = r.get(f'opsdb:ne_fibre_spans:{nes_b}')
......@@ -453,10 +455,12 @@ def get_fiberlink_trap_metadata(ne_name_str, object_name_str):
'a': {
'pop': match[0]['pop'],
'pop_abbreviation': match[0]['pop_abbreviation'],
'equipment': equipment_a
},
'b': {
'pop': match[1]['pop'],
'pop_abbreviation': match[1]['pop_abbreviation'],
'equipment': equipment_b
},
},
'df_route': {
......
......@@ -511,10 +511,12 @@ def test_infinera_fiberlink(client, mocker):
'a': {
'pop': 'POP 1',
'pop_abbreviation': 'p1',
'equipment': 'XXX-OLA1'
},
'b': {
'pop': 'POP 2',
'pop_abbreviation': 'p2',
'equipment': 'XXX02-DTNX10-1'
},
},
'df_route': {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment