mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 13:21:25 -07:00
Get Capabilities Support (#49880)
Signed-off-by: Anas Badaha <anasb@mellanox.com>
This commit is contained in:
parent
4019d4f6d1
commit
fb8b59fcc6
2 changed files with 22 additions and 9 deletions
|
@ -36,10 +36,11 @@ class Cliconf(CliconfBase):
|
|||
reply = self.get(b'show version | json-print')
|
||||
data = json.loads(reply)
|
||||
device_info['network_os'] = data['Product name']
|
||||
device_info['network_os_version'] = data['Version summary']
|
||||
device_info['network_os_version'] = data['Product release']
|
||||
device_info['network_os_version_summary'] = data['Version summary']
|
||||
device_info['network_os_model'] = data['Product model']
|
||||
|
||||
reply = self.get(b'show version | include Hostname')
|
||||
reply = self.get(b'show hosts | include Hostname')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
hostname = data.split(':')[1]
|
||||
hostname = hostname.strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue