diff --git a/doc/api_samples/OS-DCF/list-servers-detail-get.json b/doc/api_samples/OS-DCF/list-servers-detail-get.json
index 3b0c66329af2..7aea51e195a8 100644
--- a/doc/api_samples/OS-DCF/list-servers-detail-get.json
+++ b/doc/api_samples/OS-DCF/list-servers-detail-get.json
@@ -51,8 +51,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-12-02T02:11:56Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-action-rebuild-resp.json b/doc/api_samples/OS-DCF/server-action-rebuild-resp.json
index 2f6be80e1cdd..24e1e5d04276 100644
--- a/doc/api_samples/OS-DCF/server-action-rebuild-resp.json
+++ b/doc/api_samples/OS-DCF/server-action-rebuild-resp.json
@@ -51,7 +51,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-12-02T02:11:56Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-get-resp.json b/doc/api_samples/OS-DCF/server-get-resp.json
index 94742a8060ad..4ad77036f5be 100644
--- a/doc/api_samples/OS-DCF/server-get-resp.json
+++ b/doc/api_samples/OS-DCF/server-get-resp.json
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-12-02T02:11:55Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-update-put-resp.json b/doc/api_samples/OS-DCF/server-update-put-resp.json
index 9750db476934..ce6e08455a42 100644
--- a/doc/api_samples/OS-DCF/server-update-put-resp.json
+++ b/doc/api_samples/OS-DCF/server-update-put-resp.json
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-12-02T02:11:58Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-EXT-AZ/server-get-resp.json b/doc/api_samples/OS-EXT-AZ/server-get-resp.json
index e98b9bc434bc..c2f0fb2ba7a8 100644
--- a/doc/api_samples/OS-EXT-AZ/server-get-resp.json
+++ b/doc/api_samples/OS-EXT-AZ/server-get-resp.json
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-01-30T13:38:49Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/doc/api_samples/OS-EXT-AZ/servers-detail-resp.json b/doc/api_samples/OS-EXT-AZ/servers-detail-resp.json
index b9310e101927..2ecea959a12e 100644
--- a/doc/api_samples/OS-EXT-AZ/servers-detail-resp.json
+++ b/doc/api_samples/OS-EXT-AZ/servers-detail-resp.json
@@ -51,8 +51,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-01-30T13:26:52Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
diff --git a/doc/api_samples/OS-EXT-IPS-MAC/server-get-resp.json b/doc/api_samples/OS-EXT-IPS-MAC/server-get-resp.json
index 2767c5c0e9c3..50b53d8105af 100644
--- a/doc/api_samples/OS-EXT-IPS-MAC/server-get-resp.json
+++ b/doc/api_samples/OS-EXT-IPS-MAC/server-get-resp.json
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-07T18:46:29Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/doc/api_samples/OS-EXT-IPS-MAC/servers-detail-resp.json b/doc/api_samples/OS-EXT-IPS-MAC/servers-detail-resp.json
index 41b1c37c9bfe..115780401a19 100644
--- a/doc/api_samples/OS-EXT-IPS-MAC/servers-detail-resp.json
+++ b/doc/api_samples/OS-EXT-IPS-MAC/servers-detail-resp.json
@@ -51,8 +51,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-07T18:40:59Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
diff --git a/doc/api_samples/OS-EXT-IPS/server-get-resp.json b/doc/api_samples/OS-EXT-IPS/server-get-resp.json
index 66b710eda9f0..e985ad115f1d 100644
--- a/doc/api_samples/OS-EXT-IPS/server-get-resp.json
+++ b/doc/api_samples/OS-EXT-IPS/server-get-resp.json
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-07T18:46:29Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-EXT-IPS/servers-detail-resp.json b/doc/api_samples/OS-EXT-IPS/servers-detail-resp.json
index 2127ffc1ee38..cb91d69376ce 100644
--- a/doc/api_samples/OS-EXT-IPS/servers-detail-resp.json
+++ b/doc/api_samples/OS-EXT-IPS/servers-detail-resp.json
@@ -51,8 +51,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-07T18:40:59Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-EXT-SRV-ATTR/server-get-resp.json b/doc/api_samples/OS-EXT-SRV-ATTR/server-get-resp.json
index 31b8687b4b5c..ad3bcab5de31 100644
--- a/doc/api_samples/OS-EXT-SRV-ATTR/server-get-resp.json
+++ b/doc/api_samples/OS-EXT-SRV-ATTR/server-get-resp.json
@@ -52,7 +52,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-11-15T19:27:04Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-EXT-SRV-ATTR/servers-detail-resp.json b/doc/api_samples/OS-EXT-SRV-ATTR/servers-detail-resp.json
index b980c0857a19..db3de77f4bc2 100644
--- a/doc/api_samples/OS-EXT-SRV-ATTR/servers-detail-resp.json
+++ b/doc/api_samples/OS-EXT-SRV-ATTR/servers-detail-resp.json
@@ -53,8 +53,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-11-15T19:27:05Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-EXT-STS/server-get-resp.json b/doc/api_samples/OS-EXT-STS/server-get-resp.json
index 7836dedc3c73..763426bb122e 100644
--- a/doc/api_samples/OS-EXT-STS/server-get-resp.json
+++ b/doc/api_samples/OS-EXT-STS/server-get-resp.json
@@ -52,7 +52,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-07T19:35:10Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/OS-EXT-STS/servers-detail-resp.json b/doc/api_samples/OS-EXT-STS/servers-detail-resp.json
index e67524e558c6..6764bd883a96 100644
--- a/doc/api_samples/OS-EXT-STS/servers-detail-resp.json
+++ b/doc/api_samples/OS-EXT-STS/servers-detail-resp.json
@@ -53,8 +53,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-12-05T07:34:10Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
\ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-rebuild-resp.json b/doc/api_samples/all_extensions/server-action-rebuild-resp.json
index 49fe6c8c6851..04ee1d4fb562 100644
--- a/doc/api_samples/all_extensions/server-action-rebuild-resp.json
+++ b/doc/api_samples/all_extensions/server-action-rebuild-resp.json
@@ -51,7 +51,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-09-25T13:36:09Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-get-resp.json b/doc/api_samples/all_extensions/server-get-resp.json
index 2b2503e53730..67a33cab1664 100644
--- a/doc/api_samples/all_extensions/server-get-resp.json
+++ b/doc/api_samples/all_extensions/server-get-resp.json
@@ -66,10 +66,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-07T18:58:57Z",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
}
diff --git a/doc/api_samples/all_extensions/server-get-resp.xml b/doc/api_samples/all_extensions/server-get-resp.xml
index 52598a5db9a3..6db40414b080 100644
--- a/doc/api_samples/all_extensions/server-get-resp.xml
+++ b/doc/api_samples/all_extensions/server-get-resp.xml
@@ -15,8 +15,6 @@
OS-EXT-IPS-MAC:mac_addr="00:0c:29:e1:42:90"/>
-
-
diff --git a/doc/api_samples/all_extensions/servers-details-resp.json b/doc/api_samples/all_extensions/servers-details-resp.json
index 5fd189443c92..05f11a2464f0 100644
--- a/doc/api_samples/all_extensions/servers-details-resp.json
+++ b/doc/api_samples/all_extensions/servers-details-resp.json
@@ -67,11 +67,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-07T18:58:57Z",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
]
}
diff --git a/doc/api_samples/all_extensions/servers-details-resp.xml b/doc/api_samples/all_extensions/servers-details-resp.xml
index 7a3ccbbe7169..8061caf213a9 100644
--- a/doc/api_samples/all_extensions/servers-details-resp.xml
+++ b/doc/api_samples/all_extensions/servers-details-resp.xml
@@ -15,8 +15,6 @@
-
-
diff --git a/doc/api_samples/os-config-drive/server-config-drive-get-resp.json b/doc/api_samples/os-config-drive/server-config-drive-get-resp.json
index e0adab26a63d..8745b3d62788 100644
--- a/doc/api_samples/os-config-drive/server-config-drive-get-resp.json
+++ b/doc/api_samples/os-config-drive/server-config-drive-get-resp.json
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-04T13:17:51Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/os-config-drive/servers-config-drive-details-resp.json b/doc/api_samples/os-config-drive/servers-config-drive-details-resp.json
index 2af535ff22a5..1373721ef549 100644
--- a/doc/api_samples/os-config-drive/servers-config-drive-details-resp.json
+++ b/doc/api_samples/os-config-drive/servers-config-drive-details-resp.json
@@ -51,8 +51,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2013-02-04T13:21:44Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
\ No newline at end of file
diff --git a/doc/api_samples/os-hide-server-addresses/server-get-resp.json b/doc/api_samples/os-hide-server-addresses/server-get-resp.json
index 982cb9a7409c..b4209f461d4a 100644
--- a/doc/api_samples/os-hide-server-addresses/server-get-resp.json
+++ b/doc/api_samples/os-hide-server-addresses/server-get-resp.json
@@ -49,10 +49,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-12-19T20:32:42Z",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/os-hide-server-addresses/server-get-resp.xml b/doc/api_samples/os-hide-server-addresses/server-get-resp.xml
index 4eb8999aa882..caa4a2fa53e4 100644
--- a/doc/api_samples/os-hide-server-addresses/server-get-resp.xml
+++ b/doc/api_samples/os-hide-server-addresses/server-get-resp.xml
@@ -14,8 +14,6 @@
-
-
\ No newline at end of file
diff --git a/doc/api_samples/os-hide-server-addresses/servers-details-resp.json b/doc/api_samples/os-hide-server-addresses/servers-details-resp.json
index bdd37a4c0bf7..3787cd707b19 100644
--- a/doc/api_samples/os-hide-server-addresses/servers-details-resp.json
+++ b/doc/api_samples/os-hide-server-addresses/servers-details-resp.json
@@ -50,11 +50,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-12-19T20:32:39Z",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
]
}
\ No newline at end of file
diff --git a/doc/api_samples/os-hide-server-addresses/servers-details-resp.xml b/doc/api_samples/os-hide-server-addresses/servers-details-resp.xml
index 0fc121880207..0296cc1673fa 100644
--- a/doc/api_samples/os-hide-server-addresses/servers-details-resp.xml
+++ b/doc/api_samples/os-hide-server-addresses/servers-details-resp.xml
@@ -15,8 +15,6 @@
-
-
diff --git a/doc/api_samples/os-rescue/server-get-resp-rescue.json b/doc/api_samples/os-rescue/server-get-resp-rescue.json
index 926327080d83..d08191977e23 100644
--- a/doc/api_samples/os-rescue/server-get-resp-rescue.json
+++ b/doc/api_samples/os-rescue/server-get-resp-rescue.json
@@ -48,7 +48,6 @@
"status": "RESCUE",
"tenant_id": "openstack",
"updated": "2012-09-19T09:22:27Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/os-rescue/server-get-resp-unrescue.json b/doc/api_samples/os-rescue/server-get-resp-unrescue.json
index 5ab7a742ebeb..21a35da7f0a1 100644
--- a/doc/api_samples/os-rescue/server-get-resp-unrescue.json
+++ b/doc/api_samples/os-rescue/server-get-resp-unrescue.json
@@ -49,7 +49,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-09-19T09:22:28Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/server-action-rebuild-resp.json b/doc/api_samples/server-action-rebuild-resp.json
index 49ef1b4aecb8..ac6d6e7e58d2 100644
--- a/doc/api_samples/server-action-rebuild-resp.json
+++ b/doc/api_samples/server-action-rebuild-resp.json
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-09-12T17:20:37Z",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/server-get-resp.json b/doc/api_samples/server-get-resp.json
index 138f186eb511..c6ebd4195d62 100644
--- a/doc/api_samples/server-get-resp.json
+++ b/doc/api_samples/server-get-resp.json
@@ -49,10 +49,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-08-20T21:11:09Z",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/doc/api_samples/server-get-resp.xml b/doc/api_samples/server-get-resp.xml
index 5287078100af..e59319e4268c 100644
--- a/doc/api_samples/server-get-resp.xml
+++ b/doc/api_samples/server-get-resp.xml
@@ -14,8 +14,6 @@
-
-
\ No newline at end of file
diff --git a/doc/api_samples/servers-details-resp.json b/doc/api_samples/servers-details-resp.json
index ac27a00dd954..3ea61531e5cd 100644
--- a/doc/api_samples/servers-details-resp.json
+++ b/doc/api_samples/servers-details-resp.json
@@ -50,11 +50,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-09-07T16:56:37Z",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
]
}
\ No newline at end of file
diff --git a/doc/api_samples/servers-details-resp.xml b/doc/api_samples/servers-details-resp.xml
index eab2bd88725b..83bcf0f79bd9 100644
--- a/doc/api_samples/servers-details-resp.xml
+++ b/doc/api_samples/servers-details-resp.xml
@@ -15,8 +15,6 @@
-
-
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 71b4e86bfcbb..cb3f7ad49468 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 ff64e5f8e94c..0cd6afaa18b1 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)
diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py
index 6d3875431a03..5d2118564c05 100644
--- a/nova/tests/api/openstack/compute/test_servers.py
+++ b/nova/tests/api/openstack/compute/test_servers.py
@@ -314,7 +314,6 @@ class ServersControllerTest(test.TestCase):
"href": "http://localhost/fake/servers/%s" % uuid,
},
],
- "volumes_attached": [],
}
}
@@ -381,7 +380,6 @@ class ServersControllerTest(test.TestCase):
"href": "http://localhost/fake/servers/%s" % uuid,
},
],
- "volumes_attached": [],
}
}
@@ -451,79 +449,11 @@ class ServersControllerTest(test.TestCase):
"href": "http://localhost/fake/servers/%s" % uuid,
},
],
- "volumes_attached": [],
}
}
self.assertThat(res_dict, matchers.DictMatches(expected_server))
- def test_get_server_with_volumes_attached(self):
- image_bookmark = "http://localhost/fake/images/10"
- flavor_bookmark = "http://localhost/fake/flavors/1"
-
- self.stubs.Set(db, 'block_device_mapping_get_all_by_instance',
- fakes.stub_bdm_get_all_by_instance)
-
- uuid = FAKE_UUID
- req = fakes.HTTPRequest.blank('/v2/fake/servers/%s' % uuid)
- res_dict = self.controller.show(req, uuid)
- expected_server = {
- "server": {
- "id": uuid,
- "user_id": "fake_user",
- "tenant_id": "fake_project",
- "updated": "2010-11-11T11:00:00Z",
- "created": "2010-10-10T12:00:00Z",
- "progress": 0,
- "name": "server1",
- "status": "BUILD",
- "accessIPv4": "",
- "accessIPv6": "",
- "hostId": '',
- "image": {
- "id": "10",
- "links": [
- {
- "rel": "bookmark",
- "href": image_bookmark,
- },
- ],
- },
- "flavor": {
- "id": "1",
- "links": [
- {
- "rel": "bookmark",
- "href": flavor_bookmark,
- },
- ],
- },
- "addresses": {
- 'test1': [
- {'version': 4, 'addr': '192.168.1.100'},
- {'version': 6, 'addr': '2001:db8:0:1::1'}
- ]
- },
- "metadata": {
- "seq": "1",
- },
- "links": [
- {
- "rel": "self",
- "href": "http://localhost/v2/fake/servers/%s" % uuid,
- },
- {
- "rel": "bookmark",
- "href": "http://localhost/fake/servers/%s" % uuid,
- },
- ],
- "volumes_attached": [{'id': 'volume_id1'},
- {'id': 'volume_id2'}],
- }
- }
-
- self.assertThat(res_dict, matchers.DictMatches(expected_server))
-
def test_get_server_addresses_from_cache(self):
pub0 = ('172.19.0.1', '172.19.0.2',)
pub1 = ('1.2.3.4',)
@@ -4272,7 +4202,6 @@ class ServersViewBuilderTest(test.TestCase):
"href": bookmark_link,
},
],
- "volumes_attached": [],
}
}
@@ -4351,7 +4280,6 @@ class ServersViewBuilderTest(test.TestCase):
"message": "HTTPNotFound",
"details": "Stock details for test",
},
- "volumes_attached": [],
}
}
@@ -4492,7 +4420,6 @@ class ServersViewBuilderTest(test.TestCase):
"href": bookmark_link,
},
],
- "volumes_attached": [],
}
}
@@ -4555,7 +4482,6 @@ class ServersViewBuilderTest(test.TestCase):
"href": bookmark_link,
},
],
- "volumes_attached": [],
}
}
@@ -4618,7 +4544,6 @@ class ServersViewBuilderTest(test.TestCase):
"href": bookmark_link,
},
],
- "volumes_attached": [],
}
}
@@ -4683,78 +4608,12 @@ class ServersViewBuilderTest(test.TestCase):
"href": bookmark_link,
},
],
- "volumes_attached": [],
}
}
output = self.view_builder.show(self.request, self.instance)
self.assertThat(output, matchers.DictMatches(expected_server))
- def test_build_server_detail_with_volumes_attached(self):
-
- volumes_attached = ['volume_id1', 'volume_id2']
- self.instance['volumes_attached'] = volumes_attached
-
- image_bookmark = "http://localhost/fake/images/5"
- flavor_bookmark = "http://localhost/fake/flavors/1"
- self_link = "http://localhost/v2/fake/servers/%s" % self.uuid
- bookmark_link = "http://localhost/fake/servers/%s" % self.uuid
- expected_server = {
- "server": {
- "id": self.uuid,
- "user_id": "fake_user",
- "tenant_id": "fake_project",
- "updated": "2010-11-11T11:00:00Z",
- "created": "2010-10-10T12:00:00Z",
- "progress": 0,
- "name": "test_server",
- "status": "BUILD",
- "accessIPv4": "",
- "accessIPv6": "",
- "hostId": '',
- "image": {
- "id": "5",
- "links": [
- {
- "rel": "bookmark",
- "href": image_bookmark,
- },
- ],
- },
- "flavor": {
- "id": "1",
- "links": [
- {
- "rel": "bookmark",
- "href": flavor_bookmark,
- },
- ],
- },
- "addresses": {
- 'test1': [
- {'version': 4, 'addr': '192.168.1.100'},
- {'version': 6, 'addr': '2001:db8:0:1::1'}
- ]
- },
- "metadata": {},
- "links": [
- {
- "rel": "self",
- "href": self_link,
- },
- {
- "rel": "bookmark",
- "href": bookmark_link,
- },
- ],
- "volumes_attached": [{'id': vol_id} for vol_id in
- volumes_attached],
- }
- }
-
- output = self.view_builder.show(self.request, self.instance)
- self.assertThat(output, matchers.DictMatches(expected_server))
-
class ServerXMLSerializationTest(test.TestCase):
diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py
index 6139da3f47df..d05a35f715d2 100644
--- a/nova/tests/api/openstack/fakes.py
+++ b/nova/tests/api/openstack/fakes.py
@@ -631,7 +631,3 @@ def stub_snapshot_get_all(self, context):
return [stub_snapshot(100, project_id='fake'),
stub_snapshot(101, project_id='superfake'),
stub_snapshot(102, project_id='superduperfake')]
-
-
-def stub_bdm_get_all_by_instance(context, instance_uuid):
- return [{'volume_id': 'volume_id1'}, {'volume_id': 'volume_id2'}]
diff --git a/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.json.tpl
index c24c61ce31c0..acb9bf53100c 100644
--- a/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.json.tpl
@@ -51,8 +51,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.json.tpl
index 9a4ab81b9bc4..1608b9f6b0f3 100644
--- a/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.json.tpl
@@ -51,7 +51,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.json.tpl
index dbeb3f32570b..25e51a878051 100644
--- a/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.json.tpl
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.json.tpl
index dbeb3f32570b..25e51a878051 100644
--- a/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.json.tpl
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/OS-EXT-AZ/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-AZ/server-get-resp.json.tpl
index c4ff3b432f80..413f3ce95840 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-AZ/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-AZ/server-get-resp.json.tpl
@@ -50,7 +50,6 @@
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/OS-EXT-AZ/servers-detail-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-AZ/servers-detail-resp.json.tpl
index 3d777ba34e5c..362c8508512a 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-AZ/servers-detail-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-AZ/servers-detail-resp.json.tpl
@@ -51,8 +51,7 @@
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
diff --git a/nova/tests/integrated/api_samples/OS-EXT-IPS-MAC/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-IPS-MAC/server-get-resp.json.tpl
index 05ceee13b890..600a063c3d2b 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-IPS-MAC/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-IPS-MAC/server-get-resp.json.tpl
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/OS-EXT-IPS-MAC/servers-detail-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-IPS-MAC/servers-detail-resp.json.tpl
index d2224b8c07ed..6b5901098ac0 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-IPS-MAC/servers-detail-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-IPS-MAC/servers-detail-resp.json.tpl
@@ -51,7 +51,6 @@
"hostId": "%(hostid)s",
"metadata": {
"My Server Name": "Apache1"
- },
- "volumes_attached": []
+ }
}]
}
diff --git a/nova/tests/integrated/api_samples/OS-EXT-IPS/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-IPS/server-get-resp.json.tpl
index 7bd189bf33db..bea96d4f62a7 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-IPS/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-IPS/server-get-resp.json.tpl
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/OS-EXT-IPS/servers-detail-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-IPS/servers-detail-resp.json.tpl
index 8ce04e4742ef..27c6faa4edac 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-IPS/servers-detail-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-IPS/servers-detail-resp.json.tpl
@@ -51,7 +51,6 @@
"hostId": "%(hostid)s",
"metadata": {
"My Server Name": "Apache1"
- },
- "volumes_attached": []
+ }
}]
}
diff --git a/nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/server-get-resp.json.tpl
index c81e814b716e..c70192949a32 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/server-get-resp.json.tpl
@@ -52,7 +52,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
\ No newline at end of file
diff --git a/nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/servers-detail-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/servers-detail-resp.json.tpl
index 0f7da9870579..1fb8e1a47ad8 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/servers-detail-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/servers-detail-resp.json.tpl
@@ -53,8 +53,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
\ No newline at end of file
diff --git a/nova/tests/integrated/api_samples/OS-EXT-STS/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-STS/server-get-resp.json.tpl
index d6a86c8fb494..7ac35024b894 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-STS/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-STS/server-get-resp.json.tpl
@@ -52,7 +52,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/OS-EXT-STS/servers-detail-resp.json.tpl b/nova/tests/integrated/api_samples/OS-EXT-STS/servers-detail-resp.json.tpl
index a4818165d03a..a060332d471d 100644
--- a/nova/tests/integrated/api_samples/OS-EXT-STS/servers-detail-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/OS-EXT-STS/servers-detail-resp.json.tpl
@@ -53,7 +53,6 @@
"hostId": "%(hostid)s",
"metadata": {
"My Server Name": "Apache1"
- },
- "volumes_attached": []
+ }
}]
}
diff --git a/nova/tests/integrated/api_samples/all_extensions/server-action-rebuild-resp.json.tpl b/nova/tests/integrated/api_samples/all_extensions/server-action-rebuild-resp.json.tpl
index 3421225eda85..884be7549f22 100644
--- a/nova/tests/integrated/api_samples/all_extensions/server-action-rebuild-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/all_extensions/server-action-rebuild-resp.json.tpl
@@ -51,7 +51,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.json.tpl
index 0fa93402b69a..22be331e4c5d 100644
--- a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.json.tpl
@@ -66,10 +66,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl
index 211259fe59a1..35fe0a6c3391 100644
--- a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl
@@ -15,8 +15,6 @@
OS-EXT-IPS-MAC:mac_addr="%(mac_addr)s"/>
-
-
diff --git a/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.json.tpl b/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.json.tpl
index 84a5eb47d922..649aa6f9b736 100644
--- a/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.json.tpl
@@ -67,11 +67,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
]
}
diff --git a/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.xml.tpl b/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.xml.tpl
index 3f4f724956ac..6ac363176d7f 100644
--- a/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/all_extensions/servers-details-resp.xml.tpl
@@ -16,8 +16,6 @@
OS-EXT-IPS-MAC:mac_addr="%(mac_addr)s"/>
-
-
diff --git a/nova/tests/integrated/api_samples/os-config-drive/server-config-drive-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-config-drive/server-config-drive-get-resp.json.tpl
index 54d1e7c2f835..ea47da06cff0 100644
--- a/nova/tests/integrated/api_samples/os-config-drive/server-config-drive-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-config-drive/server-config-drive-get-resp.json.tpl
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/os-config-drive/servers-config-drive-details-resp.json.tpl b/nova/tests/integrated/api_samples/os-config-drive/servers-config-drive-details-resp.json.tpl
index 4235c51c1a7e..535d0041094b 100644
--- a/nova/tests/integrated/api_samples/os-config-drive/servers-config-drive-details-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-config-drive/servers-config-drive-details-resp.json.tpl
@@ -51,8 +51,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
]
}
diff --git a/nova/tests/integrated/api_samples/os-hide-server-addresses/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-hide-server-addresses/server-get-resp.json.tpl
index 8c19e34c6b82..86e39aedc6f7 100644
--- a/nova/tests/integrated/api_samples/os-hide-server-addresses/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-hide-server-addresses/server-get-resp.json.tpl
@@ -49,10 +49,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/os-hide-server-addresses/server-get-resp.xml.tpl b/nova/tests/integrated/api_samples/os-hide-server-addresses/server-get-resp.xml.tpl
index 07db2436c66a..adc8a5c1b7bc 100644
--- a/nova/tests/integrated/api_samples/os-hide-server-addresses/server-get-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/os-hide-server-addresses/server-get-resp.xml.tpl
@@ -14,8 +14,6 @@
-
-
diff --git a/nova/tests/integrated/api_samples/os-hide-server-addresses/servers-details-resp.json.tpl b/nova/tests/integrated/api_samples/os-hide-server-addresses/servers-details-resp.json.tpl
index 1f96734bc67f..e244ea0dfad4 100644
--- a/nova/tests/integrated/api_samples/os-hide-server-addresses/servers-details-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-hide-server-addresses/servers-details-resp.json.tpl
@@ -50,11 +50,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
]
}
diff --git a/nova/tests/integrated/api_samples/os-hide-server-addresses/servers-details-resp.xml.tpl b/nova/tests/integrated/api_samples/os-hide-server-addresses/servers-details-resp.xml.tpl
index 90d38375aaf7..568807ecb334 100644
--- a/nova/tests/integrated/api_samples/os-hide-server-addresses/servers-details-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/os-hide-server-addresses/servers-details-resp.xml.tpl
@@ -15,8 +15,6 @@
-
-
diff --git a/nova/tests/integrated/api_samples/os-rescue/server-get-resp-rescue.json.tpl b/nova/tests/integrated/api_samples/os-rescue/server-get-resp-rescue.json.tpl
index 03d4cfa0380d..011ed6396edb 100644
--- a/nova/tests/integrated/api_samples/os-rescue/server-get-resp-rescue.json.tpl
+++ b/nova/tests/integrated/api_samples/os-rescue/server-get-resp-rescue.json.tpl
@@ -48,7 +48,6 @@
"status": "%(status)s",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/os-rescue/server-get-resp-unrescue.json.tpl b/nova/tests/integrated/api_samples/os-rescue/server-get-resp-unrescue.json.tpl
index 366bdcef6d8c..bc483c6dae74 100644
--- a/nova/tests/integrated/api_samples/os-rescue/server-get-resp-unrescue.json.tpl
+++ b/nova/tests/integrated/api_samples/os-rescue/server-get-resp-unrescue.json.tpl
@@ -49,7 +49,6 @@
"status": "%(status)s",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/server-action-rebuild-resp.json.tpl b/nova/tests/integrated/api_samples/server-action-rebuild-resp.json.tpl
index d6da7ec07f10..9c16a15f058b 100644
--- a/nova/tests/integrated/api_samples/server-action-rebuild-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/server-action-rebuild-resp.json.tpl
@@ -50,7 +50,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": []
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/server-get-resp.json.tpl
index 8c19e34c6b82..86e39aedc6f7 100644
--- a/nova/tests/integrated/api_samples/server-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/server-get-resp.json.tpl
@@ -49,10 +49,6 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
}
diff --git a/nova/tests/integrated/api_samples/server-get-resp.xml.tpl b/nova/tests/integrated/api_samples/server-get-resp.xml.tpl
index 07db2436c66a..adc8a5c1b7bc 100644
--- a/nova/tests/integrated/api_samples/server-get-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/server-get-resp.xml.tpl
@@ -14,8 +14,6 @@
-
-
diff --git a/nova/tests/integrated/api_samples/servers-details-resp.json.tpl b/nova/tests/integrated/api_samples/servers-details-resp.json.tpl
index 1f96734bc67f..e244ea0dfad4 100644
--- a/nova/tests/integrated/api_samples/servers-details-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/servers-details-resp.json.tpl
@@ -50,11 +50,7 @@
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "%(timestamp)s",
- "user_id": "fake",
- "volumes_attached": [
- {"id": "volume_id1"},
- {"id": "volume_id2"}
- ]
+ "user_id": "fake"
}
]
}
diff --git a/nova/tests/integrated/api_samples/servers-details-resp.xml.tpl b/nova/tests/integrated/api_samples/servers-details-resp.xml.tpl
index 90d38375aaf7..568807ecb334 100644
--- a/nova/tests/integrated/api_samples/servers-details-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/servers-details-resp.xml.tpl
@@ -15,8 +15,6 @@
-
-
diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py
index d33cda028951..e24f241898f1 100644
--- a/nova/tests/integrated/test_api_samples.py
+++ b/nova/tests/integrated/test_api_samples.py
@@ -459,8 +459,6 @@ class ServersSampleJsonTest(ServersSampleBase):
def test_servers_get(self):
uuid = self.test_servers_post()
- self.stubs.Set(db, 'block_device_mapping_get_all_by_instance',
- fakes.stub_bdm_get_all_by_instance)
response = self._do_get('servers/%s' % uuid)
subs = self._get_regexes()
subs['hostid'] = '[a-f0-9]+'
@@ -478,8 +476,6 @@ class ServersSampleJsonTest(ServersSampleBase):
def test_servers_details(self):
uuid = self._post_server()
- self.stubs.Set(db, 'block_device_mapping_get_all_by_instance',
- fakes.stub_bdm_get_all_by_instance)
response = self._do_get('servers/detail')
subs = self._get_regexes()
subs['hostid'] = '[a-f0-9]+'