From 3170bbbac4da25bca1d825060a4c6741c96718be Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Sun, 27 Jan 2019 00:06:32 +0100 Subject: [PATCH] Stop using urljoin when adding v3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit urljoin works here only if url ends by /. It replaces identity by v3 when running vs devstack. Change-Id: Id896f2b54dfcabadaad1137deef91b1cb07c697d Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/vmtp/vmtp.py | 3 +-- functest/opnfv_tests/vnf/epc/juju_epc.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/functest/opnfv_tests/openstack/vmtp/vmtp.py b/functest/opnfv_tests/openstack/vmtp/vmtp.py index 6bad9aec2..68f7c6d4b 100644 --- a/functest/opnfv_tests/openstack/vmtp/vmtp.py +++ b/functest/opnfv_tests/openstack/vmtp/vmtp.py @@ -138,8 +138,7 @@ class Vmtp(singlevm.VmReady2): 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') + new_env["OS_AUTH_URL"] = "{}/v3".format(new_env["OS_AUTH_URL"]) try: del new_env['OS_TENANT_NAME'] del new_env['OS_TENANT_ID'] diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py index ad4591fd6..ab08cc113 100644 --- a/functest/opnfv_tests/vnf/epc/juju_epc.py +++ b/functest/opnfv_tests/vnf/epc/juju_epc.py @@ -140,8 +140,7 @@ class JujuEpc(singlevm.VmReady2): try: self.public_auth_url = self.get_public_auth_url(self.orig_cloud) if not self.public_auth_url.endswith(('v3', 'v3/')): - self.public_auth_url = six.moves.urllib.parse.urljoin( - self.public_auth_url, 'v3') + self.public_auth_url = "{}/v3".format(self.public_auth_url) except Exception: # pylint: disable=broad-except self.public_auth_url = None self.sec = None -- 2.16.6