Remove unused build_url function in data_utils
This commit removes build_url function in data_utils because there is no
user of this code. The using code of this function was removed at
I1102859c871b8f16c284bdf7fba0f4346d50a63e .
Change-Id: I8989ac12f36f342ca1066cc65f7a427a83de721f
diff --git a/tempest/common/utils/data_utils.py b/tempest/common/utils/data_utils.py
index cd32720..a0a88dd 100644
--- a/tempest/common/utils/data_utils.py
+++ b/tempest/common/utils/data_utils.py
@@ -15,12 +15,8 @@
import itertools
import random
-import re
-import urllib
import uuid
-from tempest import exceptions
-
def rand_uuid():
return str(uuid.uuid4())
@@ -57,37 +53,6 @@
return ':'.join(["%02x" % x for x in mac])
-def build_url(host, port, api_version=None, path=None,
- params=None, use_ssl=False):
- """Build the request URL from given host, port, path and parameters."""
-
- pattern = 'v\d\.\d'
- if re.match(pattern, path):
- message = 'Version should not be included in path.'
- raise exceptions.InvalidConfiguration(message=message)
-
- if use_ssl:
- url = "https://" + host
- else:
- url = "http://" + host
-
- if port is not None:
- url += ":" + port
- url += "/"
-
- if api_version is not None:
- url += api_version + "/"
-
- if path is not None:
- url += path
-
- if params is not None:
- url += "?"
- url += urllib.urlencode(params)
-
- return url
-
-
def parse_image_id(image_ref):
"""Return the image id from a given image ref."""
return image_ref.rsplit('/')[-1]