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

more general region check

parent f0d65e75
No related branches found
Tags 0.111
1 merge request!43Regions included in dashboard generation
......@@ -907,7 +907,11 @@ def load_interfaces_to_poll(config, hostname=None, no_lab=False, use_next_redis=
ifc['circuits'] = ifc_services_and_customers['services']
_customers = ifc_services_and_customers.get('customers', [])
region = 'EAP' if any(customer in region_index.get('EAP', []) for customer in _customers) else None
region = None
for region_name in region_index:
if any(customer['name'] in region_index[region_name] for customer in _customers):
region = region_name
break
dashboards = _get_dashboards(ifc, region)
ifc['dashboards'] = sorted([d.name for d in dashboards])
......
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