Commit 50320edd authored by Andrey Vertiprahov's avatar Andrey Vertiprahov

Merge branch 'add_get_ifindexes_AlliedTelesis.AT9900_profile' into 'master'

add_get_ifindexes_AlliedTelesis.AT9900_profile

See merge request noc/noc!3160
parents 0b9311de 857576ce
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# AlliedTelesis.AT9900
# AlliedTelesis.AT9900.get_chassis_id
# ---------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# 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):
ifaces = []
v = self.cli("show switch port")
for match in self.rx_port.finditer(v):
port = match.group("port")
port = "port" + match.group("port")
i = {
"name": port,
"type": "physical",
......
......@@ -20,8 +20,3 @@ class Profile(BaseProfile):
command_save_config = "create config=boot1.cfg"
pattern_prompt = r"^Manager.*>"
convert_mac = BaseProfile.convert_mac_to_dashed
def convert_interface_name(self, s):
if s.startswith("Port "):
return s[5:]
return s
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment