mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -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
|
@ -241,10 +241,8 @@ class Cliconf(CliconfBase):
|
|||
}
|
||||
|
||||
def get_capabilities(self):
|
||||
result = {}
|
||||
result['rpc'] = self.get_base_rpc() + ['commit', 'discard_changes', 'get_diff', 'run_commands']
|
||||
result['network_api'] = 'cliconf'
|
||||
result['device_info'] = self.get_device_info()
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
result['rpc'] += ['commit', 'discard_changes', 'get_diff', 'run_commands']
|
||||
result['device_operations'] = self.get_device_operations()
|
||||
result.update(self.get_option_values())
|
||||
return json.dumps(result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue