ios cliconf plugin fix regex for version (#40066)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2018-05-14 12:40:04 +05:30 committed by GitHub
parent 0407c51447
commit 5cf61d7401
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: