Stop using urljoin when adding v3 63/66663/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Sat, 26 Jan 2019 23:06:32 +0000 (00:06 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 26 Jan 2019 23:44:37 +0000 (00:44 +0100)
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 <cedric.ollivier@orange.com>
(cherry picked from commit 9e4e6f049fa7d5cce8db61dfa2ebebc55f91c1d8)

functest/opnfv_tests/openstack/vmtp/vmtp.py
functest/opnfv_tests/vnf/epc/juju_epc.py

index 6bad9ae..3462ec0 100644 (file)
@@ -29,7 +29,6 @@ import tempfile
 import time
 import yaml
 
-import six
 from xtesting.core import testcase
 
 from functest.core import singlevm
@@ -138,8 +137,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']
index ad4591f..ea09084 100644 (file)
@@ -19,7 +19,6 @@ import sys
 
 from copy import deepcopy
 import pkg_resources
-import six
 
 from functest.core import singlevm
 from functest.utils import config
@@ -140,8 +139,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