Skip to content
Snippets Groups Projects
Commit f5a7b2eb authored by Release Webservice's avatar Release Webservice
Browse files

Finished release 0.46.

parents ace4f49b 72cb4c95
No related branches found
No related tags found
No related merge requests found
...@@ -140,6 +140,7 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards): ...@@ -140,6 +140,7 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards):
result = {} result = {}
customers = defaultdict(list) customers = defaultdict(list)
aggregate_interfaces = dict()
for service in services: for service in services:
_customers = service.get('customers') _customers = service.get('customers')
...@@ -187,6 +188,8 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards): ...@@ -187,6 +188,8 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards):
router = router.replace('.geant.net', '') router = router.replace('.geant.net', '')
location = router.split('.')[1].upper() location = router.split('.')[1].upper()
title = f'{location} - {customer} ({if_name}) | {name}' title = f'{location} - {customer} ({if_name}) | {name}'
aggregate_interfaces[f'{router}:::{if_name}'] = True
dashboard['AGGREGATES'].append({ dashboard['AGGREGATES'].append({
'measurement': measurement, 'measurement': measurement,
'alias': title, 'alias': title,
...@@ -203,6 +206,9 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards): ...@@ -203,6 +206,9 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards):
'scid': scid 'scid': scid
}) })
def _check_in_aggregate(router, interface):
return f'{router}:::{interface}' in aggregate_interfaces
for interface in interfaces: for interface in interfaces:
description = interface['description'].strip() description = interface['description'].strip()
...@@ -225,7 +231,8 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards): ...@@ -225,7 +231,8 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards):
'PHYSICAL': [] 'PHYSICAL': []
}) })
if port_type == 'access': _covered_by_service = _check_in_aggregate(router, interface_name)
if port_type == 'access' and not _covered_by_service:
dashboard['AGGREGATES'].append({ dashboard['AGGREGATES'].append({
'interface': interface_name, 'interface': interface_name,
'hostname': host, 'hostname': host,
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.46] - 2022-12-7
- POL1-645: Changed NREN aggregate code to not add duplicate interfaces
## [0.45] - 2022-12-7 ## [0.45] - 2022-12-7
- POL1-642: Added new service-based NREN dashboard as a separate beta for staff - POL1-642: Added new service-based NREN dashboard as a separate beta for staff
- POL1-645: Changed how interfaces/services are addeed to Aggregate panels - POL1-645: Changed how interfaces/services are addeed to Aggregate panels
......
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='brian-dashboard-manager', name='brian-dashboard-manager',
version="0.45", version="0.46",
author='GEANT', author='GEANT',
author_email='swd@geant.org', author_email='swd@geant.org',
description='', description='',
......
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