diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-10-23 18:08:07 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-10-23 19:58:11 +0200 |
commit | 0ecc50df5129dd4c3f0ce251c64c18b1d9ad3a25 (patch) | |
tree | 97589c3aa44be3c732ccddc4b5ad55578c7430cc | |
parent | 8717bb34ef6d4ed6c45c673bf7748e91f89c1f25 (diff) |
Overprotect vmtp vs unversioned OS_AUTH_URL
It simply adds v3 to OS_AUTH_URL if required.
Vtmp should be updated to manage unversioned url [1].
https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/371/console
Co-Authored-By: Juha Kosonen <juha.kosonen@nokia.com>
Change-Id: I4806e811c0714b061b77f940934830cfb1835d74
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 5ac878fe7cccbfe5cb829488d0aedc307dd42885)
-rw-r--r-- | functest/opnfv_tests/openstack/vmtp/vmtp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/vmtp/vmtp.py b/functest/opnfv_tests/openstack/vmtp/vmtp.py index 8831078db..d37e344ce 100644 --- a/functest/opnfv_tests/openstack/vmtp/vmtp.py +++ b/functest/opnfv_tests/openstack/vmtp/vmtp.py @@ -29,6 +29,7 @@ import tempfile import time import yaml +import six from xtesting.core import testcase from functest.core import singlevm @@ -129,6 +130,9 @@ class Vmtp(singlevm.VmReady2): OS_PROJECT_NAME=self.project.project.name, OS_PROJECT_ID=self.project.project.id, OS_PASSWORD=self.project.password) + if not new_env["OS_AUTH_URL"].endswith(('v3', 'v3/')): + new_env["OS_AUTH_URL"] = six.moves.urllib.parse.urljoin( + new_env["OS_AUTH_URL"], 'v3') try: del new_env['OS_TENANT_NAME'] del new_env['OS_TENANT_ID'] |