mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Adds the bigip_data_group module (#39180)
This module can be used to manipulate bigip data groups.
This commit is contained in:
parent
c262dbfd30
commit
d38ae9b6c9
13 changed files with 2413 additions and 59 deletions
1069
lib/ansible/modules/network/f5/bigip_data_group.py
Normal file
1069
lib/ansible/modules/network/f5/bigip_data_group.py
Normal file
File diff suppressed because it is too large
Load diff
|
@ -20,7 +20,7 @@ description:
|
|||
to accept configuration.
|
||||
- This module can take into account situations where the device is in the middle
|
||||
of rebooting due to a configuration change.
|
||||
version_added: "2.5"
|
||||
version_added: 2.5
|
||||
options:
|
||||
timeout:
|
||||
description:
|
||||
|
@ -80,30 +80,21 @@ import time
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
HAS_DEVEL_IMPORTS = False
|
||||
|
||||
try:
|
||||
# Sideband repository used for dev
|
||||
from library.module_utils.network.f5.bigip import HAS_F5SDK
|
||||
from library.module_utils.network.f5.bigip import F5Client
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fqdn_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
try:
|
||||
from library.module_utils.network.f5.common import iControlUnexpectedHTTPError
|
||||
except ImportError:
|
||||
HAS_F5SDK = False
|
||||
HAS_DEVEL_IMPORTS = True
|
||||
except ImportError:
|
||||
# Upstream Ansible
|
||||
from ansible.module_utils.network.f5.bigip import HAS_F5SDK
|
||||
from ansible.module_utils.network.f5.bigip import F5Client
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fqdn_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
try:
|
||||
from ansible.module_utils.network.f5.common import iControlUnexpectedHTTPError
|
||||
|
@ -186,6 +177,9 @@ class ModuleManager(object):
|
|||
version=warning['version']
|
||||
)
|
||||
|
||||
def _get_client_connection(self):
|
||||
return F5Client(**self.module.params)
|
||||
|
||||
def execute(self):
|
||||
signal.signal(
|
||||
signal.SIGALRM,
|
||||
|
@ -204,7 +198,7 @@ class ModuleManager(object):
|
|||
try:
|
||||
# The first test verifies that the REST API is available; this is done
|
||||
# by repeatedly trying to login to it.
|
||||
self.client = F5Client(**self.module.params)
|
||||
self.client = self._get_client_connection()
|
||||
if not self.client:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue