mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
More bug fixes before 2.5 (#35260)
This patch includes more fixes for bugs that were identified in the upcoming 2.5 release.
This commit is contained in:
parent
c643a5d628
commit
bd09e67438
6 changed files with 101 additions and 115 deletions
|
@ -84,6 +84,7 @@ f5_top_spec = {
|
|||
),
|
||||
'transport': dict(
|
||||
removed_in_version=2.9,
|
||||
default='rest',
|
||||
choices=['cli', 'rest']
|
||||
)
|
||||
}
|
||||
|
@ -94,6 +95,14 @@ def get_provider_argspec():
|
|||
return f5_provider_spec
|
||||
|
||||
|
||||
def load_params(params):
|
||||
provider = params.get('provider') or dict()
|
||||
for key, value in iteritems(provider):
|
||||
if key in f5_argument_spec:
|
||||
if params.get(key) is None and value is not None:
|
||||
params[key] = value
|
||||
|
||||
|
||||
# Fully Qualified name (with the partition)
|
||||
def fqdn_name(partition, value):
|
||||
if value is not None and not value.startswith('/'):
|
||||
|
@ -143,7 +152,8 @@ def cleanup_tokens(client):
|
|||
def is_cli(module):
|
||||
transport = module.params['transport']
|
||||
provider_transport = (module.params['provider'] or {}).get('transport')
|
||||
return 'cli' in (transport, provider_transport)
|
||||
result = 'cli' in (transport, provider_transport)
|
||||
return result
|
||||
|
||||
|
||||
class Noop(object):
|
||||
|
@ -163,6 +173,7 @@ class Noop(object):
|
|||
class F5BaseClient(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.params = kwargs
|
||||
load_params(self.params)
|
||||
|
||||
@property
|
||||
def api(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue