From 1e16da70134537ae53d0c79214e70f0f06b14dd2 Mon Sep 17 00:00:00 2001 From: William Wolf Date: Fri, 15 Jul 2011 15:10:15 -0400 Subject: remove get_uuid_from_href and tests --- nova/api/openstack/common.py | 23 ----------------------- nova/api/openstack/views/servers.py | 1 - 2 files changed, 24 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py index e7aa7d693..8e12ce0c0 100644 --- a/nova/api/openstack/common.py +++ b/nova/api/openstack/common.py @@ -136,29 +136,6 @@ def get_id_from_href(href): raise ValueError(_('could not parse id from href')) -def get_uuid_from_href(href): - """Return the uuid portion of a url. - - Given: 'http://www.foo.com/bar/123?q=4' - Returns: '123' - - In order to support local hrefs, the href argument can be just an id: - Given: '123' - Returns: '123' - - """ - if not '/' in href: - return href - try: - href = urlparse(href).path.split('/')[-1] - if href == '': - raise Exception - return href - except: - LOG.debug(_("Error extracting uuid from href: %s") % href) - raise ValueError(_('could not parse uuid from href')) - - def remove_version_from_href(href): """Removes the first api version from the href. diff --git a/nova/api/openstack/views/servers.py b/nova/api/openstack/views/servers.py index a9db8357e..6d6ebbafd 100644 --- a/nova/api/openstack/views/servers.py +++ b/nova/api/openstack/views/servers.py @@ -195,7 +195,6 @@ class ViewBuilderV11(ViewBuilder): def _build_extra(self, response, inst): self._build_links(response, inst) - response['id'] = inst['id'] response['uuid'] = inst['uuid'] def _build_links(self, response, inst): -- cgit