Skip to content
Snippets Groups Projects

Feature/pol1 855 fix eap issues

Merged Sam Roberts requested to merge feature/POL1-855-fix-EAP-issues into develop
1 file
+ 6
15
Compare changes
  • Side-by-side
  • Inline
@@ -490,6 +490,8 @@ def _get_dashboards(interface, region=None):
ifc_name = interface.get('name', '')
description = interface.get('description', '').strip()
is_phy_upstream = re.match(r'PHY UPSTREAM\s', description)
if 'SRV_L3VPN' in description and 'COPERNICUS' in description:
yield BRIAN_DASHBOARDS.COPERNICUS
if re.match(r'SRV_CLS\s', description):
@@ -538,20 +540,18 @@ def _get_dashboards(interface, region=None):
if router == 'rt1.mar.fr.geant.net' \
and re.match(r'^ae12\.\d+$', ifc_name):
yield BRIAN_DASHBOARDS.IC1
if re.match(r'PHY UPSTREAM\s', description):
if is_phy_upstream:
yield BRIAN_DASHBOARDS.GWS_PHY_UPSTREAM
regex = r'(PHY|LAG|(SRV_(GLOBAL|LHCONE|MDVPN|IAS|CLS|L3VPN))) CUSTOMER\s'
if re.match(regex, description) and region is None:
yield BRIAN_DASHBOARDS.NREN
if "GA-" in description and "ANA-" in description:
yield BRIAN_DASHBOARDS.ANA
if region == 'EAP':
if region == 'EAP' and not is_phy_upstream:
yield BRIAN_DASHBOARDS.EAP
def _get_dashboard_data(ifc, customers, regions=None):
if regions is None:
regions = []
def _get_dashboard_data(ifc, customers):
def _get_interface_type(description):
if re.match(r'^PHY', description):
@@ -609,15 +609,6 @@ def _get_dashboard_data(ifc, customers, regions=None):
if not names:
return ifc
# add region-based dashboard names
region_names = []
for name in names:
if name in regions:
region = regions[name]
if region == 'EAP':
region_names.append(BRIAN_DASHBOARDS.EAP.name)
names.extend(region_names)
# to maintain compatability with current brian dashboard manager we will
# continue to return dashboard_info with the first customer name. We will
# also return dashboards_info (note the plural of dashboards) with up to
@@ -921,7 +912,7 @@ def load_interfaces_to_poll(config, hostname=None, no_lab=False, use_next_redis=
ifc['dashboards'] = sorted([d.name for d in dashboards])
ifc = _get_dashboard_data(
ifc, ifc_services_and_customers.get('customers', []), nren_regions)
ifc, ifc_services_and_customers.get('customers', []))
port_type = _get_port_type(ifc['description'])
ifc['port_type'] = port_type
yield ifc
Loading