Fix ansible sanity linter tests
Change-Id: I2d08fdc77d930378be515da697c1cf975dd8b4d2
This commit is contained in:
parent
2753b5bc42
commit
347347b46e
@ -28,6 +28,8 @@
|
|||||||
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
from distutils.version import StrictVersion
|
||||||
|
import importlib
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
@ -112,10 +114,8 @@ def openstack_module_kwargs(**kwargs):
|
|||||||
|
|
||||||
|
|
||||||
def openstack_cloud_from_module(module, min_version='0.12.0'):
|
def openstack_cloud_from_module(module, min_version='0.12.0'):
|
||||||
from distutils.version import StrictVersion
|
|
||||||
try:
|
try:
|
||||||
# Due to the name shadowing we should import other way
|
# Due to the name shadowing we should import other way
|
||||||
import importlib
|
|
||||||
sdk = importlib.import_module('openstack')
|
sdk = importlib.import_module('openstack')
|
||||||
sdk_version = importlib.import_module('openstack.version')
|
sdk_version = importlib.import_module('openstack.version')
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -12,7 +12,7 @@ DOCUMENTATION = '''
|
|||||||
module: os_keystone_mapping
|
module: os_keystone_mapping
|
||||||
short_description: Manage a federation mapping
|
short_description: Manage a federation mapping
|
||||||
author:
|
author:
|
||||||
- "Mark Chappell <mchappel@redhat.com>"
|
- "Mark Chappell (@tremble) <mchappel@redhat.com>"
|
||||||
description:
|
description:
|
||||||
- Manage a federation mapping.
|
- Manage a federation mapping.
|
||||||
options:
|
options:
|
||||||
|
4
tox.ini
4
tox.ini
@ -37,8 +37,8 @@ passenv = *
|
|||||||
commands =
|
commands =
|
||||||
{[testenv:build]commands}
|
{[testenv:build]commands}
|
||||||
{[testenv:pep8]commands}
|
{[testenv:pep8]commands}
|
||||||
/bin/bash -c "ansible-galaxy collection install $(ls {toxinidir}/build_artifact/openstack-cloud-*) --force -p {toxinidir}"
|
/bin/bash -c "ansible-galaxy collection install $(ls {toxinidir}/build_artifact/openstack-cloud-*) --force"
|
||||||
/bin/bash -c "cd ansible_collections/openstack/cloud && ansible-test sanity"
|
/bin/bash -c "cd ~/.ansible/collections/ansible_collections/openstack/cloud && ansible-test sanity --skip-test metaclass-boilerplate --skip-test future-import-boilerplate"
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
deps =
|
deps =
|
||||||
|
Loading…
Reference in New Issue
Block a user