diff --git a/sa/profiles/Ericsson/SEOS/get_interfaces.py b/sa/profiles/Ericsson/SEOS/get_interfaces.py index 766253feef3d01f572f3ca9e8437ed2410848994..f988cfab8cf4be519272554879653437e8e2d536 100644 --- a/sa/profiles/Ericsson/SEOS/get_interfaces.py +++ b/sa/profiles/Ericsson/SEOS/get_interfaces.py @@ -1,7 +1,7 @@ # --------------------------------------------------------------------- # Ericsson.SEOS.get_interfaces # --------------------------------------------------------------------- -# Copyright (C) 2007-2020 The NOC Project +# Copyright (C) 2007-2022 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- @@ -40,3 +40,6 @@ class Script(BaseScript): for oid, iftype in self.snmp.getnext(mib["IF-MIB::ifType"]) } return self.INTERFACE_TYPES.get(self._iftype_map[ifindex], "other") + + def is_subinterface(self, iface): + return False diff --git a/sa/profiles/Generic/get_interfaces.py b/sa/profiles/Generic/get_interfaces.py index 698551a433e8d1b2d0569f44414dfd84c132580e..f92014be3673fa502f5c44ed54d027add89acf36 100644 --- a/sa/profiles/Generic/get_interfaces.py +++ b/sa/profiles/Generic/get_interfaces.py @@ -1,7 +1,7 @@ # --------------------------------------------------------------------- # Generic.get_interfaces # --------------------------------------------------------------------- -# Copyright (C) 2007-2020 The NOC Project +# Copyright (C) 2007-2022 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- @@ -187,6 +187,10 @@ class Script(BaseScript): """ return True + def is_subinterface(self, iface): + if "." in iface: + return True + def execute_snmp(self, **kwargs): ifaces = {} # For interfaces subifaces = {} # For subinterfaces like Fa 0/1.XXX @@ -202,7 +206,7 @@ class Script(BaseScript): iface["ifindex"], iface["interface"], iface.get("oper_status") ): continue - if "." in iface["interface"]: + if self.is_subinterface(iface["interface"]): subifaces[iface["ifindex"]] = { "name": iface["interface"], "snmp_ifindex": iface["ifindex"],