Skip to content
Snippets Groups Projects
Commit bcf2ce53 authored by Pelle Koster's avatar Pelle Koster
Browse files

Merge branch 'feature/POL1-704-only-aggregate-subinterfaces' into 'develop'

Feature/POL1-704 Only tag ae12 subinterfaces for CAE-1 and IC-1 aggregate dashboards

See merge request !32
parents 496959b4 50e392a0
Branches
Tags
1 merge request!32Feature/POL1-704 Only tag ae12 subinterfaces for CAE-1 and IC-1 aggregate dashboards
......@@ -504,10 +504,10 @@ def _get_dashboards(interface):
if re.match(r'(SRV_GLOBAL|LAG|PHY) INFRASTRUCTURE BACKBONE', description):
yield BRIAN_DASHBOARDS.INFRASTRUCTURE_BACKBONE
if router == 'mx1.lon.uk.geant.net' \
and re.match(r'^ae12(\.\d+|$)$', ifc_name):
and re.match(r'^ae12\.\d+$', ifc_name):
yield BRIAN_DASHBOARDS.CAE1
if router == 'rt1.mar.fr.geant.net' \
and re.match(r'^ae12(\.\d+|$)$', ifc_name):
and re.match(r'^ae12\.\d+$', ifc_name):
yield BRIAN_DASHBOARDS.IC1
if re.match(r'PHY UPSTREAM\s', description):
yield BRIAN_DASHBOARDS.GWS_PHY_UPSTREAM
......
......@@ -318,24 +318,19 @@ def test_interface_dashboard_mapping(description, expected_dashboards):
assert set(d.name for d in dashboards) == set(expected_dashboards)
def test__CAE_1_dashboards():
interface = {
'router': 'mx1.lon.uk.geant.net',
'name': 'ae12.123',
'description': ''
}
dashboards = poller._get_dashboards(interface)
assert set(d.name for d in dashboards) == {"CAE1"}
def test_POL1_703_IC1_dashboards():
interface = {
'router': 'rt1.mar.fr.geant.net',
'name': 'ae12.123',
'description': ''
}
@pytest.mark.parametrize(
"router, interface, exp_dashboards",
[
("mx1.lon.uk.geant.net", "ae12.123", ["CAE1"]),
("mx1.lon.uk.geant.net", "ae12", []), # POL1-704
("rt1.mar.fr.geant.net", "ae12.123", ["IC1"]), # POL1_703
("rt1.mar.fr.geant.net", "ae12", []), # POL1-704
],
)
def test_ae12_aggregate_dashboards(router, interface, exp_dashboards):
interface = {"router": router, "name": interface, "description": ""}
dashboards = poller._get_dashboards(interface)
assert set(d.name for d in dashboards) == {"IC1"}
assert [d.name for d in dashboards] == exp_dashboards
@pytest.mark.parametrize('interface,customers,dashboard_info', [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment