bigip tests now skipped if missing lib

pull/25283/head
Brian Coca 8 years ago
parent e86b00b917
commit 745f72916f

@ -40,9 +40,14 @@ try:
from library.bigip_command import ModuleManager from library.bigip_command import ModuleManager
from library.bigip_command import ArgumentSpec from library.bigip_command import ArgumentSpec
except ImportError: except ImportError:
from ansible.modules.network.f5.bigip_command import Parameters try:
from ansible.modules.network.f5.bigip_command import ModuleManager from ansible.modules.network.f5.bigip_command import Parameters
from ansible.modules.network.f5.bigip_command import ArgumentSpec from ansible.modules.network.f5.bigip_command import ModuleManager
from ansible.modules.network.f5.bigip_command import ArgumentSpec
except ImportError:
from nose.plugins.skip import SkipTest
raise SkipTest("%s requires the python modules for f5/bigip" % __file__)
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')

@ -40,9 +40,13 @@ try:
from library.bigip_config import ModuleManager from library.bigip_config import ModuleManager
from library.bigip_config import ArgumentSpec from library.bigip_config import ArgumentSpec
except ImportError: except ImportError:
from ansible.modules.network.f5.bigip_config import Parameters try:
from ansible.modules.network.f5.bigip_config import ModuleManager from ansible.modules.network.f5.bigip_config import Parameters
from ansible.modules.network.f5.bigip_config import ArgumentSpec from ansible.modules.network.f5.bigip_config import ModuleManager
from ansible.modules.network.f5.bigip_config import ArgumentSpec
except ImportError:
from nose.plugins.skip import SkipTest
raise SkipTest("%s requires the python modules for f5/bigip" % __file__)
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')

@ -42,11 +42,16 @@ try:
from library.bigip_gtm_pool import UntypedManager from library.bigip_gtm_pool import UntypedManager
from library.bigip_gtm_pool import TypedManager from library.bigip_gtm_pool import TypedManager
except ImportError: except ImportError:
from ansible.modules.network.f5.bigip_gtm_pool import Parameters try:
from ansible.modules.network.f5.bigip_gtm_pool import ModuleManager from ansible.modules.network.f5.bigip_gtm_pool import Parameters
from ansible.modules.network.f5.bigip_gtm_pool import ArgumentSpec from ansible.modules.network.f5.bigip_gtm_pool import ModuleManager
from ansible.modules.network.f5.bigip_gtm_pool import UntypedManager from ansible.modules.network.f5.bigip_gtm_pool import ArgumentSpec
from ansible.modules.network.f5.bigip_gtm_pool import TypedManager from ansible.modules.network.f5.bigip_gtm_pool import UntypedManager
from ansible.modules.network.f5.bigip_gtm_pool import TypedManager
except ImportError:
from nose.plugins.skip import SkipTest
raise SkipTest("%s requires the python modules for f5/bigip" % __file__)
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -42,9 +42,14 @@ try:
from library.bigip_pool import ModuleManager from library.bigip_pool import ModuleManager
from library.bigip_pool import ArgumentSpec from library.bigip_pool import ArgumentSpec
except ImportError: except ImportError:
from ansible.modules.network.f5.bigip_pool import Parameters try:
from ansible.modules.network.f5.bigip_pool import ModuleManager from ansible.modules.network.f5.bigip_pool import Parameters
from ansible.modules.network.f5.bigip_pool import ArgumentSpec from ansible.modules.network.f5.bigip_pool import ModuleManager
from ansible.modules.network.f5.bigip_pool import ArgumentSpec
except ImportError:
from nose.plugins.skip import SkipTest
raise SkipTest("%s requires the python modules for f5/bigip" % __file__)
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -43,12 +43,17 @@ try:
from library.bigip_snmp_trap import NonNetworkedManager from library.bigip_snmp_trap import NonNetworkedManager
from library.bigip_snmp_trap import ArgumentSpec from library.bigip_snmp_trap import ArgumentSpec
except ImportError: except ImportError:
from ansible.modules.network.f5.bigip_snmp_trap import NetworkedParameters try:
from ansible.modules.network.f5.bigip_snmp_trap import NonNetworkedParameters from ansible.modules.network.f5.bigip_snmp_trap import NetworkedParameters
from ansible.modules.network.f5.bigip_snmp_trap import ModuleManager from ansible.modules.network.f5.bigip_snmp_trap import NonNetworkedParameters
from ansible.modules.network.f5.bigip_snmp_trap import NetworkedManager from ansible.modules.network.f5.bigip_snmp_trap import ModuleManager
from ansible.modules.network.f5.bigip_snmp_trap import NonNetworkedManager from ansible.modules.network.f5.bigip_snmp_trap import NetworkedManager
from ansible.modules.network.f5.bigip_snmp_trap import ArgumentSpec from ansible.modules.network.f5.bigip_snmp_trap import NonNetworkedManager
from ansible.modules.network.f5.bigip_snmp_trap import ArgumentSpec
except ImportError:
from nose.plugins.skip import SkipTest
raise SkipTest("%s requires the python modules for f5/bigip" % __file__)
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

@ -45,11 +45,16 @@ try:
from library.bigip_user import UnparitionedManager from library.bigip_user import UnparitionedManager
from library.bigip_user import PartitionedManager from library.bigip_user import PartitionedManager
except ImportError: except ImportError:
from ansible.modules.network.f5.bigip_user import Parameters try:
from ansible.modules.network.f5.bigip_user import ModuleManager from ansible.modules.network.f5.bigip_user import Parameters
from ansible.modules.network.f5.bigip_user import ArgumentSpec from ansible.modules.network.f5.bigip_user import ModuleManager
from ansible.modules.network.f5.bigip_user import UnparitionedManager from ansible.modules.network.f5.bigip_user import ArgumentSpec
from ansible.modules.network.f5.bigip_user import PartitionedManager from ansible.modules.network.f5.bigip_user import UnparitionedManager
from ansible.modules.network.f5.bigip_user import PartitionedManager
except ImportError:
from nose.plugins.skip import SkipTest
raise SkipTest("%s requires the python modules for f5/bigip" % __file__)
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {} fixture_data = {}

Loading…
Cancel
Save