diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-07-16 06:10:49 +0100 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-07-18 09:08:50 +0100 |
| commit | 3bfbbcacb0b07837c39b4da009fca315209a07bb (patch) | |
| tree | 41cfb9ddb26032dd2b77aac502180f7ef0c1ef80 /nova/api | |
| parent | acb158714c562d3142bf2f3f560dc374daa2df7d (diff) | |
| download | nova-3bfbbcacb0b07837c39b4da009fca315209a07bb.tar.gz nova-3bfbbcacb0b07837c39b4da009fca315209a07bb.tar.xz nova-3bfbbcacb0b07837c39b4da009fca315209a07bb.zip | |
Remove unused get_version_from_href()
This is unused since edf3e39c remove the v1.0 API.
Change-Id: I1f7c6203ffbe0248c7ef9e95a231c05a0113a347
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/common.py | 20 |
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 |
