make get_facts sgx00 compatible
This commit is contained in:
1 parent
ae33f4cc40
commit
5bc1bce26f
1 file changed
+8
@@ -198,11 +198,19 @@ class S350Driver(NetworkDriver):
|
|||||||
show_int_st = self._send_command('show interface status')
|
show_int_st = self._send_command('show interface status')
|
||||||
|
|
||||||
# os_version
|
# os_version
|
||||||
|
# detect os ver > 2
|
||||||
|
if 'Active-image' in show_ver:
|
||||||
for line in show_ver.splitlines():
|
for line in show_ver.splitlines():
|
||||||
# First version line is the active version
|
# First version line is the active version
|
||||||
if 'Version' in line:
|
if 'Version' in line:
|
||||||
_, os_version = line.split('Version: ')
|
_, os_version = line.split('Version: ')
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
for line in show_ver.splitlines():
|
||||||
|
if 'SW version' in line:
|
||||||
|
_, ver = line.split(' ')
|
||||||
|
os_version, _ = ver.split(' (')
|
||||||
|
break
|
||||||
|
|
||||||
# hostname, uptime
|
# hostname, uptime
|
||||||
for line in show_sys.splitlines():
|
for line in show_sys.splitlines():
|
||||||
|
|||||||
Reference in new issue
Block a user