Commit 0bbcc9dc authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov
Browse files

Add 40G interfaces support to Cisco.IOS profile

parent b009ae49
......@@ -3,7 +3,7 @@
# Vendor: Cisco
# OS: IOS
# ---------------------------------------------------------------------
# Copyright (C) 2007-2017 The NOC Project
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
......@@ -238,6 +238,7 @@ class Profile(BaseProfile):
"Et": "physical", # Ethernet
"Fa": "physical", # FastEthernet
"Fd": "physical", # Fddi
"Fo": "physical", # FortyGigabitEthernet
"Gi": "physical", # GigabitEthernet
"Gm": "physical", # GMPLS
"Gr": "physical", # Group-Async
......
......@@ -2,7 +2,7 @@
# ---------------------------------------------------------------------
# Cisco.IOS.get_interfaces
# ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
......@@ -69,17 +69,17 @@ class Script(BaseScript):
rx_ctp = re.compile(r"Keepalive set \(\d+ sec\)")
rx_cdp = re.compile(r"^(?P<iface>\S+) is ")
rx_lldp = re.compile(
"^(?P<iface>(?:Fa|Gi|Te)[^:]+?):.+Rx: (?P<rx_state>\S+)",
"^(?P<iface>(?:Fa|Gi|Te|Fo)[^:]+?):.+Rx: (?P<rx_state>\S+)",
re.MULTILINE | re.DOTALL)
rx_gvtp = re.compile("VTP Operating Mode\s+: Off", re.MULTILINE)
rx_vtp = re.compile(
"^\s*(?P<iface>(?:Fa|Gi|Te)[^:]+?)\s+enabled",
"^\s*(?P<iface>(?:Fa|Gi|Te|Fo)[^:]+?)\s+enabled",
re.MULTILINE)
rx_vtp1 = re.compile(
"^\s*Local updater ID is \S+ on interface (?P<iface>(?:Fa|Gi|Te)[^:]+?)\s+",
"^\s*Local updater ID is \S+ on interface (?P<iface>(?:Fa|Gi|Te|Fo)[^:]+?)\s+",
re.MULTILINE)
rx_oam = re.compile(
r"^\s*(?P<iface>(?:Fa|Gi|Te)\S+)\s+\S+\s+\S+\s+\S+\s+\S+\s*$")
r"^\s*(?P<iface>(?:Fa|Gi|Te|Fo)\S+)\s+\S+\s+\S+\s+\S+\s+\S+\s*$")
def get_lldp_interfaces(self):
"""
......
......@@ -2,7 +2,7 @@
# ---------------------------------------------------------------------
# Cisco.IOS.get_lldp_neighbors
# ---------------------------------------------------------------------
# Copyright (C) 2007-2017 The NOC Project
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
......@@ -22,7 +22,7 @@ class Script(BaseScript):
rx_summary_split = re.compile(r"^Device ID.+?\n",
re.MULTILINE | re.IGNORECASE)
rx_s_line = re.compile(
r"^[\S+\s]*(?P<local_if>(?:Fa|Gi|Te)\d+[\d/\.]*)\s+.+$")
r"^[\S+\s]*(?P<local_if>(?:Fa|Gi|Te|Fo)\d+[\d/\.]*)\s+.+$")
rx_chassis_id = re.compile(
r"^Chassis id:\s*(?P<id>\S+)", re.MULTILINE | re.IGNORECASE)
rx_remote_port = re.compile(
......
Supports Markdown
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