Commit 1bc2ee22 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Fix Cisco compare version

branch : scripFix/CiscoSNMP
parent 8340914c
......@@ -36,6 +36,12 @@ class Profile(BaseProfile):
rx_cable_if = re.compile(r"Cable\s*(?P<pr_if>\d+/\d+) U(pstream)?\s*(?P<sub_if>\d+)", re.IGNORECASE)
default_parser = ""
rx_ver = re.compile(r"(\d+)\.(\d+)\((\d+)\)\S*")
def cmp_version(self, x, y):
return cmp([int(z) for z in self.rx_ver.findall(x)[0]],
[int(z) for z in self.rx_ver.findall(y)[0]])
def convert_interface_name(self, interface):
if " efp_id " in interface:
......@@ -90,6 +90,8 @@ class Script(BaseScript):
Returns a set of normalized VTP interface names
if self.match_version(version__lte="12.2(25)"):
return set()
v = self.cli("show vtp status")
except self.CLISyntaxError:
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