mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
Fixes and additions for f5 modules (#39986)
Small fixes in the f5 module utils. I believe the action plugins now work consistently across types of connections
This commit is contained in:
parent
8654508cbd
commit
00a6b19e58
6 changed files with 172 additions and 162 deletions
|
@ -295,8 +295,6 @@ def compare_dictionary(want, have):
|
|||
|
||||
Returns:
|
||||
bool:
|
||||
:param have:
|
||||
:return:
|
||||
"""
|
||||
if want == [] and have is None:
|
||||
return None
|
||||
|
@ -328,6 +326,26 @@ def exit_json(module, results, client=None):
|
|||
module.exit_json(**results)
|
||||
|
||||
|
||||
def is_uuid(uuid=None):
|
||||
"""Check to see if value is an F5 UUID
|
||||
|
||||
UUIDs are used in BIG-IQ and in select areas of BIG-IP (notably ASM). This method
|
||||
will check to see if the provided value matches a UUID as known by these products.
|
||||
|
||||
Args:
|
||||
uuid (string): The value to check for UUID-ness
|
||||
|
||||
Returns:
|
||||
bool:
|
||||
"""
|
||||
if uuid is None:
|
||||
return False
|
||||
pattern = r'[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}'
|
||||
if re.match(pattern, uuid):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
class Noop(object):
|
||||
"""Represent no-operation required
|
||||
|
||||
|
@ -405,7 +423,7 @@ class F5BaseClient(object):
|
|||
elif self.params.get('auth_provider', None):
|
||||
result['auth_provider'] = self.params.get('auth_provider', None)
|
||||
else:
|
||||
result['auth_provider'] = 'tmos'
|
||||
result['auth_provider'] = None
|
||||
|
||||
if provider.get('user', None):
|
||||
result['user'] = provider.get('user', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue