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

This commit is contained in:
Tim Rupp 2018-11-19 19:02:02 -08:00 committed by GitHub
parent e62edfc796
commit e7d1c0fb77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
112 changed files with 1263 additions and 1457 deletions

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -80,10 +78,7 @@ class TestParameters(unittest.TestCase):
assert p.targets == ['T1', 'T2']
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):
self.spec = ArgumentSpec()

View file

@ -34,7 +34,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -50,8 +49,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 V1Manager
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -33,7 +33,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ExternalManager
@ -48,8 +47,7 @@ except ImportError:
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_data = {}
@ -105,8 +103,6 @@ class TestParameters(unittest.TestCase):
assert p.partition == 'Common'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -30,12 +30,11 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
from ansible.modules.network.f5.bigip_sys_auth import TacacsApiParameters
from ansible.modules.network.f5.bigip_sys_auth import TacacsModuleParameters
from ansible.modules.network.f5.bigip_sys_auth import TacacsManager
from ansible.modules.network.f5.bigip_sys_auth import ModuleManager
from ansible.modules.network.f5.bigip_sys_auth import ArgumentSpec
from ansible.modules.network.f5.bigip_device_auth import TacacsApiParameters
from ansible.modules.network.f5.bigip_device_auth import TacacsModuleParameters
from ansible.modules.network.f5.bigip_device_auth import TacacsManager
from ansible.modules.network.f5.bigip_device_auth import ModuleManager
from ansible.modules.network.f5.bigip_device_auth import ArgumentSpec
# Ansible 2.8 imports
from units.compat import unittest
@ -43,8 +42,7 @@ except ImportError:
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_data = {}
@ -94,8 +92,6 @@ class TestParameters(unittest.TestCase):
assert p.service_name == 'ppp'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -32,7 +32,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -46,8 +45,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -24,9 +24,6 @@ try:
from library.modules.bigip_device_facts import ArgumentSpec
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.
from test.units.compat import unittest
from test.units.compat.mock import Mock
@ -34,15 +31,11 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
from ansible.modules.network.f5.bigip_device_pool import Parameters
from ansible.modules.network.f5.bigip_device_pool import VirtualAddressesFactManager
from ansible.modules.network.f5.bigip_device_pool import VirtualAddressesParameters
from ansible.modules.network.f5.bigip_device_pool import ArgumentSpec
from ansible.modules.network.f5.bigip_device_pool import ModuleManager
from f5.bigip.tm.gtm.pool import A
from f5.utils.responses.handlers import Stats
from ansible.modules.network.f5.bigip_device_facts import Parameters
from ansible.modules.network.f5.bigip_device_facts import VirtualAddressesFactManager
from ansible.modules.network.f5.bigip_device_facts import VirtualAddressesParameters
from ansible.modules.network.f5.bigip_device_facts import ArgumentSpec
from ansible.modules.network.f5.bigip_device_facts import ModuleManager
# Ansible 2.8 imports
from units.compat import unittest
@ -50,8 +43,7 @@ except ImportError:
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_data = {}
@ -75,9 +67,9 @@ def load_fixture(name):
return data
class FakeVirtualAddress(A):
class FakeVirtualAddress:
def __init__(self, *args, **kwargs):
attrs = kwargs.pop('attrs', {})
attrs = kwargs.pop('params', {})
for key, value in iteritems(attrs):
setattr(self, key, value)
@ -96,6 +88,18 @@ class TestManager(unittest.TestCase):
def setUp(self):
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):
set_module_args(dict(
gather_subset=['virtual-addresses'],
@ -105,7 +109,7 @@ class TestManager(unittest.TestCase):
))
fixture1 = load_fixture('load_ltm_virtual_address_collection_1.json')
collection = [FakeVirtualAddress(attrs=x) for x in fixture1['items']]
collection = fixture1['items']
module = AnsibleModule(
argument_spec=self.spec.argument_spec,

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -20,7 +20,6 @@ try:
from library.modules.bigip_device_trust import Parameters
from library.modules.bigip_device_trust import ModuleManager
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.
from test.units.compat import unittest
@ -29,11 +28,9 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
from ansible.modules.network.f5.bigip_device_trust import HAS_F5SDK
# Ansible 2.8 imports
from units.compat import unittest
@ -41,8 +38,6 @@ except ImportError:
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')

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -95,8 +93,6 @@ class TestParameters(unittest.TestCase):
assert p.tsig_key == '/Common/key1'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -42,8 +41,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -31,7 +31,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -45,8 +44,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -31,7 +31,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -45,8 +44,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -34,7 +34,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -50,8 +49,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleParameters
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -66,8 +64,6 @@ def load_fixture(name):
return data
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -32,7 +32,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -46,8 +45,7 @@ except ImportError:
from units.compat.mock import mock_open
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_data = {}

View file

@ -33,7 +33,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 V1ModuleParameters
@ -49,8 +48,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_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):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -91,8 +89,6 @@ class TestParameters(unittest.TestCase):
assert p.description == 'configured-by-dhcp'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ApiParameters
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 SimpleManager
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ApiParameters
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -32,7 +32,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -46,8 +45,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 NodeApiParameters
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -42,8 +41,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -96,8 +94,6 @@ class TestParameters(unittest.TestCase):
assert p.gzip_window_size == 16
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -42,8 +41,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
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 ModuleParameters
from ansible.modules.network.f5.bigip_profile_persistence_src_addr import ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 MadmLocationManager
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -8,16 +8,12 @@ __metaclass__ = type
import os
import json
import pytest
import sys
from nose.plugins.skip import SkipTest
if sys.version_info < (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
try:
@ -25,20 +21,26 @@ try:
from library.modules.bigip_remote_role import ModuleParameters
from library.modules.bigip_remote_role import ModuleManager
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
from test.unit.modules.utils import set_module_args
# In Ansible 2.8, Ansible changed import paths.
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:
try:
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 ModuleManager
from ansible.modules.network.f5.bigip_remote_role import ArgumentSpec
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import iControlUnexpectedHTTPError
# Ansible 2.8 imports
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -32,7 +32,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -46,8 +45,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -90,8 +88,6 @@ class TestParameters(unittest.TestCase):
assert p.port_misuse_policy == '/Common/bar'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -108,8 +106,6 @@ class TestParameters(unittest.TestCase):
assert p.authentication_enabled is True
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -34,7 +34,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -50,8 +49,7 @@ except ImportError:
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_data = {}
@ -157,8 +155,6 @@ class TestParameters(unittest.TestCase):
assert p.snmp_username == 'foo'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -32,7 +32,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -47,8 +46,7 @@ except ImportError:
from units.compat.mock import DEFAULT
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -94,8 +92,6 @@ class TestParameters(unittest.TestCase):
assert p.version == '13.1.0.8'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -78,8 +76,6 @@ class TestParameters(unittest.TestCase):
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):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleParameters
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
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 ModuleParameters
from ansible.modules.network.f5.bigip_sys_daemon_log_tmm import ModuleManager
@ -42,8 +41,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -85,8 +83,6 @@ class TestParameters(unittest.TestCase):
assert p.description == 'my description'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -42,8 +41,7 @@ except ImportError:
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_data = {}
@ -103,8 +101,6 @@ class TestParameters(unittest.TestCase):
assert p.link_selection_policy == 'maximum-bandwidth'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}
@ -84,8 +82,6 @@ class TestParameters(unittest.TestCase):
assert p.name == 'tunnel1'
@patch('ansible.module_utils.f5_utils.AnsibleF5Client._get_mgmt_root',
return_value=True)
class TestManager(unittest.TestCase):
def setUp(self):

View file

@ -33,7 +33,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -48,8 +47,7 @@ except ImportError:
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_data = {}

View file

@ -30,7 +30,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 V1Manager
@ -43,8 +42,7 @@ except ImportError:
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_data = {}

View file

@ -33,7 +33,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -48,8 +47,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -29,7 +29,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ModuleManager
@ -41,8 +40,7 @@ except ImportError:
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_data = {}

View file

@ -28,7 +28,6 @@ try:
from test.units.modules.utils import set_module_args
except ImportError:
try:
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 ArgumentSpec
@ -39,8 +38,7 @@ except ImportError:
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_data = {}

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