Commit 05918a27 authored by bee26's avatar bee26
Browse files

Update get_version.py

parent 9173f77b
Pipeline #14791 passed with stages
in 13 minutes and 43 seconds
......@@ -35,9 +35,9 @@ class Script(BaseScript):
)
rx_ver_snmp1 = re.compile(
r"Huawei Versatile Routing Platform Software\s*"
r"VRP \(R\) software, Version (?P<version>\d+.\d+) \((?:CX\S+|ATN\S+|ATN(?: \S+){0,2}) (?P<image>\S+)\)\s*"
r"VRP \(R\) software, Version (?P<version>\d+.\d+) \((?:C[EX]\S+|ATN\S+|ATN(?: \S+){0,2}) (?P<image>\S+)\)\s*"
r"Copyright \(C\) \d+-\d+ Huawei Technologies Co., Ltd.\s*"
r"(?:HUAWEI\s*)?(?P<platform>(?:CX\S+|ATN\S+|ATN(?: \S+){0,2}))\s*",
r"(?:HUAWEI\s*)?(?P<platform>(?:C[EX]\S+|ATN\S+|ATN(?: \S+){0,2}))\s*",
re.MULTILINE | re.IGNORECASE,
)
rx_ver_snmp2 = re.compile(
......@@ -183,7 +183,6 @@ class Script(BaseScript):
v = self.cli("display version", cached=True)
except self.CLISyntaxError:
raise self.NotSupportedError()
platform, version, image = self.parse_version(v)
serial = []
for oid, x in self.snmp.getnext(mib["ENTITY-MIB::entPhysicalSerialNum"]):
......@@ -229,4 +228,3 @@ class Script(BaseScript):
if attributes:
r["attributes"] = attributes.copy()
return r
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