mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Updates bigiq_utility_license_assignment for ansible 2.8 (#47719)
This commit is contained in:
parent
72d53f82eb
commit
b7a937cb0d
1 changed files with 13 additions and 9 deletions
|
@ -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,17 +21,25 @@ try:
|
|||
from library.modules.bigiq_utility_license_assignment import ModuleParameters
|
||||
from library.modules.bigiq_utility_license_assignment import ModuleManager
|
||||
from library.modules.bigiq_utility_license_assignment 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.bigiq_utility_license_assignment import ApiParameters
|
||||
from ansible.modules.network.f5.bigiq_utility_license_assignment import ModuleParameters
|
||||
from ansible.modules.network.f5.bigiq_utility_license_assignment import ModuleManager
|
||||
from ansible.modules.network.f5.bigiq_utility_license_assignment 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")
|
||||
|
|
Loading…
Reference in a new issue