summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-07-18 18:17:04 +0000
committerGerrit Code Review <review@openstack.org>2012-07-18 18:17:04 +0000
commit8a54a9fee3e96c4f43f3f293fda9f6844db5cfc7 (patch)
tree04876c57da85bd7cae9c193626c1e067afb1b3a4 /nova/api
parent2e9ed45806f9fa7d4bdaa73050b92ba5f9463203 (diff)
parent3bfbbcacb0b07837c39b4da009fca315209a07bb (diff)
downloadnova-8a54a9fee3e96c4f43f3f293fda9f6844db5cfc7.tar.gz
nova-8a54a9fee3e96c4f43f3f293fda9f6844db5cfc7.tar.xz
nova-8a54a9fee3e96c4f43f3f293fda9f6844db5cfc7.zip
Merge "Remove unused get_version_from_href()"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/common.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py
index bb07b2b79..b1e31b0c7 100644
--- a/nova/api/openstack/common.py
+++ b/nova/api/openstack/common.py
@@ -254,26 +254,6 @@ def remove_version_from_href(href):
return urlparse.urlunsplit(parsed_url)
-def get_version_from_href(href):
- """Returns the api version in the href.
-
- Returns the api version in the href.
- If no version is found, '2' is returned
-
- Given: 'http://www.nova.com/123'
- Returns: '2'
-
- Given: 'http://www.nova.com/v1.1'
- Returns: '1.1'
-
- """
- try:
- expression = r'/v([0-9]+|[0-9]+\.[0-9]+)(/|$)'
- return re.findall(expression, href)[0][0]
- except IndexError:
- return '2'
-
-
def check_img_metadata_properties_quota(context, metadata):
if metadata is None:
return