ios cliconf plugin fix regex for version (#40066)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
0407c51447
commit
5cf61d7401
1 changed files with 2 additions and 2 deletions
|
@ -38,9 +38,9 @@ class Cliconf(CliconfBase):
|
|||
reply = self.get('show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'Version (\S+),', data)
|
||||
match = re.search(r'Version (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
device_info['network_os_version'] = match.group(1).strip(',')
|
||||
|
||||
match = re.search(r'^Cisco (.+) \(revision', data, re.M)
|
||||
if match:
|
||||
|
|
Loading…
Reference in a new issue