Various bigiq fixes (#40024)

Udpdating coding conventions
This commit is contained in:
Tim Rupp 2018-05-11 12:59:29 -07:00 committed by GitHub
parent ea77c0d4f5
commit d312c2aed7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 29 deletions

View file

@ -18,7 +18,7 @@ module: bigiq_regkey_license
short_description: Manages licenses in a BIG-IQ registration key pool short_description: Manages licenses in a BIG-IQ registration key pool
description: description:
- Manages licenses in a BIG-IQ registration key pool. - Manages licenses in a BIG-IQ registration key pool.
version_added: "2.5" version_added: 2.5
options: options:
regkey_pool: regkey_pool:
description: description:
@ -40,6 +40,7 @@ options:
- A key that signifies that you accept the F5 EULA for this license. - A key that signifies that you accept the F5 EULA for this license.
- A copy of the EULA can be found here https://askf5.f5.com/csp/article/K12902 - A copy of the EULA can be found here https://askf5.f5.com/csp/article/K12902
- This is required when C(state) is C(present). - This is required when C(state) is C(present).
type: bool
state: state:
description: description:
- The state of the regkey license in the pool on the system. - The state of the regkey license in the pool on the system.
@ -91,30 +92,21 @@ import time
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
HAS_DEVEL_IMPORTS = False
try: try:
# Sideband repository used for dev
from library.module_utils.network.f5.bigiq import HAS_F5SDK from library.module_utils.network.f5.bigiq import HAS_F5SDK
from library.module_utils.network.f5.bigiq import F5Client from library.module_utils.network.f5.bigiq import F5Client
from library.module_utils.network.f5.common import F5ModuleError from library.module_utils.network.f5.common import F5ModuleError
from library.module_utils.network.f5.common import AnsibleF5Parameters from library.module_utils.network.f5.common import AnsibleF5Parameters
from library.module_utils.network.f5.common import cleanup_tokens
from library.module_utils.network.f5.common import fqdn_name
from library.module_utils.network.f5.common import f5_argument_spec from library.module_utils.network.f5.common import f5_argument_spec
try: try:
from library.module_utils.network.f5.common import iControlUnexpectedHTTPError from library.module_utils.network.f5.common import iControlUnexpectedHTTPError
except ImportError: except ImportError:
HAS_F5SDK = False HAS_F5SDK = False
HAS_DEVEL_IMPORTS = True
except ImportError: except ImportError:
# Upstream Ansible
from ansible.module_utils.network.f5.bigiq import HAS_F5SDK from ansible.module_utils.network.f5.bigiq import HAS_F5SDK
from ansible.module_utils.network.f5.bigiq import F5Client from ansible.module_utils.network.f5.bigiq import F5Client
from ansible.module_utils.network.f5.common import F5ModuleError from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import AnsibleF5Parameters from ansible.module_utils.network.f5.common import AnsibleF5Parameters
from ansible.module_utils.network.f5.common import cleanup_tokens
from ansible.module_utils.network.f5.common import fqdn_name
from ansible.module_utils.network.f5.common import f5_argument_spec from ansible.module_utils.network.f5.common import f5_argument_spec
try: try:
from ansible.module_utils.network.f5.common import iControlUnexpectedHTTPError from ansible.module_utils.network.f5.common import iControlUnexpectedHTTPError

View file

@ -20,7 +20,7 @@ description:
- Manages registration key (regkey) pools on a BIG-IQ. These pools function as - Manages registration key (regkey) pools on a BIG-IQ. These pools function as
a container in-which you will add lists of registration keys. To add registration a container in-which you will add lists of registration keys. To add registration
keys, use the C(bigiq_regkey_license) module. keys, use the C(bigiq_regkey_license) module.
version_added: "2.5" version_added: 2.5
options: options:
name: name:
description: description:
@ -71,30 +71,21 @@ description:
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
HAS_DEVEL_IMPORTS = False
try: try:
# Sideband repository used for dev
from library.module_utils.network.f5.bigiq import HAS_F5SDK from library.module_utils.network.f5.bigiq import HAS_F5SDK
from library.module_utils.network.f5.bigiq import F5Client from library.module_utils.network.f5.bigiq import F5Client
from library.module_utils.network.f5.common import F5ModuleError from library.module_utils.network.f5.common import F5ModuleError
from library.module_utils.network.f5.common import AnsibleF5Parameters from library.module_utils.network.f5.common import AnsibleF5Parameters
from library.module_utils.network.f5.common import cleanup_tokens
from library.module_utils.network.f5.common import fqdn_name
from library.module_utils.network.f5.common import f5_argument_spec from library.module_utils.network.f5.common import f5_argument_spec
try: try:
from library.module_utils.network.f5.common import iControlUnexpectedHTTPError from library.module_utils.network.f5.common import iControlUnexpectedHTTPError
except ImportError: except ImportError:
HAS_F5SDK = False HAS_F5SDK = False
HAS_DEVEL_IMPORTS = True
except ImportError: except ImportError:
# Upstream Ansible
from ansible.module_utils.network.f5.bigiq import HAS_F5SDK from ansible.module_utils.network.f5.bigiq import HAS_F5SDK
from ansible.module_utils.network.f5.bigiq import F5Client from ansible.module_utils.network.f5.bigiq import F5Client
from ansible.module_utils.network.f5.common import F5ModuleError from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import AnsibleF5Parameters from ansible.module_utils.network.f5.common import AnsibleF5Parameters
from ansible.module_utils.network.f5.common import cleanup_tokens
from ansible.module_utils.network.f5.common import fqdn_name
from ansible.module_utils.network.f5.common import f5_argument_spec from ansible.module_utils.network.f5.common import f5_argument_spec
try: try:
from ansible.module_utils.network.f5.common import iControlUnexpectedHTTPError from ansible.module_utils.network.f5.common import iControlUnexpectedHTTPError

View file

@ -951,7 +951,6 @@ lib/ansible/modules/network/f5/bigip_profile_client_ssl.py E324
lib/ansible/modules/network/f5/bigip_selfip.py E324 lib/ansible/modules/network/f5/bigip_selfip.py E324
lib/ansible/modules/network/f5/bigip_sys_global.py E326 lib/ansible/modules/network/f5/bigip_sys_global.py E326
lib/ansible/modules/network/f5/bigip_virtual_server.py E326 lib/ansible/modules/network/f5/bigip_virtual_server.py E326
lib/ansible/modules/network/f5/bigiq_regkey_license.py E325
lib/ansible/modules/network/fortimanager/fmgr_script.py E324 lib/ansible/modules/network/fortimanager/fmgr_script.py E324
lib/ansible/modules/network/fortios/fortios_address.py E324 lib/ansible/modules/network/fortios/fortios_address.py E324
lib/ansible/modules/network/illumos/dladm_iptun.py E325 lib/ansible/modules/network/illumos/dladm_iptun.py E325

View file

@ -21,10 +21,10 @@ from ansible.compat.tests.mock import patch
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
try: try:
from library.bigiq_regkey_license import ModuleParameters from library.modules.bigiq_regkey_license import ModuleParameters
from library.bigiq_regkey_license import ApiParameters from library.modules.bigiq_regkey_license import ApiParameters
from library.bigiq_regkey_license import ModuleManager from library.modules.bigiq_regkey_license import ModuleManager
from library.bigiq_regkey_license import ArgumentSpec from library.modules.bigiq_regkey_license import ArgumentSpec
from library.module_utils.network.f5.common import F5ModuleError from library.module_utils.network.f5.common import F5ModuleError
from library.module_utils.network.f5.common import iControlUnexpectedHTTPError from library.module_utils.network.f5.common import iControlUnexpectedHTTPError
from test.unit.modules.utils import set_module_args from test.unit.modules.utils import set_module_args

View file

@ -21,10 +21,10 @@ from ansible.compat.tests.mock import patch
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
try: try:
from library.bigiq_regkey_pool import ModuleParameters from library.modules.bigiq_regkey_pool import ModuleParameters
from library.bigiq_regkey_pool import ApiParameters from library.modules.bigiq_regkey_pool import ApiParameters
from library.bigiq_regkey_pool import ModuleManager from library.modules.bigiq_regkey_pool import ModuleManager
from library.bigiq_regkey_pool import ArgumentSpec from library.modules.bigiq_regkey_pool import ArgumentSpec
from library.module_utils.network.f5.common import F5ModuleError from library.module_utils.network.f5.common import F5ModuleError
from library.module_utils.network.f5.common import iControlUnexpectedHTTPError from library.module_utils.network.f5.common import iControlUnexpectedHTTPError
from test.unit.modules.utils import set_module_args from test.unit.modules.utils import set_module_args