mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Deprecate the bigip_asm_policy module (#49574)
Specific import and export modules should be used instead
This commit is contained in:
parent
9dc36fcaf0
commit
1c3fa2b07f
2 changed files with 32 additions and 15 deletions
|
@ -9,7 +9,7 @@ __metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['preview'],
|
'status': ['deprecated'],
|
||||||
'supported_by': 'certified'}
|
'supported_by': 'certified'}
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r'''
|
||||||
|
@ -19,6 +19,14 @@ short_description: Manage BIG-IP ASM policies
|
||||||
description:
|
description:
|
||||||
- Manage BIG-IP ASM policies.
|
- Manage BIG-IP ASM policies.
|
||||||
version_added: 2.5
|
version_added: 2.5
|
||||||
|
deprecated:
|
||||||
|
removed_in: '2.12'
|
||||||
|
alternative: bigip_asm_policy_manage
|
||||||
|
why: >
|
||||||
|
The bigip_asm_policy module has been split into three new modules to handle import, export and general policy
|
||||||
|
management. This will allow scalability of the asm policy management as well as ease of maintenance.
|
||||||
|
Additionally to further reduce the burden of having multiple smaller module F5 has created asm_policy
|
||||||
|
role in Ansible Galaxy for a more declarative way of ASM policy management.
|
||||||
options:
|
options:
|
||||||
active:
|
active:
|
||||||
description:
|
description:
|
||||||
|
@ -500,8 +508,17 @@ class BaseManager(object):
|
||||||
changes = self.changes.to_return()
|
changes = self.changes.to_return()
|
||||||
result.update(**changes)
|
result.update(**changes)
|
||||||
result.update(dict(changed=changed))
|
result.update(dict(changed=changed))
|
||||||
|
self._announce_deprecations(result)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def _announce_deprecations(self, result):
|
||||||
|
warnings = result.pop('__warnings', [])
|
||||||
|
for warning in warnings:
|
||||||
|
self.client.module.deprecate(
|
||||||
|
msg=warning['msg'],
|
||||||
|
version=warning['version']
|
||||||
|
)
|
||||||
|
|
||||||
def _set_changed_options(self):
|
def _set_changed_options(self):
|
||||||
changed = {}
|
changed = {}
|
||||||
for key in Parameters.returnables:
|
for key in Parameters.returnables:
|
|
@ -17,12 +17,12 @@ if sys.version_info < (2, 7):
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from library.modules.bigip_asm_policy import V1Parameters
|
from library.modules._bigip_asm_policy import V1Parameters
|
||||||
from library.modules.bigip_asm_policy import V2Parameters
|
from library.modules._bigip_asm_policy import V2Parameters
|
||||||
from library.modules.bigip_asm_policy import ModuleManager
|
from library.modules._bigip_asm_policy import ModuleManager
|
||||||
from library.modules.bigip_asm_policy import V1Manager
|
from library.modules._bigip_asm_policy import V1Manager
|
||||||
from library.modules.bigip_asm_policy import V2Manager
|
from library.modules._bigip_asm_policy import V2Manager
|
||||||
from library.modules.bigip_asm_policy import ArgumentSpec
|
from library.modules._bigip_asm_policy import ArgumentSpec
|
||||||
|
|
||||||
from library.module_utils.network.f5.common import F5ModuleError
|
from library.module_utils.network.f5.common import F5ModuleError
|
||||||
|
|
||||||
|
@ -33,12 +33,12 @@ try:
|
||||||
|
|
||||||
from test.units.modules.utils import set_module_args
|
from test.units.modules.utils import set_module_args
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from ansible.modules.network.f5.bigip_asm_policy import V1Parameters
|
from ansible.modules.network.f5._bigip_asm_policy import V1Parameters
|
||||||
from ansible.modules.network.f5.bigip_asm_policy import V2Parameters
|
from ansible.modules.network.f5._bigip_asm_policy import V2Parameters
|
||||||
from ansible.modules.network.f5.bigip_asm_policy import ModuleManager
|
from ansible.modules.network.f5._bigip_asm_policy import ModuleManager
|
||||||
from ansible.modules.network.f5.bigip_asm_policy import V1Manager
|
from ansible.modules.network.f5._bigip_asm_policy import V1Manager
|
||||||
from ansible.modules.network.f5.bigip_asm_policy import V2Manager
|
from ansible.modules.network.f5._bigip_asm_policy import V2Manager
|
||||||
from ansible.modules.network.f5.bigip_asm_policy import ArgumentSpec
|
from ansible.modules.network.f5._bigip_asm_policy import ArgumentSpec
|
||||||
|
|
||||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||||
|
|
||||||
|
@ -99,11 +99,11 @@ class TestManager(unittest.TestCase):
|
||||||
self.patcher1.start()
|
self.patcher1.start()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.p1 = patch('library.modules.bigip_asm_policy.module_provisioned')
|
self.p1 = patch('library.modules._bigip_asm_policy.module_provisioned')
|
||||||
self.m1 = self.p1.start()
|
self.m1 = self.p1.start()
|
||||||
self.m1.return_value = True
|
self.m1.return_value = True
|
||||||
except Exception:
|
except Exception:
|
||||||
self.p1 = patch('ansible.modules.network.f5.bigip_asm_policy.module_provisioned')
|
self.p1 = patch('ansible.modules.network.f5._bigip_asm_policy.module_provisioned')
|
||||||
self.m1 = self.p1.start()
|
self.m1 = self.p1.start()
|
||||||
self.m1.return_value = True
|
self.m1.return_value = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue