Commit 7fdda623 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Fix Cisco.IOS ME switch

--HG--
branch : feature/microservices
parent e4c46920
......@@ -17,7 +17,7 @@ from noc.core.profile.base import BaseProfile
class Profile(BaseProfile):
name = "Cisco.IOS"
pattern_more = [
(r"^ --More--", "\n"),
(r"^ --More--", "\r\n"),
(r"(?:\?|interfaces)\s*\[confirm\]", "\n")
]
pattern_unpriveleged_prompt = r"^\S+?>"
......
......@@ -20,14 +20,14 @@ class Script(BaseScript):
interface = IGetSwitchport
rx_cont = re.compile(r",\s*$\s+", re.MULTILINE)
rx_line = re.compile(r"\n+Name:\s+", re.MULTILINE)
rx_line = re.compile(r"\n+\s*Name:\s+", re.MULTILINE)
rx_body = re.compile(r"^(?P<interface>\S+).+"
"^Administrative Mode: (?P<amode>.+).+"
"^Operational Mode: (?P<omode>.+).+"
"^Administrative Trunking Encapsulation:.+"
"^Access Mode VLAN: (?P<avlan>\d+) \(.+\).+"
"^Trunking Native Mode VLAN: (?P<nvlan>\d+) \(.+\).+"
"^Trunking VLANs Enabled: (?P<vlans>.+?)$",
"^\s*Administrative Mode: (?P<amode>.+).+"
"^\s*Operational Mode: (?P<omode>.+).+"
"^\s*Administrative Trunking Encapsulation:.+"
"^\s*Access Mode VLAN: (?P<avlan>\d+) \(.+\).+"
"^\s*Trunking Native Mode VLAN: (?P<nvlan>\d+) \(.+\).+"
"^\s*Trunking VLANs Enabled: (?P<vlans>.+?)$",
#"Pruning VLANs Enabled:",
re.MULTILINE | re.DOTALL)
......
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