Commit 8eef650d authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'fix-avs-cisco-asr1006-version' into 'master'

Cisco.IOS.get_version. Fix ASR1006 SNMP version regex for 15.2(20150718) format.

See merge request noc/noc!6040
parents f7d389d2 5990d3a1
...@@ -28,7 +28,7 @@ class Script(BaseScript): ...@@ -28,7 +28,7 @@ class Script(BaseScript):
) )
rx_snmp_ver = re.compile( rx_snmp_ver = re.compile(
r"^(?:Cisco IOS Software( \[(?:Gibraltar|Fuji|Everest|Denali|Amsterdam)\])?,.*?|IOS \(tm\)) (?P<platform>.+?) " r"^(?:Cisco IOS Software( \[(?:Gibraltar|Fuji|Everest|Denali|Amsterdam)\])?,.*?|IOS \(tm\)) (?P<platform>.+?) "
r"Software \((?P<image>[^)]+)\), (Experimental )?Version (?P<version>[^,]+),", r"Software \((?P<image>[^)]+)\), (Experimental )?Version (?P<version>[^\s,]+)",
re.MULTILINE | re.DOTALL, re.MULTILINE | re.DOTALL,
) )
rx_platform = re.compile( rx_platform = re.compile(
......
...@@ -51,7 +51,7 @@ class Profile(BaseProfile): ...@@ -51,7 +51,7 @@ class Profile(BaseProfile):
("hints", "protocols", "ntp", "version", "3"), ("hints", "protocols", "ntp", "version", "3"),
# ("hints", "protocols", "loop-detect", "status", False), # ("hints", "protocols", "loop-detect", "status", False),
] ]
rx_ver = re.compile(r"(\d+)\.(\d+)[\(.](\d+)\w*[\).]\S*") rx_ver = re.compile(r"(\d+)\.(\d+)[\(.](\d+):?(\d+)?\w*[\).]\S*")
matchers = { matchers = {
"is_platform_7200": {"platform": {"$regex": r"720[0146]|730[14]"}}, "is_platform_7200": {"platform": {"$regex": r"720[0146]|730[14]"}},
......
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