Skip to content
Snippets Groups Projects
Commit d3d947e8 authored by Sam Roberts's avatar Sam Roberts
Browse files

fix EAP aggregate not being populated

parent 6ce77481
No related branches found
No related tags found
1 merge request!13Feature/pol1 430 EAP NRENs
...@@ -195,6 +195,11 @@ AGG_DASHBOARDS = { ...@@ -195,6 +195,11 @@ AGG_DASHBOARDS = {
'dashboard_name': 'ANA', 'dashboard_name': 'ANA',
'interfaces': [] 'interfaces': []
}, },
'EAP': {
'tag': 'eap',
'dashboard_name': 'EAP Aggregate',
'interfaces': []
}
} }
NREN_CATEGORIES = { NREN_CATEGORIES = {
...@@ -470,6 +475,17 @@ def _provision_interfaces(config, org_config, ds_name, token): ...@@ -470,6 +475,17 @@ def _provision_interfaces(config, org_config, ds_name, token):
ifaces = AGG_DASHBOARDS[dash_name]['interfaces'] ifaces = AGG_DASHBOARDS[dash_name]['interfaces']
ifaces.append(iface) ifaces.append(iface)
# aggregate dashboards based on dashboards_info
# there is no way for inventory provider to identify an interface as
# belonging to an EAP NREN at the level 'dashboards' is set
# (based on description and without access to service data)
# so we have to do this as an extra check on 'dashboards_info'
for dashboard in iface['dashboards_info']:
dash_name = dashboard['name']
if dash_name in AGG_DASHBOARDS:
ifaces = AGG_DASHBOARDS[dash_name]['interfaces']
ifaces.append(iface)
# provision dashboards and their folders # provision dashboards and their folders
with ThreadPoolExecutor(max_workers=MAX_WORKERS) as executor: with ThreadPoolExecutor(max_workers=MAX_WORKERS) as executor:
provisioned = [] provisioned = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment