Skip to content
Snippets Groups Projects
Commit 632cba0e authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

Add parsing of dashboard name for GWS PHY UPSTREAM

parent d974040b
No related branches found
No related tags found
No related merge requests found
...@@ -486,6 +486,11 @@ def _get_dashboard_data(ifc): ...@@ -486,6 +486,11 @@ def _get_dashboard_data(ifc):
name = description.split('|') name = description.split('|')
name = name[1].strip() name = name[1].strip()
name = name.replace('( ', '(') name = name.replace('( ', '(')
elif BRIAN_DASHBOARDS.GWS_PHY_UPSTREAM.name in dashboards:
name = description.split(' ')[2].strip().upper()
host = ifc['router']
location = host.split('.')[1].upper()
name = f'{name} - {location}'
else: else:
name = description.split(' ')[2].upper() name = description.split(' ')[2].upper()
......
...@@ -290,8 +290,9 @@ def test_interface_dashboard_mapping(description, expected_dashboards): ...@@ -290,8 +290,9 @@ def test_interface_dashboard_mapping(description, expected_dashboards):
}, {'name': 'FCCN', 'interface_type': 'LOGICAL'}), }, {'name': 'FCCN', 'interface_type': 'LOGICAL'}),
({ ({
'description': 'PHY UPSTREAM TELIA SRF9940473 | Telia ID: IC-326863', 'description': 'PHY UPSTREAM TELIA SRF9940473 | Telia ID: IC-326863',
'router': 'mx1.bud.hu.geant.net',
'dashboards': ['GWS_PHY_UPSTREAM'] 'dashboards': ['GWS_PHY_UPSTREAM']
}, {'name': 'TELIA', 'interface_type': 'PHYSICAL'}), }, {'name': 'TELIA - BUD', 'interface_type': 'PHYSICAL'}),
({ ({
'description': 'SRV_IAS UPSTREAM COGENT #COGENT_GWS_VIE | ASN174', 'description': 'SRV_IAS UPSTREAM COGENT #COGENT_GWS_VIE | ASN174',
'dashboards': ['IAS_UPSTREAM'] 'dashboards': ['IAS_UPSTREAM']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment