...
 
Commits (2)
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# AlliedTelesis.AT9900 # AlliedTelesis.AT9900.get_chassis_id
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project # Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details # See LICENSE for details
......
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# AlliedTelesis.AT9900.get_ifindexes
# ---------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# NOC modules
from noc.sa.profiles.Generic.get_ifindexes import Script as BaseScript
from noc.sa.interfaces.igetifindexes import IGetIfindexes
class Script(BaseScript):
name = "AlliedTelesis.AT9900.get_ifindexes"
interface = IGetIfindexes
INTERFACE_NAME_OID = "IF-MIB::ifName"
...@@ -43,7 +43,7 @@ class Script(BaseScript): ...@@ -43,7 +43,7 @@ class Script(BaseScript):
ifaces = [] ifaces = []
v = self.cli("show switch port") v = self.cli("show switch port")
for match in self.rx_port.finditer(v): for match in self.rx_port.finditer(v):
port = match.group("port") port = "port" + match.group("port")
i = { i = {
"name": port, "name": port,
"type": "physical", "type": "physical",
......
...@@ -20,8 +20,3 @@ class Profile(BaseProfile): ...@@ -20,8 +20,3 @@ class Profile(BaseProfile):
command_save_config = "create config=boot1.cfg" command_save_config = "create config=boot1.cfg"
pattern_prompt = r"^Manager.*>" pattern_prompt = r"^Manager.*>"
convert_mac = BaseProfile.convert_mac_to_dashed convert_mac = BaseProfile.convert_mac_to_dashed
def convert_interface_name(self, s):
if s.startswith("Port "):
return s[5:]
return s