diff options
| author | William Wolf <throughnothing@gmail.com> | 2011-07-15 15:10:15 -0400 |
|---|---|---|
| committer | William Wolf <throughnothing@gmail.com> | 2011-07-15 15:10:15 -0400 |
| commit | 1e16da70134537ae53d0c79214e70f0f06b14dd2 (patch) | |
| tree | 7c08a6cd09b67cb367c02f9b98eb27fdf3abed13 /nova/api | |
| parent | 63d9a592823cdb2e120514137a1d71d838b336d7 (diff) | |
remove get_uuid_from_href and tests
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/common.py | 23 | ||||
| -rw-r--r-- | nova/api/openstack/views/servers.py | 1 |
2 files changed, 0 insertions, 24 deletions
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): |
