diff options
| author | Russell Bryant <rbryant@redhat.com> | 2013-05-15 20:09:01 -0400 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2013-05-15 20:10:00 -0400 |
| commit | 56f5172f33bbd1da1b8749b7754805de44c3ab9c (patch) | |
| tree | bb1419252f21874cc6d409a14561e9b212d08158 /nova/api | |
| parent | 1e9937e327fa87d783c491bb3874b8c79d013108 (diff) | |
Revert "Include list of attached volumes with instance info"
This reverts commit dd66f235ecf2ff67819917ee07bcb0ea13a1b17b.
This changed the core servers API without doing it as an API extension,
so it's not an acceptable change as written.
Change-Id: I3787060583de1371e366647d38d69f37746317d5
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 14 | ||||
| -rw-r--r-- | nova/api/openstack/compute/views/servers.py | 2 |
2 files changed, 0 insertions, 16 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 71b4e86bf..cb3f7ad49 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -98,11 +98,6 @@ def make_server(elem, detailed=False): # Attach addresses node elem.append(ips.AddressesTemplate()) - # Attach volumes_attached node - volumes = xmlutil.SubTemplateElement(elem, 'volume_attached', - selector='volumes_attached') - volumes.set('id') - xmlutil.make_links(elem, 'links') @@ -500,13 +495,6 @@ class Controller(wsgi.Controller): return instances - def _add_instance_volumes(self, context, instances): - for instance in instances: - bdms = self.compute_api.get_instance_bdms(context, instance) - volumes = [bdm['volume_id'] for bdm in bdms if bdm['volume_id']] - if volumes: - instance['volumes_attached'] = volumes - def _get_servers(self, req, is_detail): """Returns a list of servers, based on any search options specified.""" @@ -574,7 +562,6 @@ class Controller(wsgi.Controller): if is_detail: self._add_instance_faults(context, instance_list) - self._add_instance_volumes(context, instance_list) response = self._view_builder.detail(req, instance_list) else: response = self._view_builder.index(req, instance_list) @@ -751,7 +738,6 @@ class Controller(wsgi.Controller): instance = self.compute_api.get(context, id) req.cache_db_instance(instance) self._add_instance_faults(context, [instance]) - self._add_instance_volumes(context, [instance]) return self._view_builder.show(req, instance) except exception.NotFound: msg = _("Instance could not be found") diff --git a/nova/api/openstack/compute/views/servers.py b/nova/api/openstack/compute/views/servers.py index ff64e5f8e..0cd6afaa1 100644 --- a/nova/api/openstack/compute/views/servers.py +++ b/nova/api/openstack/compute/views/servers.py @@ -108,8 +108,6 @@ class ViewBuilder(common.ViewBuilder): "links": self._get_links(request, instance["uuid"], self._collection_name), - "volumes_attached": [{'id': vol_id} for vol_id in - instance.get("volumes_attached", [])], }, } _inst_fault = self._get_fault(request, instance) |
