mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-30 20:20:21 -07:00
roll up of fixes for eos modules (#21406)
* fixes issue with load_provider() not checking for an existing key * adds updates to eos_config results key * lots of minor syntax fixes in eos shared module * adds eos_argument_spec to eos_eapi fixes #21402
This commit is contained in:
parent
e1761d7724
commit
e1a2c6e1d3
7 changed files with 36 additions and 23 deletions
|
@ -85,14 +85,13 @@ class ActionModule(_ActionModule):
|
|||
def load_provider(self):
|
||||
provider = self._task.args.get('provider', {})
|
||||
for key, value in iteritems(eos_argument_spec):
|
||||
if key == 'provider':
|
||||
continue
|
||||
elif key in self._task.args:
|
||||
provider[key] = self._task.args[key]
|
||||
elif 'fallback' in value:
|
||||
provider[key] = self._fallback(value['fallback'])
|
||||
elif key not in provider:
|
||||
provider[key] = None
|
||||
if key != 'provider' and key not in provider:
|
||||
if key in self._task.args:
|
||||
provider[key] = self._task.args[key]
|
||||
elif 'fallback' in value:
|
||||
provider[key] = self._fallback(value['fallback'])
|
||||
elif key not in provider:
|
||||
provider[key] = None
|
||||
return provider
|
||||
|
||||
def _fallback(self, fallback):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue