Skip to content
Snippets Groups Projects
Commit 90274645 authored by Vidya Ambadipudi's avatar Vidya Ambadipudi
Browse files

added test for multiple category classification

parent 0e14ebc9
Branches
Tags
No related merge requests found
......@@ -699,6 +699,7 @@ class PollerServiceCategory(str, enum.Enum):
def _classify_interface(ifc):
if ifc['description'].startswith('SRV_MDVPN CUSTOMER'):
yield PollerServiceCategory.MDVPN
......
......@@ -139,34 +139,41 @@ def test_build_subnet_db(mocked_worker_module):
}
],
[
'SRV_L3VPN CUSTOMER ESNET LHCONE SRF9928635 | ASN293 | GEN-EEX-ESNET-LHCONE', # noqa
'SRV_L3VPN CUSTOMER ESNET LHCONE SRF9928635 | ASN293 | GEN-EEX-ESNET-LHCONE',
{
worker.PollerServiceCategory.LHCONE_CUST
}
],
[
'SRV_L3VPN RE KREONET LHCONE SRF17072 | ASN17579', # noqa
'SRV_L3VPN RE KREONET LHCONE SRF17072 | ASN17579',
{
worker.PollerServiceCategory.LHCONE_PEER
}
],
[
'SRV_IAS CUSTOMER ACONET SRF9947199 IASPS | ASN1853', # noqa
'SRV_IAS CUSTOMER ACONET SRF9947199 IASPS | ASN1853',
{
worker.PollerServiceCategory.IAS
}
],
[
'SRV_GLOBAL CUSTOMER HBKU SRF18085 | ASN34945|', # noqa
'SRV_GLOBAL CUSTOMER HBKU SRF18085 | ASN34945|',
{
worker.PollerServiceCategory.RE_CUST
}
],
[
'SRV_GLOBAL RE_INTERCONNECT HBKU SRF18085 | ASN34945|', # noqa
'SRV_GLOBAL RE_INTERCONNECT HBKU SRF18085 | ASN34945|',
{
worker.PollerServiceCategory.RE_PEER
}
],
[
'SRV_MDVPN CUSTOMER LHCONE SRV_L3VPN CUSTOMER SRF18085 | ASN34945|',
{
worker.PollerServiceCategory.MDVPN,
worker.PollerServiceCategory.LHCONE_CUST
}
]
])
def test_interface_classification(description, expected_categories):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment