mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Standardize cliconf get_capabilities (#51147)
* Standardize cliconf get_capabilities * Check for capabilities before querying them * Try to be more helpful when unexpected things are found in get_capabilities * Add flags param to get_config for compatibility
This commit is contained in:
parent
bd44db141a
commit
9336281a60
26 changed files with 82 additions and 143 deletions
|
@ -278,6 +278,22 @@ class CliconfBase(AnsiblePlugin):
|
|||
}
|
||||
:return: capability as json string
|
||||
"""
|
||||
result = {}
|
||||
result['rpc'] = self.get_base_rpc()
|
||||
result['device_info'] = self.get_device_info()
|
||||
result['network_api'] = 'cliconf'
|
||||
return result
|
||||
|
||||
@abstractmethod
|
||||
def get_device_info(self):
|
||||
"""Returns basic information about the network device.
|
||||
|
||||
This method will provide basic information about the device such as OS version and model
|
||||
name. This data is expected to be used to fill the 'device_info' key in get_capabilities()
|
||||
above.
|
||||
|
||||
:return: dictionary of device information
|
||||
"""
|
||||
pass
|
||||
|
||||
def commit(self, comment=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue