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

added new categories

parent 331d937d
Branches
Tags
No related merge requests found
......@@ -691,7 +691,8 @@ class PollerServiceCategory(str, enum.Enum):
MDVPN = 'mdvpn'
LHCONE_CUST = 'lhcone_cust'
LHCONE_PEER = 'lhcone_peer'
L2_Circuits = 'l2_circuits'
L2_CIRCUITS = 'l2_circuits'
AUTOMATED_L2_CIRCUITS = 'automated_l2_circuits'
IAS = 'ias'
RE_CUST = 're_cust'
RE_PEER = 're_peer'
......@@ -701,21 +702,29 @@ class PollerServiceCategory(str, enum.Enum):
def _classify_interface(ifc):
if ifc['description'].startswith('SRV_MDVPN CUSTOMER'):
yield PollerServiceCategory.MDVPN
if 'LHCONE' in ifc['description'] \
and 'SRV_L3VPN CUSTOMER' in ifc['description']:
yield PollerServiceCategory.LHCONE_CUST
if 'LHCONE' in ifc['description'] \
and 'SRV_L3VPN RE' in ifc['description']:
yield PollerServiceCategory.LHCONE_PEER
if 'SRV_L2CIRCUIT' in ifc['description'] \
and 'SRV_L3VPN' in ifc['description']:
yield PollerServiceCategory.L2_Circuits
if 'SRV_L2CIRCUIT' in ifc['description']:
yield PollerServiceCategory.L2_CIRCUITS
if 'SRV_GCS' in ifc['description']:
yield PollerServiceCategory.AUTOMATED_L2_CIRCUITS
if 'PHY CUSTOMER' in ifc['description'] \
and 'LAG CUSTOMER' in ifc['description'] \
and 'SRV_GLOBAL CUSTOMER' in ifc['description']:
or 'LAG CUSTOMER' in ifc['description'] \
or 'SRV_GLOBAL CUSTOMER' in ifc['description']:
yield PollerServiceCategory.RE_CUST
if 'SRV_GLOBAL RE_INTERCONNECT' in ifc['description']:
yield PollerServiceCategory.RE_PEER
if 'SRV_IAS CUSTOMER' in ifc['description']:
yield PollerServiceCategory.IAS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment