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.
|
||||
|
||||
import abc
|
||||
from distutils.version import StrictVersion
|
||||
import importlib
|
||||
import os
|
||||
|
||||
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'):
|
||||
from distutils.version import StrictVersion
|
||||
try:
|
||||
# Due to the name shadowing we should import other way
|
||||
import importlib
|
||||
sdk = importlib.import_module('openstack')
|
||||
sdk_version = importlib.import_module('openstack.version')
|
||||
except ImportError:
|
||||
|
|
|
@ -12,7 +12,7 @@ DOCUMENTATION = '''
|
|||
module: os_keystone_mapping
|
||||
short_description: Manage a federation mapping
|
||||
author:
|
||||
- "Mark Chappell <mchappel@redhat.com>"
|
||||
- "Mark Chappell (@tremble) <mchappel@redhat.com>"
|
||||
description:
|
||||
- Manage a federation mapping.
|
||||
options:
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -37,8 +37,8 @@ passenv = *
|
|||
commands =
|
||||
{[testenv:build]commands}
|
||||
{[testenv:pep8]commands}
|
||||
/bin/bash -c "ansible-galaxy collection install $(ls {toxinidir}/build_artifact/openstack-cloud-*) --force -p {toxinidir}"
|
||||
/bin/bash -c "cd ansible_collections/openstack/cloud && ansible-test sanity"
|
||||
/bin/bash -c "ansible-galaxy collection install $(ls {toxinidir}/build_artifact/openstack-cloud-*) --force"
|
||||
/bin/bash -c "cd ~/.ansible/collections/ansible_collections/openstack/cloud && ansible-test sanity --skip-test metaclass-boilerplate --skip-test future-import-boilerplate"
|
||||
|
||||
[testenv:venv]
|
||||
deps =
|
||||
|
|
Loading…
Reference in New Issue