Removes f5-sdk references from bigip modules (#48911)

pull/48916/head
Tim Rupp 6 years ago committed by GitHub
parent e62edfc796
commit e7d1c0fb77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_appsvcs_extension import ApiParameters
from ansible.modules.network.f5.bigip_appsvcs_extension import ApiParameters from ansible.modules.network.f5.bigip_appsvcs_extension import ModuleParameters
from ansible.modules.network.f5.bigip_appsvcs_extension import ModuleParameters from ansible.modules.network.f5.bigip_appsvcs_extension import ModuleManager
from ansible.modules.network.f5.bigip_appsvcs_extension import ModuleManager from ansible.modules.network.f5.bigip_appsvcs_extension import ArgumentSpec
from ansible.modules.network.f5.bigip_appsvcs_extension import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -80,10 +78,7 @@ class TestParameters(unittest.TestCase):
assert p.targets == ['T1', 'T2'] assert p.targets == ['T1', 'T2']
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):
self.spec = ArgumentSpec() self.spec = ArgumentSpec()

@ -34,24 +34,22 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: 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
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_cli_alias import ApiParameters
from ansible.modules.network.f5.bigip_cli_alias import ApiParameters from ansible.modules.network.f5.bigip_cli_alias import ModuleParameters
from ansible.modules.network.f5.bigip_cli_alias import ModuleParameters from ansible.modules.network.f5.bigip_cli_alias import ModuleManager
from ansible.modules.network.f5.bigip_cli_alias import ModuleManager from ansible.modules.network.f5.bigip_cli_alias import ArgumentSpec
from ansible.modules.network.f5.bigip_cli_alias import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_cli_script import ApiParameters
from ansible.modules.network.f5.bigip_cli_script import ApiParameters from ansible.modules.network.f5.bigip_cli_script import ModuleParameters
from ansible.modules.network.f5.bigip_cli_script import ModuleParameters from ansible.modules.network.f5.bigip_cli_script import ModuleManager
from ansible.modules.network.f5.bigip_cli_script import ModuleManager from ansible.modules.network.f5.bigip_cli_script import ArgumentSpec
from ansible.modules.network.f5.bigip_cli_script import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_command import Parameters
from ansible.modules.network.f5.bigip_command import Parameters from ansible.modules.network.f5.bigip_command import ModuleManager
from ansible.modules.network.f5.bigip_command import ModuleManager from ansible.modules.network.f5.bigip_command import V1Manager
from ansible.modules.network.f5.bigip_command import V1Manager from ansible.modules.network.f5.bigip_command import V2Manager
from ansible.modules.network.f5.bigip_command import V2Manager from ansible.modules.network.f5.bigip_command import ArgumentSpec
from ansible.modules.network.f5.bigip_command import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_config import Parameters
from ansible.modules.network.f5.bigip_config import Parameters from ansible.modules.network.f5.bigip_config import ModuleManager
from ansible.modules.network.f5.bigip_config import ModuleManager from ansible.modules.network.f5.bigip_config import ArgumentSpec
from ansible.modules.network.f5.bigip_config import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_configsync_action import Parameters
from ansible.modules.network.f5.bigip_configsync_action import Parameters from ansible.modules.network.f5.bigip_configsync_action import ModuleManager
from ansible.modules.network.f5.bigip_configsync_action import ModuleManager from ansible.modules.network.f5.bigip_configsync_action import ArgumentSpec
from ansible.modules.network.f5.bigip_configsync_action import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -33,23 +33,21 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_data_group import ModuleParameters
from ansible.modules.network.f5.bigip_data_group import ModuleParameters from ansible.modules.network.f5.bigip_data_group import ModuleManager
from ansible.modules.network.f5.bigip_data_group import ModuleManager from ansible.modules.network.f5.bigip_data_group import ExternalManager
from ansible.modules.network.f5.bigip_data_group import ExternalManager from ansible.modules.network.f5.bigip_data_group import InternalManager
from ansible.modules.network.f5.bigip_data_group import InternalManager from ansible.modules.network.f5.bigip_data_group import ArgumentSpec
from ansible.modules.network.f5.bigip_data_group import ArgumentSpec
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import F5ModuleError # Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -105,8 +103,6 @@ class TestParameters(unittest.TestCase):
assert p.partition == 'Common' assert p.partition == 'Common'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_auth import TacacsApiParameters
from ansible.modules.network.f5.bigip_sys_auth import TacacsApiParameters from ansible.modules.network.f5.bigip_device_auth import TacacsModuleParameters
from ansible.modules.network.f5.bigip_sys_auth import TacacsModuleParameters from ansible.modules.network.f5.bigip_device_auth import TacacsManager
from ansible.modules.network.f5.bigip_sys_auth import TacacsManager from ansible.modules.network.f5.bigip_device_auth import ModuleManager
from ansible.modules.network.f5.bigip_sys_auth import ModuleManager from ansible.modules.network.f5.bigip_device_auth import ArgumentSpec
from ansible.modules.network.f5.bigip_sys_auth import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -94,8 +92,6 @@ class TestParameters(unittest.TestCase):
assert p.service_name == 'ppp' assert p.service_name == 'ppp'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -32,22 +32,20 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_connectivity import ApiParameters
from ansible.modules.network.f5.bigip_device_connectivity import ApiParameters from ansible.modules.network.f5.bigip_device_connectivity import ModuleParameters
from ansible.modules.network.f5.bigip_device_connectivity import ModuleParameters from ansible.modules.network.f5.bigip_device_connectivity import ModuleManager
from ansible.modules.network.f5.bigip_device_connectivity import ModuleManager from ansible.modules.network.f5.bigip_device_connectivity import ArgumentSpec
from ansible.modules.network.f5.bigip_device_connectivity import ArgumentSpec
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import F5ModuleError # Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_dns import Parameters
from ansible.modules.network.f5.bigip_device_dns import Parameters from ansible.modules.network.f5.bigip_device_dns import ModuleManager
from ansible.modules.network.f5.bigip_device_dns import ModuleManager from ansible.modules.network.f5.bigip_device_dns import ArgumentSpec
from ansible.modules.network.f5.bigip_device_dns import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -24,9 +24,6 @@ try:
from library.modules.bigip_device_facts import ArgumentSpec from library.modules.bigip_device_facts import ArgumentSpec
from library.modules.bigip_device_facts import ModuleManager from library.modules.bigip_device_facts import ModuleManager
from f5.bigip.tm.gtm.pool import A
from f5.utils.responses.handlers import Stats
# In Ansible 2.8, Ansible changed import paths. # In Ansible 2.8, Ansible changed import paths.
from test.units.compat import unittest from test.units.compat import unittest
from test.units.compat.mock import Mock from test.units.compat.mock import Mock
@ -34,24 +31,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_facts import Parameters
from ansible.modules.network.f5.bigip_device_pool import Parameters from ansible.modules.network.f5.bigip_device_facts import VirtualAddressesFactManager
from ansible.modules.network.f5.bigip_device_pool import VirtualAddressesFactManager from ansible.modules.network.f5.bigip_device_facts import VirtualAddressesParameters
from ansible.modules.network.f5.bigip_device_pool import VirtualAddressesParameters from ansible.modules.network.f5.bigip_device_facts import ArgumentSpec
from ansible.modules.network.f5.bigip_device_pool import ArgumentSpec from ansible.modules.network.f5.bigip_device_facts import ModuleManager
from ansible.modules.network.f5.bigip_device_pool import ModuleManager
from f5.bigip.tm.gtm.pool import A # Ansible 2.8 imports
from f5.utils.responses.handlers import Stats from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -75,9 +67,9 @@ def load_fixture(name):
return data return data
class FakeVirtualAddress(A): class FakeVirtualAddress:
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
attrs = kwargs.pop('attrs', {}) attrs = kwargs.pop('params', {})
for key, value in iteritems(attrs): for key, value in iteritems(attrs):
setattr(self, key, value) setattr(self, key, value)
@ -96,6 +88,18 @@ class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):
self.spec = ArgumentSpec() self.spec = ArgumentSpec()
try:
self.p1 = patch('library.modules.bigip_device_facts.modules_provisioned')
self.m1 = self.p1.start()
self.m1.return_value = ['ltm', 'gtm', 'asm']
except Exception:
self.p1 = patch('ansible.modules.network.f5.bigip_device_facts.modules_provisioned')
self.m1 = self.p1.start()
self.m1.return_value = ['ltm', 'gtm', 'asm']
def tearDown(self):
self.p1.stop()
def test_get_trunk_facts(self, *args): def test_get_trunk_facts(self, *args):
set_module_args(dict( set_module_args(dict(
gather_subset=['virtual-addresses'], gather_subset=['virtual-addresses'],
@ -105,7 +109,7 @@ class TestManager(unittest.TestCase):
)) ))
fixture1 = load_fixture('load_ltm_virtual_address_collection_1.json') fixture1 = load_fixture('load_ltm_virtual_address_collection_1.json')
collection = [FakeVirtualAddress(attrs=x) for x in fixture1['items']] collection = fixture1['items']
module = AnsibleModule( module = AnsibleModule(
argument_spec=self.spec.argument_spec, argument_spec=self.spec.argument_spec,

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_group import ApiParameters
from ansible.modules.network.f5.bigip_device_group import ApiParameters from ansible.modules.network.f5.bigip_device_group import ModuleParameters
from ansible.modules.network.f5.bigip_device_group import ModuleParameters from ansible.modules.network.f5.bigip_device_group import ModuleManager
from ansible.modules.network.f5.bigip_device_group import ModuleManager from ansible.modules.network.f5.bigip_device_group import ArgumentSpec
from ansible.modules.network.f5.bigip_device_group import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_group_member import Parameters
from ansible.modules.network.f5.bigip_device_group_member import Parameters from ansible.modules.network.f5.bigip_device_group_member import ModuleManager
from ansible.modules.network.f5.bigip_device_group_member import ModuleManager from ansible.modules.network.f5.bigip_device_group_member import ArgumentSpec
from ansible.modules.network.f5.bigip_device_group_member import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_httpd import Parameters
from ansible.modules.network.f5.bigip_device_httpd import Parameters from ansible.modules.network.f5.bigip_device_httpd import ModuleManager
from ansible.modules.network.f5.bigip_device_httpd import ModuleManager from ansible.modules.network.f5.bigip_device_httpd import ArgumentSpec
from ansible.modules.network.f5.bigip_device_httpd import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_license import ApiParameters
from ansible.modules.network.f5.bigip_device_license import ApiParameters from ansible.modules.network.f5.bigip_device_license import ModuleParameters
from ansible.modules.network.f5.bigip_device_license import ModuleParameters from ansible.modules.network.f5.bigip_device_license import ModuleManager
from ansible.modules.network.f5.bigip_device_license import ModuleManager from ansible.modules.network.f5.bigip_device_license import ArgumentSpec
from ansible.modules.network.f5.bigip_device_license import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_ntp import Parameters
from ansible.modules.network.f5.bigip_device_ntp import Parameters from ansible.modules.network.f5.bigip_device_ntp import ModuleManager
from ansible.modules.network.f5.bigip_device_ntp import ModuleManager from ansible.modules.network.f5.bigip_device_ntp import ArgumentSpec
from ansible.modules.network.f5.bigip_device_ntp import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_sshd import ApiParameters
from ansible.modules.network.f5.bigip_device_sshd import ApiParameters from ansible.modules.network.f5.bigip_device_sshd import ModuleParameters
from ansible.modules.network.f5.bigip_device_sshd import ModuleParameters from ansible.modules.network.f5.bigip_device_sshd import ModuleManager
from ansible.modules.network.f5.bigip_device_sshd import ModuleManager from ansible.modules.network.f5.bigip_device_sshd import ArgumentSpec
from ansible.modules.network.f5.bigip_device_sshd import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_syslog import ApiParameters
from ansible.modules.network.f5.bigip_device_syslog import ApiParameters from ansible.modules.network.f5.bigip_device_syslog import ModuleParameters
from ansible.modules.network.f5.bigip_device_syslog import ModuleParameters from ansible.modules.network.f5.bigip_device_syslog import ModuleManager
from ansible.modules.network.f5.bigip_device_syslog import ModuleManager from ansible.modules.network.f5.bigip_device_syslog import ArgumentSpec
from ansible.modules.network.f5.bigip_device_syslog import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -20,7 +20,6 @@ try:
from library.modules.bigip_device_trust import Parameters from library.modules.bigip_device_trust import Parameters
from library.modules.bigip_device_trust import ModuleManager from library.modules.bigip_device_trust import ModuleManager
from library.modules.bigip_device_trust import ArgumentSpec from library.modules.bigip_device_trust import ArgumentSpec
from library.modules.bigip_device_trust import HAS_F5SDK
# In Ansible 2.8, Ansible changed import paths. # In Ansible 2.8, Ansible changed import paths.
from test.units.compat import unittest from test.units.compat import unittest
@ -29,20 +28,16 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_device_trust import Parameters
from ansible.modules.network.f5.bigip_device_trust import Parameters from ansible.modules.network.f5.bigip_device_trust import ModuleManager
from ansible.modules.network.f5.bigip_device_trust import ModuleManager from ansible.modules.network.f5.bigip_device_trust import ArgumentSpec
from ansible.modules.network.f5.bigip_device_trust import ArgumentSpec
from ansible.modules.network.f5.bigip_device_trust import HAS_F5SDK # Ansible 2.8 imports
from units.compat import unittest
# Ansible 2.8 imports from units.compat.mock import Mock
from units.compat import unittest from units.compat.mock import patch
from units.compat.mock import Mock
from units.compat.mock import patch from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_dns_nameserver import ApiParameters
from ansible.modules.network.f5.bigip_dns_nameserver import ApiParameters from ansible.modules.network.f5.bigip_dns_nameserver import ModuleParameters
from ansible.modules.network.f5.bigip_dns_nameserver import ModuleParameters from ansible.modules.network.f5.bigip_dns_nameserver import ModuleManager
from ansible.modules.network.f5.bigip_dns_nameserver import ModuleManager from ansible.modules.network.f5.bigip_dns_nameserver import ArgumentSpec
from ansible.modules.network.f5.bigip_dns_nameserver import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -95,8 +93,6 @@ class TestParameters(unittest.TestCase):
assert p.tsig_key == '/Common/key1' assert p.tsig_key == '/Common/key1'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_dns_resolver import ApiParameters
from ansible.modules.network.f5.bigip_dns_resolver import ApiParameters from ansible.modules.network.f5.bigip_dns_resolver import ModuleParameters
from ansible.modules.network.f5.bigip_dns_resolver import ModuleParameters from ansible.modules.network.f5.bigip_dns_resolver import ModuleManager
from ansible.modules.network.f5.bigip_dns_resolver import ModuleManager from ansible.modules.network.f5.bigip_dns_resolver import ArgumentSpec
from ansible.modules.network.f5.bigip_dns_resolver import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_dns_zone import ApiParameters
from ansible.modules.network.f5.bigip_dns_zone import ApiParameters from ansible.modules.network.f5.bigip_dns_zone import ModuleParameters
from ansible.modules.network.f5.bigip_dns_zone import ModuleParameters from ansible.modules.network.f5.bigip_dns_zone import ModuleManager
from ansible.modules.network.f5.bigip_dns_zone import ModuleManager from ansible.modules.network.f5.bigip_dns_zone import ArgumentSpec
from ansible.modules.network.f5.bigip_dns_zone import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_firewall_address_list import ApiParameters
from ansible.modules.network.f5.bigip_firewall_address_list import ApiParameters from ansible.modules.network.f5.bigip_firewall_address_list import ModuleParameters
from ansible.modules.network.f5.bigip_firewall_address_list import ModuleParameters from ansible.modules.network.f5.bigip_firewall_address_list import ModuleManager
from ansible.modules.network.f5.bigip_firewall_address_list import ModuleManager from ansible.modules.network.f5.bigip_firewall_address_list import ArgumentSpec
from ansible.modules.network.f5.bigip_firewall_address_list import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_firewall_dos_profile import ApiParameters
from ansible.modules.network.f5.bigip_firewall_dos_profile import ApiParameters from ansible.modules.network.f5.bigip_firewall_dos_profile import ModuleParameters
from ansible.modules.network.f5.bigip_firewall_dos_profile import ModuleParameters from ansible.modules.network.f5.bigip_firewall_dos_profile import ModuleManager
from ansible.modules.network.f5.bigip_firewall_dos_profile import ModuleManager from ansible.modules.network.f5.bigip_firewall_dos_profile import ArgumentSpec
from ansible.modules.network.f5.bigip_firewall_dos_profile import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_firewall_dos_vector import ApiParameters
from ansible.modules.network.f5.bigip_firewall_dos_vector import ApiParameters from ansible.modules.network.f5.bigip_firewall_dos_vector import ModuleParameters
from ansible.modules.network.f5.bigip_firewall_dos_vector import ModuleParameters from ansible.modules.network.f5.bigip_firewall_dos_vector import ModuleManager
from ansible.modules.network.f5.bigip_firewall_dos_vector import ModuleManager from ansible.modules.network.f5.bigip_firewall_dos_vector import ArgumentSpec
from ansible.modules.network.f5.bigip_firewall_dos_vector import ArgumentSpec from ansible.modules.network.f5.bigip_firewall_dos_vector import ProtocolDnsManager
from ansible.modules.network.f5.bigip_firewall_dos_vector import ProtocolDnsManager
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_firewall_global_rules import ApiParameters
from ansible.modules.network.f5.bigip_firewall_global_rules import ApiParameters from ansible.modules.network.f5.bigip_firewall_global_rules import ModuleParameters
from ansible.modules.network.f5.bigip_firewall_global_rules import ModuleParameters from ansible.modules.network.f5.bigip_firewall_global_rules import ModuleManager
from ansible.modules.network.f5.bigip_firewall_global_rules import ModuleManager from ansible.modules.network.f5.bigip_firewall_global_rules import ArgumentSpec
from ansible.modules.network.f5.bigip_firewall_global_rules import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_firewall_policy import ApiParameters
from ansible.modules.network.f5.bigip_firewall_policy import ApiParameters from ansible.modules.network.f5.bigip_firewall_policy import ModuleParameters
from ansible.modules.network.f5.bigip_firewall_policy import ModuleParameters from ansible.modules.network.f5.bigip_firewall_policy import ModuleManager
from ansible.modules.network.f5.bigip_firewall_policy import ModuleManager from ansible.modules.network.f5.bigip_firewall_policy import ArgumentSpec
from ansible.modules.network.f5.bigip_firewall_policy import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_firewall_port_list import ApiParameters
from ansible.modules.network.f5.bigip_firewall_port_list import ApiParameters from ansible.modules.network.f5.bigip_firewall_port_list import ModuleParameters
from ansible.modules.network.f5.bigip_firewall_port_list import ModuleParameters from ansible.modules.network.f5.bigip_firewall_port_list import ModuleManager
from ansible.modules.network.f5.bigip_firewall_port_list import ModuleManager from ansible.modules.network.f5.bigip_firewall_port_list import ArgumentSpec
from ansible.modules.network.f5.bigip_firewall_port_list import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,20 +30,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_firewall_rule import ApiParameters
from ansible.modules.network.f5.bigip_firewall_rule import ApiParameters from ansible.modules.network.f5.bigip_firewall_rule import ModuleParameters
from ansible.modules.network.f5.bigip_firewall_rule import ModuleParameters from ansible.modules.network.f5.bigip_firewall_rule import ModuleManager
from ansible.modules.network.f5.bigip_firewall_rule import ModuleManager from ansible.modules.network.f5.bigip_firewall_rule import ArgumentSpec
from ansible.modules.network.f5.bigip_firewall_rule import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_firewall_rule_list import ModuleParameters
from ansible.modules.network.f5.bigip_firewall_rule_list import ModuleParameters from ansible.modules.network.f5.bigip_firewall_rule_list import ApiParameters
from ansible.modules.network.f5.bigip_firewall_rule_list import ApiParameters from ansible.modules.network.f5.bigip_firewall_rule_list import ModuleManager
from ansible.modules.network.f5.bigip_firewall_rule_list import ModuleManager from ansible.modules.network.f5.bigip_firewall_rule_list import ArgumentSpec
from ansible.modules.network.f5.bigip_firewall_rule_list import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_gtm_datacenter import ApiParameters
from ansible.modules.network.f5.bigip_gtm_datacenter import ApiParameters from ansible.modules.network.f5.bigip_gtm_datacenter import ModuleParameters
from ansible.modules.network.f5.bigip_gtm_datacenter import ModuleParameters from ansible.modules.network.f5.bigip_gtm_datacenter import ModuleManager
from ansible.modules.network.f5.bigip_gtm_datacenter import ModuleManager from ansible.modules.network.f5.bigip_gtm_datacenter import ArgumentSpec
from ansible.modules.network.f5.bigip_gtm_datacenter import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_gtm_global import ApiParameters
from ansible.modules.network.f5.bigip_gtm_global import ApiParameters from ansible.modules.network.f5.bigip_gtm_global import ModuleParameters
from ansible.modules.network.f5.bigip_gtm_global import ModuleParameters from ansible.modules.network.f5.bigip_gtm_global import ModuleManager
from ansible.modules.network.f5.bigip_gtm_global import ModuleManager from ansible.modules.network.f5.bigip_gtm_global import ArgumentSpec
from ansible.modules.network.f5.bigip_gtm_global import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -31,22 +31,20 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_gtm_pool import ApiParameters
from ansible.modules.network.f5.bigip_gtm_pool import ApiParameters from ansible.modules.network.f5.bigip_gtm_pool import ModuleParameters
from ansible.modules.network.f5.bigip_gtm_pool import ModuleParameters from ansible.modules.network.f5.bigip_gtm_pool import ModuleManager
from ansible.modules.network.f5.bigip_gtm_pool import ModuleManager from ansible.modules.network.f5.bigip_gtm_pool import ArgumentSpec
from ansible.modules.network.f5.bigip_gtm_pool import ArgumentSpec from ansible.modules.network.f5.bigip_gtm_pool import UntypedManager
from ansible.modules.network.f5.bigip_gtm_pool import UntypedManager from ansible.modules.network.f5.bigip_gtm_pool import TypedManager
from ansible.modules.network.f5.bigip_gtm_pool import TypedManager
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_gtm_pool_member import ApiParameters
from ansible.modules.network.f5.bigip_gtm_pool_member import ApiParameters from ansible.modules.network.f5.bigip_gtm_pool_member import ModuleParameters
from ansible.modules.network.f5.bigip_gtm_pool_member import ModuleParameters from ansible.modules.network.f5.bigip_gtm_pool_member import ModuleManager
from ansible.modules.network.f5.bigip_gtm_pool_member import ModuleManager from ansible.modules.network.f5.bigip_gtm_pool_member import ArgumentSpec
from ansible.modules.network.f5.bigip_gtm_pool_member import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -31,22 +31,20 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_gtm_server import ApiParameters
from ansible.modules.network.f5.bigip_gtm_server import ApiParameters from ansible.modules.network.f5.bigip_gtm_server import ModuleParameters
from ansible.modules.network.f5.bigip_gtm_server import ModuleParameters from ansible.modules.network.f5.bigip_gtm_server import ModuleManager
from ansible.modules.network.f5.bigip_gtm_server import ModuleManager from ansible.modules.network.f5.bigip_gtm_server import V1Manager
from ansible.modules.network.f5.bigip_gtm_server import V1Manager from ansible.modules.network.f5.bigip_gtm_server import V2Manager
from ansible.modules.network.f5.bigip_gtm_server import V2Manager from ansible.modules.network.f5.bigip_gtm_server import ArgumentSpec
from ansible.modules.network.f5.bigip_gtm_server import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_gtm_virtual_server import ApiParameters
from ansible.modules.network.f5.bigip_gtm_virtual_server import ApiParameters from ansible.modules.network.f5.bigip_gtm_virtual_server import ModuleParameters
from ansible.modules.network.f5.bigip_gtm_virtual_server import ModuleParameters from ansible.modules.network.f5.bigip_gtm_virtual_server import ModuleManager
from ansible.modules.network.f5.bigip_gtm_virtual_server import ModuleManager from ansible.modules.network.f5.bigip_gtm_virtual_server import ArgumentSpec
from ansible.modules.network.f5.bigip_gtm_virtual_server import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -34,24 +34,22 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_gtm_wide_ip import ApiParameters
from ansible.modules.network.f5.bigip_gtm_wide_ip import ApiParameters from ansible.modules.network.f5.bigip_gtm_wide_ip import ModuleParameters
from ansible.modules.network.f5.bigip_gtm_wide_ip import ModuleParameters from ansible.modules.network.f5.bigip_gtm_wide_ip import ModuleManager
from ansible.modules.network.f5.bigip_gtm_wide_ip import ModuleManager from ansible.modules.network.f5.bigip_gtm_wide_ip import ArgumentSpec
from ansible.modules.network.f5.bigip_gtm_wide_ip import ArgumentSpec from ansible.modules.network.f5.bigip_gtm_wide_ip import UntypedManager
from ansible.modules.network.f5.bigip_gtm_wide_ip import UntypedManager from ansible.modules.network.f5.bigip_gtm_wide_ip import TypedManager
from ansible.modules.network.f5.bigip_gtm_wide_ip import TypedManager
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import F5ModuleError
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_hostname import ApiParameters
from ansible.modules.network.f5.bigip_hostname import ApiParameters from ansible.modules.network.f5.bigip_hostname import ModuleParameters
from ansible.modules.network.f5.bigip_hostname import ModuleParameters from ansible.modules.network.f5.bigip_hostname import ModuleManager
from ansible.modules.network.f5.bigip_hostname import ModuleManager from ansible.modules.network.f5.bigip_hostname import ArgumentSpec
from ansible.modules.network.f5.bigip_hostname import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_iapp_service import Parameters
from ansible.modules.network.f5.bigip_iapp_service import Parameters from ansible.modules.network.f5.bigip_iapp_service import ApiParameters
from ansible.modules.network.f5.bigip_iapp_service import ApiParameters from ansible.modules.network.f5.bigip_iapp_service import ModuleParameters
from ansible.modules.network.f5.bigip_iapp_service import ModuleParameters from ansible.modules.network.f5.bigip_iapp_service import ModuleManager
from ansible.modules.network.f5.bigip_iapp_service import ModuleManager from ansible.modules.network.f5.bigip_iapp_service import ArgumentSpec
from ansible.modules.network.f5.bigip_iapp_service import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_iapp_template import Parameters
from ansible.modules.network.f5.bigip_iapp_template import Parameters from ansible.modules.network.f5.bigip_iapp_template import ArgumentSpec
from ansible.modules.network.f5.bigip_iapp_template import ArgumentSpec from ansible.modules.network.f5.bigip_iapp_template import ModuleManager
from ansible.modules.network.f5.bigip_iapp_template import ModuleManager
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_iapp_template import Parameters
from ansible.modules.network.f5.bigip_iapp_template import Parameters from ansible.modules.network.f5.bigip_iapp_template import ArgumentSpec
from ansible.modules.network.f5.bigip_iapp_template import ArgumentSpec from ansible.modules.network.f5.bigip_iapp_template import ModuleManager
from ansible.modules.network.f5.bigip_iapp_template import ModuleManager
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_ike_peer import ApiParameters
from ansible.modules.network.f5.bigip_ike_peer import ApiParameters from ansible.modules.network.f5.bigip_ike_peer import ModuleParameters
from ansible.modules.network.f5.bigip_ike_peer import ModuleParameters from ansible.modules.network.f5.bigip_ike_peer import ModuleManager
from ansible.modules.network.f5.bigip_ike_peer import ModuleManager from ansible.modules.network.f5.bigip_ike_peer import ArgumentSpec
from ansible.modules.network.f5.bigip_ike_peer import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_imish_config import ApiParameters
from ansible.modules.network.f5.bigip_imish_config import ApiParameters from ansible.modules.network.f5.bigip_imish_config import ModuleParameters
from ansible.modules.network.f5.bigip_imish_config import ModuleParameters from ansible.modules.network.f5.bigip_imish_config import ModuleManager
from ansible.modules.network.f5.bigip_imish_config import ModuleManager from ansible.modules.network.f5.bigip_imish_config import ArgumentSpec
from ansible.modules.network.f5.bigip_imish_config import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -66,8 +64,6 @@ def load_fixture(name):
return data return data
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_ipsec_policy import ApiParameters
from ansible.modules.network.f5.bigip_ipsec_policy import ApiParameters from ansible.modules.network.f5.bigip_ipsec_policy import ModuleParameters
from ansible.modules.network.f5.bigip_ipsec_policy import ModuleParameters from ansible.modules.network.f5.bigip_ipsec_policy import ModuleManager
from ansible.modules.network.f5.bigip_ipsec_policy import ModuleManager from ansible.modules.network.f5.bigip_ipsec_policy import ArgumentSpec
from ansible.modules.network.f5.bigip_ipsec_policy import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -32,22 +32,20 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_irule import Parameters
from ansible.modules.network.f5.bigip_irule import Parameters from ansible.modules.network.f5.bigip_irule import ModuleManager
from ansible.modules.network.f5.bigip_irule import ModuleManager from ansible.modules.network.f5.bigip_irule import ArgumentSpec
from ansible.modules.network.f5.bigip_irule import ArgumentSpec from ansible.modules.network.f5.bigip_irule import GtmManager
from ansible.modules.network.f5.bigip_irule import GtmManager from ansible.modules.network.f5.bigip_irule import LtmManager
from ansible.modules.network.f5.bigip_irule import LtmManager
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch from units.compat.mock import mock_open
from units.compat.mock import mock_open
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -33,24 +33,22 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_log_destination import V1ApiParameters
from ansible.modules.network.f5.bigip_log_destination import V1ApiParameters from ansible.modules.network.f5.bigip_log_destination import V2ApiParameters
from ansible.modules.network.f5.bigip_log_destination import V2ApiParameters from ansible.modules.network.f5.bigip_log_destination import V1ModuleParameters
from ansible.modules.network.f5.bigip_log_destination import V1ModuleParameters from ansible.modules.network.f5.bigip_log_destination import V2ModuleParameters
from ansible.modules.network.f5.bigip_log_destination import V2ModuleParameters from ansible.modules.network.f5.bigip_log_destination import ModuleManager
from ansible.modules.network.f5.bigip_log_destination import ModuleManager from ansible.modules.network.f5.bigip_log_destination import V1Manager
from ansible.modules.network.f5.bigip_log_destination import V1Manager from ansible.modules.network.f5.bigip_log_destination import V2Manager
from ansible.modules.network.f5.bigip_log_destination import V2Manager from ansible.modules.network.f5.bigip_log_destination import ArgumentSpec
from ansible.modules.network.f5.bigip_log_destination import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_log_publisher import ApiParameters
from ansible.modules.network.f5.bigip_log_publisher import ApiParameters from ansible.modules.network.f5.bigip_log_publisher import ModuleParameters
from ansible.modules.network.f5.bigip_log_publisher import ModuleParameters from ansible.modules.network.f5.bigip_log_publisher import ModuleManager
from ansible.modules.network.f5.bigip_log_publisher import ModuleManager from ansible.modules.network.f5.bigip_log_publisher import ArgumentSpec
from ansible.modules.network.f5.bigip_log_publisher import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -96,8 +94,6 @@ class TestParameters(unittest.TestCase):
] ]
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_management_route import ApiParameters
from ansible.modules.network.f5.bigip_management_route import ApiParameters from ansible.modules.network.f5.bigip_management_route import ModuleParameters
from ansible.modules.network.f5.bigip_management_route import ModuleParameters from ansible.modules.network.f5.bigip_management_route import ModuleManager
from ansible.modules.network.f5.bigip_management_route import ModuleManager from ansible.modules.network.f5.bigip_management_route import ArgumentSpec
from ansible.modules.network.f5.bigip_management_route import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -91,8 +89,6 @@ class TestParameters(unittest.TestCase):
assert p.description == 'configured-by-dhcp' assert p.description == 'configured-by-dhcp'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_node import Parameters
from ansible.modules.network.f5.bigip_node import Parameters from ansible.modules.network.f5.bigip_node import ModuleParameters
from ansible.modules.network.f5.bigip_node import ModuleParameters from ansible.modules.network.f5.bigip_node import ApiParameters
from ansible.modules.network.f5.bigip_node import ApiParameters from ansible.modules.network.f5.bigip_node import ModuleManager
from ansible.modules.network.f5.bigip_node import ModuleManager from ansible.modules.network.f5.bigip_node import ArgumentSpec
from ansible.modules.network.f5.bigip_node import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_partition import ApiParameters
from ansible.modules.network.f5.bigip_partition import ApiParameters from ansible.modules.network.f5.bigip_partition import ModuleParameters
from ansible.modules.network.f5.bigip_partition import ModuleParameters from ansible.modules.network.f5.bigip_partition import ModuleManager
from ansible.modules.network.f5.bigip_partition import ModuleManager from ansible.modules.network.f5.bigip_partition import ArgumentSpec
from ansible.modules.network.f5.bigip_partition import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_policy import Parameters
from ansible.modules.network.f5.bigip_policy import Parameters from ansible.modules.network.f5.bigip_policy import ModuleManager
from ansible.modules.network.f5.bigip_policy import ModuleManager from ansible.modules.network.f5.bigip_policy import SimpleManager
from ansible.modules.network.f5.bigip_policy import SimpleManager from ansible.modules.network.f5.bigip_policy import ComplexManager
from ansible.modules.network.f5.bigip_policy import ComplexManager from ansible.modules.network.f5.bigip_policy import ArgumentSpec
from ansible.modules.network.f5.bigip_policy import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_policy_rule import Parameters
from ansible.modules.network.f5.bigip_policy_rule import Parameters from ansible.modules.network.f5.bigip_policy_rule import ModuleParameters
from ansible.modules.network.f5.bigip_policy_rule import ModuleParameters from ansible.modules.network.f5.bigip_policy_rule import ApiParameters
from ansible.modules.network.f5.bigip_policy_rule import ApiParameters from ansible.modules.network.f5.bigip_policy_rule import ModuleManager
from ansible.modules.network.f5.bigip_policy_rule import ModuleManager from ansible.modules.network.f5.bigip_policy_rule import ArgumentSpec
from ansible.modules.network.f5.bigip_policy_rule import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -32,22 +32,20 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_pool import ApiParameters
from ansible.modules.network.f5.bigip_pool import ApiParameters from ansible.modules.network.f5.bigip_pool import ModuleParameters
from ansible.modules.network.f5.bigip_pool import ModuleParameters from ansible.modules.network.f5.bigip_pool import ModuleManager
from ansible.modules.network.f5.bigip_pool import ModuleManager from ansible.modules.network.f5.bigip_pool import ArgumentSpec
from ansible.modules.network.f5.bigip_pool import ArgumentSpec
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import F5ModuleError # Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_pool_member import ModuleParameters
from ansible.modules.network.f5.bigip_pool_member import ModuleParameters from ansible.modules.network.f5.bigip_pool_member import ApiParameters
from ansible.modules.network.f5.bigip_pool_member import ApiParameters from ansible.modules.network.f5.bigip_pool_member import NodeApiParameters
from ansible.modules.network.f5.bigip_pool_member import NodeApiParameters from ansible.modules.network.f5.bigip_pool_member import ModuleManager
from ansible.modules.network.f5.bigip_pool_member import ModuleManager from ansible.modules.network.f5.bigip_pool_member import ArgumentSpec
from ansible.modules.network.f5.bigip_pool_member import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_client_ssl import ModuleParameters
from ansible.modules.network.f5.bigip_profile_client_ssl import ModuleParameters from ansible.modules.network.f5.bigip_profile_client_ssl import ApiParameters
from ansible.modules.network.f5.bigip_profile_client_ssl import ApiParameters from ansible.modules.network.f5.bigip_profile_client_ssl import ModuleManager
from ansible.modules.network.f5.bigip_profile_client_ssl import ModuleManager from ansible.modules.network.f5.bigip_profile_client_ssl import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_client_ssl import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,20 +30,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_dns import ApiParameters
from ansible.modules.network.f5.bigip_profile_dns import ApiParameters from ansible.modules.network.f5.bigip_profile_dns import ModuleParameters
from ansible.modules.network.f5.bigip_profile_dns import ModuleParameters from ansible.modules.network.f5.bigip_profile_dns import ModuleManager
from ansible.modules.network.f5.bigip_profile_dns import ModuleManager from ansible.modules.network.f5.bigip_profile_dns import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_dns import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_fastl4 import ApiParameters
from ansible.modules.network.f5.bigip_profile_fastl4 import ApiParameters from ansible.modules.network.f5.bigip_profile_fastl4 import ModuleParameters
from ansible.modules.network.f5.bigip_profile_fastl4 import ModuleParameters from ansible.modules.network.f5.bigip_profile_fastl4 import ModuleManager
from ansible.modules.network.f5.bigip_profile_fastl4 import ModuleManager from ansible.modules.network.f5.bigip_profile_fastl4 import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_fastl4 import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_http import ApiParameters
from ansible.modules.network.f5.bigip_profile_http import ApiParameters from ansible.modules.network.f5.bigip_profile_http import ModuleParameters
from ansible.modules.network.f5.bigip_profile_http import ModuleParameters from ansible.modules.network.f5.bigip_profile_http import ModuleManager
from ansible.modules.network.f5.bigip_profile_http import ModuleManager from ansible.modules.network.f5.bigip_profile_http import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_http import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_http2 import ApiParameters
from ansible.modules.network.f5.bigip_profile_http2 import ApiParameters from ansible.modules.network.f5.bigip_profile_http2 import ModuleParameters
from ansible.modules.network.f5.bigip_profile_http2 import ModuleParameters from ansible.modules.network.f5.bigip_profile_http2 import ModuleManager
from ansible.modules.network.f5.bigip_profile_http2 import ModuleManager from ansible.modules.network.f5.bigip_profile_http2 import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_http2 import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_http_compression import ApiParameters
from ansible.modules.network.f5.bigip_profile_http_compression import ApiParameters from ansible.modules.network.f5.bigip_profile_http_compression import ModuleParameters
from ansible.modules.network.f5.bigip_profile_http_compression import ModuleParameters from ansible.modules.network.f5.bigip_profile_http_compression import ModuleManager
from ansible.modules.network.f5.bigip_profile_http_compression import ModuleManager from ansible.modules.network.f5.bigip_profile_http_compression import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_http_compression import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -96,8 +94,6 @@ class TestParameters(unittest.TestCase):
assert p.gzip_window_size == 16 assert p.gzip_window_size == 16
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_oneconnect import ApiParameters
from ansible.modules.network.f5.bigip_profile_oneconnect import ApiParameters from ansible.modules.network.f5.bigip_profile_oneconnect import ModuleParameters
from ansible.modules.network.f5.bigip_profile_oneconnect import ModuleParameters from ansible.modules.network.f5.bigip_profile_oneconnect import ModuleManager
from ansible.modules.network.f5.bigip_profile_oneconnect import ModuleManager from ansible.modules.network.f5.bigip_profile_oneconnect import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_oneconnect import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,20 +30,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_persistence_cookie import ApiParameters
from ansible.modules.network.f5.bigip_profile_persistence_cookie import ApiParameters from ansible.modules.network.f5.bigip_profile_persistence_cookie import ModuleParameters
from ansible.modules.network.f5.bigip_profile_persistence_cookie import ModuleParameters from ansible.modules.network.f5.bigip_profile_persistence_cookie import ModuleManager
from ansible.modules.network.f5.bigip_profile_persistence_cookie import ModuleManager from ansible.modules.network.f5.bigip_profile_persistence_cookie import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_persistence_cookie import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ApiParameters
from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ApiParameters from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ModuleParameters
from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ModuleParameters from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ModuleManager
from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ModuleManager from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_server_ssl import ApiParameters
from ansible.modules.network.f5.bigip_profile_server_ssl import ApiParameters from ansible.modules.network.f5.bigip_profile_server_ssl import ModuleParameters
from ansible.modules.network.f5.bigip_profile_server_ssl import ModuleParameters from ansible.modules.network.f5.bigip_profile_server_ssl import ModuleManager
from ansible.modules.network.f5.bigip_profile_server_ssl import ModuleManager from ansible.modules.network.f5.bigip_profile_server_ssl import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_server_ssl import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_tcp import ApiParameters
from ansible.modules.network.f5.bigip_profile_tcp import ApiParameters from ansible.modules.network.f5.bigip_profile_tcp import ModuleParameters
from ansible.modules.network.f5.bigip_profile_tcp import ModuleParameters from ansible.modules.network.f5.bigip_profile_tcp import ModuleManager
from ansible.modules.network.f5.bigip_profile_tcp import ModuleManager from ansible.modules.network.f5.bigip_profile_tcp import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_tcp import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_profile_udp import ApiParameters
from ansible.modules.network.f5.bigip_profile_udp import ApiParameters from ansible.modules.network.f5.bigip_profile_udp import ModuleParameters
from ansible.modules.network.f5.bigip_profile_udp import ModuleParameters from ansible.modules.network.f5.bigip_profile_udp import ModuleManager
from ansible.modules.network.f5.bigip_profile_udp import ModuleManager from ansible.modules.network.f5.bigip_profile_udp import ArgumentSpec
from ansible.modules.network.f5.bigip_profile_udp import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_provision import Parameters
from ansible.modules.network.f5.bigip_provision import Parameters from ansible.modules.network.f5.bigip_provision import ModuleManager
from ansible.modules.network.f5.bigip_provision import ModuleManager from ansible.modules.network.f5.bigip_provision import ArgumentSpec
from ansible.modules.network.f5.bigip_provision import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_qkview import Parameters
from ansible.modules.network.f5.bigip_qkview import Parameters from ansible.modules.network.f5.bigip_qkview import ModuleManager
from ansible.modules.network.f5.bigip_qkview import ModuleManager from ansible.modules.network.f5.bigip_qkview import MadmLocationManager
from ansible.modules.network.f5.bigip_qkview import MadmLocationManager from ansible.modules.network.f5.bigip_qkview import BulkLocationManager
from ansible.modules.network.f5.bigip_qkview import BulkLocationManager from ansible.modules.network.f5.bigip_qkview import ArgumentSpec
from ansible.modules.network.f5.bigip_qkview import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -8,16 +8,12 @@ __metaclass__ = type
import os import os
import json import json
import pytest
import sys import sys
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
if sys.version_info < (2, 7): if sys.version_info < (2, 7):
raise SkipTest("F5 Ansible modules require Python >= 2.7") raise SkipTest("F5 Ansible modules require Python >= 2.7")
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
try: try:
@ -25,20 +21,26 @@ try:
from library.modules.bigip_remote_role import ModuleParameters from library.modules.bigip_remote_role import ModuleParameters
from library.modules.bigip_remote_role import ModuleManager from library.modules.bigip_remote_role import ModuleManager
from library.modules.bigip_remote_role import ArgumentSpec from library.modules.bigip_remote_role import ArgumentSpec
from library.module_utils.network.f5.common import F5ModuleError
from library.module_utils.network.f5.common import iControlUnexpectedHTTPError # In Ansible 2.8, Ansible changed import paths.
from test.unit.modules.utils import set_module_args from test.units.compat import unittest
from test.units.compat.mock import Mock
from test.units.compat.mock import patch
from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_remote_role import ApiParameters
from ansible.modules.network.f5.bigip_remote_role import ApiParameters from ansible.modules.network.f5.bigip_remote_role import ModuleParameters
from ansible.modules.network.f5.bigip_remote_role import ModuleParameters from ansible.modules.network.f5.bigip_remote_role import ModuleManager
from ansible.modules.network.f5.bigip_remote_role import ModuleManager from ansible.modules.network.f5.bigip_remote_role import ArgumentSpec
from ansible.modules.network.f5.bigip_remote_role import ArgumentSpec
from ansible.module_utils.network.f5.common import F5ModuleError # Ansible 2.8 imports
from ansible.module_utils.network.f5.common import iControlUnexpectedHTTPError from units.compat import unittest
from units.modules.utils import set_module_args from units.compat.mock import Mock
except ImportError: from units.compat.mock import patch
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
from units.modules.utils import set_module_args
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_routedomain import ApiParameters
from ansible.modules.network.f5.bigip_routedomain import ApiParameters from ansible.modules.network.f5.bigip_routedomain import ModuleParameters
from ansible.modules.network.f5.bigip_routedomain import ModuleParameters from ansible.modules.network.f5.bigip_routedomain import ModuleManager
from ansible.modules.network.f5.bigip_routedomain import ModuleManager from ansible.modules.network.f5.bigip_routedomain import ArgumentSpec
from ansible.modules.network.f5.bigip_routedomain import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -32,22 +32,20 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_selfip import ApiParameters
from ansible.modules.network.f5.bigip_selfip import ApiParameters from ansible.modules.network.f5.bigip_selfip import ModuleParameters
from ansible.modules.network.f5.bigip_selfip import ModuleParameters from ansible.modules.network.f5.bigip_selfip import ModuleManager
from ansible.modules.network.f5.bigip_selfip import ModuleManager from ansible.modules.network.f5.bigip_selfip import ArgumentSpec
from ansible.modules.network.f5.bigip_selfip import ArgumentSpec
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import F5ModuleError # Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_service_policy import ApiParameters
from ansible.modules.network.f5.bigip_service_policy import ApiParameters from ansible.modules.network.f5.bigip_service_policy import ModuleParameters
from ansible.modules.network.f5.bigip_service_policy import ModuleParameters from ansible.modules.network.f5.bigip_service_policy import ModuleManager
from ansible.modules.network.f5.bigip_service_policy import ModuleManager from ansible.modules.network.f5.bigip_service_policy import ArgumentSpec
from ansible.modules.network.f5.bigip_service_policy import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -90,8 +88,6 @@ class TestParameters(unittest.TestCase):
assert p.port_misuse_policy == '/Common/bar' assert p.port_misuse_policy == '/Common/bar'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_smtp import ApiParameters
from ansible.modules.network.f5.bigip_smtp import ApiParameters from ansible.modules.network.f5.bigip_smtp import ModuleParameters
from ansible.modules.network.f5.bigip_smtp import ModuleParameters from ansible.modules.network.f5.bigip_smtp import ModuleManager
from ansible.modules.network.f5.bigip_smtp import ModuleManager from ansible.modules.network.f5.bigip_smtp import ArgumentSpec
from ansible.modules.network.f5.bigip_smtp import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -108,8 +106,6 @@ class TestParameters(unittest.TestCase):
assert p.authentication_enabled is True assert p.authentication_enabled is True
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_snat_pool import ModuleParameters
from ansible.modules.network.f5.bigip_snat_pool import ModuleParameters from ansible.modules.network.f5.bigip_snat_pool import ApiParameters
from ansible.modules.network.f5.bigip_snat_pool import ApiParameters from ansible.modules.network.f5.bigip_snat_pool import ModuleManager
from ansible.modules.network.f5.bigip_snat_pool import ModuleManager from ansible.modules.network.f5.bigip_snat_pool import ArgumentSpec
from ansible.modules.network.f5.bigip_snat_pool import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_snmp import ApiParameters
from ansible.modules.network.f5.bigip_snmp import ApiParameters from ansible.modules.network.f5.bigip_snmp import ModuleParameters
from ansible.modules.network.f5.bigip_snmp import ModuleParameters from ansible.modules.network.f5.bigip_snmp import ModuleManager
from ansible.modules.network.f5.bigip_snmp import ModuleManager from ansible.modules.network.f5.bigip_snmp import ArgumentSpec
from ansible.modules.network.f5.bigip_snmp import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -34,24 +34,22 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_snmp_community import ApiParameters
from ansible.modules.network.f5.bigip_snmp_community import ApiParameters from ansible.modules.network.f5.bigip_snmp_community import ModuleParameters
from ansible.modules.network.f5.bigip_snmp_community import ModuleParameters from ansible.modules.network.f5.bigip_snmp_community import ModuleManager
from ansible.modules.network.f5.bigip_snmp_community import ModuleManager from ansible.modules.network.f5.bigip_snmp_community import V1Manager
from ansible.modules.network.f5.bigip_snmp_community import V1Manager from ansible.modules.network.f5.bigip_snmp_community import V2Manager
from ansible.modules.network.f5.bigip_snmp_community import V2Manager from ansible.modules.network.f5.bigip_snmp_community import ArgumentSpec
from ansible.modules.network.f5.bigip_snmp_community import ArgumentSpec
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import F5ModuleError # Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -157,8 +155,6 @@ class TestParameters(unittest.TestCase):
assert p.snmp_username == 'foo' assert p.snmp_username == 'foo'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -32,23 +32,21 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_snmp_trap import V2Parameters
from ansible.modules.network.f5.bigip_snmp_trap import V2Parameters from ansible.modules.network.f5.bigip_snmp_trap import V1Parameters
from ansible.modules.network.f5.bigip_snmp_trap import V1Parameters from ansible.modules.network.f5.bigip_snmp_trap import ModuleManager
from ansible.modules.network.f5.bigip_snmp_trap import ModuleManager from ansible.modules.network.f5.bigip_snmp_trap import V2Manager
from ansible.modules.network.f5.bigip_snmp_trap import V2Manager from ansible.modules.network.f5.bigip_snmp_trap import V1Manager
from ansible.modules.network.f5.bigip_snmp_trap import V1Manager from ansible.modules.network.f5.bigip_snmp_trap import ArgumentSpec
from ansible.modules.network.f5.bigip_snmp_trap import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch from units.compat.mock import DEFAULT
from units.compat.mock import DEFAULT
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_software_image import ApiParameters
from ansible.modules.network.f5.bigip_software_image import ApiParameters from ansible.modules.network.f5.bigip_software_image import ModuleParameters
from ansible.modules.network.f5.bigip_software_image import ModuleParameters from ansible.modules.network.f5.bigip_software_image import ModuleManager
from ansible.modules.network.f5.bigip_software_image import ModuleManager from ansible.modules.network.f5.bigip_software_image import ArgumentSpec
from ansible.modules.network.f5.bigip_software_image import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -94,8 +92,6 @@ class TestParameters(unittest.TestCase):
assert p.version == '13.1.0.8' assert p.version == '13.1.0.8'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_software_install import ApiParameters
from ansible.modules.network.f5.bigip_software_install import ApiParameters from ansible.modules.network.f5.bigip_software_install import ModuleParameters
from ansible.modules.network.f5.bigip_software_install import ModuleParameters from ansible.modules.network.f5.bigip_software_install import ModuleManager
from ansible.modules.network.f5.bigip_software_install import ModuleManager from ansible.modules.network.f5.bigip_software_install import ArgumentSpec
from ansible.modules.network.f5.bigip_software_install import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -78,8 +76,6 @@ class TestParameters(unittest.TestCase):
assert p.image == 'BIGIP-13.0.0.0.0.1645.iso' assert p.image == 'BIGIP-13.0.0.0.0.1645.iso'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_software_update import ApiParameters
from ansible.modules.network.f5.bigip_software_update import ApiParameters from ansible.modules.network.f5.bigip_software_update import ModuleParameters
from ansible.modules.network.f5.bigip_software_update import ModuleParameters from ansible.modules.network.f5.bigip_software_update import ModuleManager
from ansible.modules.network.f5.bigip_software_update import ModuleManager from ansible.modules.network.f5.bigip_software_update import ArgumentSpec
from ansible.modules.network.f5.bigip_software_update import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_ssl_certificate import ArgumentSpec
from ansible.modules.network.f5.bigip_ssl_certificate import ArgumentSpec from ansible.modules.network.f5.bigip_ssl_certificate import ApiParameters
from ansible.modules.network.f5.bigip_ssl_certificate import ApiParameters from ansible.modules.network.f5.bigip_ssl_certificate import ModuleParameters
from ansible.modules.network.f5.bigip_ssl_certificate import ModuleParameters from ansible.modules.network.f5.bigip_ssl_certificate import ModuleManager
from ansible.modules.network.f5.bigip_ssl_certificate import ModuleManager
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_ssl_key import ArgumentSpec
from ansible.modules.network.f5.bigip_ssl_key import ArgumentSpec from ansible.modules.network.f5.bigip_ssl_key import ModuleParameters
from ansible.modules.network.f5.bigip_ssl_key import ModuleParameters from ansible.modules.network.f5.bigip_ssl_key import ModuleManager
from ansible.modules.network.f5.bigip_ssl_key import ModuleManager
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_ssl_ocsp import ApiParameters
from ansible.modules.network.f5.bigip_ssl_ocsp import ApiParameters from ansible.modules.network.f5.bigip_ssl_ocsp import ModuleParameters
from ansible.modules.network.f5.bigip_ssl_ocsp import ModuleParameters from ansible.modules.network.f5.bigip_ssl_ocsp import ModuleManager
from ansible.modules.network.f5.bigip_ssl_ocsp import ModuleManager from ansible.modules.network.f5.bigip_ssl_ocsp import ArgumentSpec
from ansible.modules.network.f5.bigip_ssl_ocsp import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_static_route import ApiParameters
from ansible.modules.network.f5.bigip_static_route import ApiParameters from ansible.modules.network.f5.bigip_static_route import ModuleParameters
from ansible.modules.network.f5.bigip_static_route import ModuleParameters from ansible.modules.network.f5.bigip_static_route import ModuleManager
from ansible.modules.network.f5.bigip_static_route import ModuleManager from ansible.modules.network.f5.bigip_static_route import ArgumentSpec
from ansible.modules.network.f5.bigip_static_route import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,20 +30,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ApiParameters
from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ApiParameters from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ModuleParameters
from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ModuleParameters from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ModuleManager
from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ModuleManager from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ArgumentSpec
from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_sys_db import Parameters
from ansible.modules.network.f5.bigip_sys_db import Parameters from ansible.modules.network.f5.bigip_sys_db import ModuleManager
from ansible.modules.network.f5.bigip_sys_db import ModuleManager from ansible.modules.network.f5.bigip_sys_db import ArgumentSpec
from ansible.modules.network.f5.bigip_sys_db import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_sys_global import ApiParameters
from ansible.modules.network.f5.bigip_sys_global import ApiParameters from ansible.modules.network.f5.bigip_sys_global import ModuleParameters
from ansible.modules.network.f5.bigip_sys_global import ModuleParameters from ansible.modules.network.f5.bigip_sys_global import ModuleManager
from ansible.modules.network.f5.bigip_sys_global import ModuleManager from ansible.modules.network.f5.bigip_sys_global import ArgumentSpec
from ansible.modules.network.f5.bigip_sys_global import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_timer_policy import ApiParameters
from ansible.modules.network.f5.bigip_timer_policy import ApiParameters from ansible.modules.network.f5.bigip_timer_policy import ModuleParameters
from ansible.modules.network.f5.bigip_timer_policy import ModuleParameters from ansible.modules.network.f5.bigip_timer_policy import ModuleManager
from ansible.modules.network.f5.bigip_timer_policy import ModuleManager from ansible.modules.network.f5.bigip_timer_policy import ArgumentSpec
from ansible.modules.network.f5.bigip_timer_policy import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -85,8 +83,6 @@ class TestParameters(unittest.TestCase):
assert p.description == 'my description' assert p.description == 'my description'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_traffic_group import ApiParameters
from ansible.modules.network.f5.bigip_traffic_group import ApiParameters from ansible.modules.network.f5.bigip_traffic_group import ModuleParameters
from ansible.modules.network.f5.bigip_traffic_group import ModuleParameters from ansible.modules.network.f5.bigip_traffic_group import ModuleManager
from ansible.modules.network.f5.bigip_traffic_group import ModuleManager from ansible.modules.network.f5.bigip_traffic_group import ArgumentSpec
from ansible.modules.network.f5.bigip_traffic_group import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_traffic_selector import ApiParameters
from ansible.modules.network.f5.bigip_traffic_selector import ApiParameters from ansible.modules.network.f5.bigip_traffic_selector import ModuleParameters
from ansible.modules.network.f5.bigip_traffic_selector import ModuleParameters from ansible.modules.network.f5.bigip_traffic_selector import ModuleManager
from ansible.modules.network.f5.bigip_traffic_selector import ModuleManager from ansible.modules.network.f5.bigip_traffic_selector import ArgumentSpec
from ansible.modules.network.f5.bigip_traffic_selector import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,20 +30,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_trunk import ApiParameters
from ansible.modules.network.f5.bigip_trunk import ApiParameters from ansible.modules.network.f5.bigip_trunk import ModuleParameters
from ansible.modules.network.f5.bigip_trunk import ModuleParameters from ansible.modules.network.f5.bigip_trunk import ModuleManager
from ansible.modules.network.f5.bigip_trunk import ModuleManager from ansible.modules.network.f5.bigip_trunk import ArgumentSpec
from ansible.modules.network.f5.bigip_trunk import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -103,8 +101,6 @@ class TestParameters(unittest.TestCase):
assert p.link_selection_policy == 'maximum-bandwidth' assert p.link_selection_policy == 'maximum-bandwidth'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_tunnel import ApiParameters
from ansible.modules.network.f5.bigip_tunnel import ApiParameters from ansible.modules.network.f5.bigip_tunnel import ModuleParameters
from ansible.modules.network.f5.bigip_tunnel import ModuleParameters from ansible.modules.network.f5.bigip_tunnel import ModuleManager
from ansible.modules.network.f5.bigip_tunnel import ModuleManager from ansible.modules.network.f5.bigip_tunnel import ArgumentSpec
from ansible.modules.network.f5.bigip_tunnel import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
# Ansible 2.8 imports from units.modules.utils import set_module_args
from units.compat import unittest
from units.compat.mock import Mock
from units.compat.mock import patch
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}
@ -84,8 +82,6 @@ class TestParameters(unittest.TestCase):
assert p.name == 'tunnel1' assert p.name == 'tunnel1'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):

@ -33,23 +33,21 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_ucs import ModuleParameters
from ansible.modules.network.f5.bigip_ucs import ModuleParameters from ansible.modules.network.f5.bigip_ucs import ModuleManager
from ansible.modules.network.f5.bigip_ucs import ModuleManager from ansible.modules.network.f5.bigip_ucs import ArgumentSpec
from ansible.modules.network.f5.bigip_ucs import ArgumentSpec from ansible.modules.network.f5.bigip_ucs import V1Manager
from ansible.modules.network.f5.bigip_ucs import V1Manager from ansible.modules.network.f5.bigip_ucs import V2Manager
from ansible.modules.network.f5.bigip_ucs import V2Manager
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import F5ModuleError
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -30,21 +30,19 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_ucs_fetch import Parameters
from ansible.modules.network.f5.bigip_ucs_fetch import Parameters from ansible.modules.network.f5.bigip_ucs_fetch import ModuleManager
from ansible.modules.network.f5.bigip_ucs_fetch import ModuleManager from ansible.modules.network.f5.bigip_ucs_fetch import V1Manager
from ansible.modules.network.f5.bigip_ucs_fetch import V1Manager from ansible.modules.network.f5.bigip_ucs_fetch import V2Manager
from ansible.modules.network.f5.bigip_ucs_fetch import V2Manager from ansible.modules.network.f5.bigip_ucs_fetch import ArgumentSpec
from ansible.modules.network.f5.bigip_ucs_fetch import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -33,23 +33,21 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_user import Parameters
from ansible.modules.network.f5.bigip_user import Parameters from ansible.modules.network.f5.bigip_user import ModuleManager
from ansible.modules.network.f5.bigip_user import ModuleManager from ansible.modules.network.f5.bigip_user import ArgumentSpec
from ansible.modules.network.f5.bigip_user import ArgumentSpec from ansible.modules.network.f5.bigip_user import UnpartitionedManager
from ansible.modules.network.f5.bigip_user import UnpartitionedManager from ansible.modules.network.f5.bigip_user import PartitionedManager
from ansible.modules.network.f5.bigip_user import PartitionedManager
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import F5ModuleError
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_vcmp_guest import ModuleParameters
from ansible.modules.network.f5.bigip_vcmp_guest import ModuleParameters from ansible.modules.network.f5.bigip_vcmp_guest import ApiParameters
from ansible.modules.network.f5.bigip_vcmp_guest import ApiParameters from ansible.modules.network.f5.bigip_vcmp_guest import ModuleManager
from ansible.modules.network.f5.bigip_vcmp_guest import ModuleManager from ansible.modules.network.f5.bigip_vcmp_guest import ArgumentSpec
from ansible.modules.network.f5.bigip_vcmp_guest import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_virtual_address import ApiParameters
from ansible.modules.network.f5.bigip_virtual_address import ApiParameters from ansible.modules.network.f5.bigip_virtual_address import ModuleParameters
from ansible.modules.network.f5.bigip_virtual_address import ModuleParameters from ansible.modules.network.f5.bigip_virtual_address import ModuleManager
from ansible.modules.network.f5.bigip_virtual_address import ModuleManager from ansible.modules.network.f5.bigip_virtual_address import ArgumentSpec
from ansible.modules.network.f5.bigip_virtual_address import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -29,20 +29,18 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_vlan import ApiParameters
from ansible.modules.network.f5.bigip_vlan import ApiParameters from ansible.modules.network.f5.bigip_vlan import ModuleParameters
from ansible.modules.network.f5.bigip_vlan import ModuleParameters from ansible.modules.network.f5.bigip_vlan import ModuleManager
from ansible.modules.network.f5.bigip_vlan import ModuleManager from ansible.modules.network.f5.bigip_vlan import ArgumentSpec
from ansible.modules.network.f5.bigip_vlan import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -28,19 +28,17 @@ try:
from test.units.modules.utils import set_module_args from test.units.modules.utils import set_module_args
except ImportError: except ImportError:
try: from ansible.modules.network.f5.bigip_wait import Parameters
from ansible.modules.network.f5.bigip_wait import Parameters from ansible.modules.network.f5.bigip_wait import ModuleManager
from ansible.modules.network.f5.bigip_wait import ModuleManager from ansible.modules.network.f5.bigip_wait import ArgumentSpec
from ansible.modules.network.f5.bigip_wait import ArgumentSpec
# Ansible 2.8 imports
# Ansible 2.8 imports from units.compat import unittest
from units.compat import unittest from units.compat.mock import Mock
from units.compat.mock import Mock from units.compat.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from units.modules.utils import set_module_args
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save