Revert "Include list of attached volumes with instance info"
This reverts commit dd66f235ec
.
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
This commit is contained in:
parent
1e9937e327
commit
56f5172f33
@ -51,8 +51,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-12-02T02:11:56Z",
|
"updated": "2012-12-02T02:11:56Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -51,7 +51,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-12-02T02:11:56Z",
|
"updated": "2012-12-02T02:11:56Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-12-02T02:11:55Z",
|
"updated": "2012-12-02T02:11:55Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-12-02T02:11:58Z",
|
"updated": "2012-12-02T02:11:58Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-01-30T13:38:49Z",
|
"updated": "2013-01-30T13:38:49Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-01-30T13:26:52Z",
|
"updated": "2013-01-30T13:26:52Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-07T18:46:29Z",
|
"updated": "2013-02-07T18:46:29Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-07T18:40:59Z",
|
"updated": "2013-02-07T18:40:59Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-07T18:46:29Z",
|
"updated": "2013-02-07T18:46:29Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -51,8 +51,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-07T18:40:59Z",
|
"updated": "2013-02-07T18:40:59Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -52,7 +52,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-11-15T19:27:04Z",
|
"updated": "2012-11-15T19:27:04Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -53,8 +53,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-11-15T19:27:05Z",
|
"updated": "2012-11-15T19:27:05Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -52,7 +52,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-07T19:35:10Z",
|
"updated": "2013-02-07T19:35:10Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -53,8 +53,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-12-05T07:34:10Z",
|
"updated": "2012-12-05T07:34:10Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -51,7 +51,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-09-25T13:36:09Z",
|
"updated": "2012-09-25T13:36:09Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -66,10 +66,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-07T18:58:57Z",
|
"updated": "2013-02-07T18:58:57Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
OS-EXT-IPS-MAC:mac_addr="00:0c:29:e1:42:90"/>
|
OS-EXT-IPS-MAC:mac_addr="00:0c:29:e1:42:90"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="http://openstack.example.com/v2/openstack/servers/6be39927-53b2-4aee-8593-1c72b3673168" rel="self"/>
|
<atom:link href="http://openstack.example.com/v2/openstack/servers/6be39927-53b2-4aee-8593-1c72b3673168" rel="self"/>
|
||||||
<atom:link href="http://openstack.example.com/openstack/servers/6be39927-53b2-4aee-8593-1c72b3673168" rel="bookmark"/>
|
<atom:link href="http://openstack.example.com/openstack/servers/6be39927-53b2-4aee-8593-1c72b3673168" rel="bookmark"/>
|
||||||
<security_groups>
|
<security_groups>
|
||||||
|
@ -67,11 +67,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-07T18:58:57Z",
|
"updated": "2013-02-07T18:58:57Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
<ip OS-EXT-IPS:type="fixed" version="4" addr="192.168.0.3" OS-EXT-IPS-MAC:mac_addr="00:0c:29:e1:42:90"/>
|
<ip OS-EXT-IPS:type="fixed" version="4" addr="192.168.0.3" OS-EXT-IPS-MAC:mac_addr="00:0c:29:e1:42:90"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="http://openstack.example.com/v2/openstack/servers/b45edf9d-30f6-41e8-a00b-ef8962376586" rel="self"/>
|
<atom:link href="http://openstack.example.com/v2/openstack/servers/b45edf9d-30f6-41e8-a00b-ef8962376586" rel="self"/>
|
||||||
<atom:link href="http://openstack.example.com/openstack/servers/b45edf9d-30f6-41e8-a00b-ef8962376586" rel="bookmark"/>
|
<atom:link href="http://openstack.example.com/openstack/servers/b45edf9d-30f6-41e8-a00b-ef8962376586" rel="bookmark"/>
|
||||||
<security_groups>
|
<security_groups>
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-04T13:17:51Z",
|
"updated": "2013-02-04T13:17:51Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -51,8 +51,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2013-02-04T13:21:44Z",
|
"updated": "2013-02-04T13:21:44Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -49,10 +49,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-12-19T20:32:42Z",
|
"updated": "2012-12-19T20:32:42Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,8 +14,6 @@
|
|||||||
<ip version="4" addr="192.168.0.3"/>
|
<ip version="4" addr="192.168.0.3"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="http://openstack.example.com/v2/openstack/servers/b8b02dd4-b2bb-441d-b52a-ee5c89c832d2" rel="self"/>
|
<atom:link href="http://openstack.example.com/v2/openstack/servers/b8b02dd4-b2bb-441d-b52a-ee5c89c832d2" rel="self"/>
|
||||||
<atom:link href="http://openstack.example.com/openstack/servers/b8b02dd4-b2bb-441d-b52a-ee5c89c832d2" rel="bookmark"/>
|
<atom:link href="http://openstack.example.com/openstack/servers/b8b02dd4-b2bb-441d-b52a-ee5c89c832d2" rel="bookmark"/>
|
||||||
</server>
|
</server>
|
@ -50,11 +50,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-12-19T20:32:39Z",
|
"updated": "2012-12-19T20:32:39Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -15,8 +15,6 @@
|
|||||||
<ip version="4" addr="192.168.0.3"/>
|
<ip version="4" addr="192.168.0.3"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="http://openstack.example.com/v2/openstack/servers/55db7849-8ec4-46dd-8897-492d82282f29" rel="self"/>
|
<atom:link href="http://openstack.example.com/v2/openstack/servers/55db7849-8ec4-46dd-8897-492d82282f29" rel="self"/>
|
||||||
<atom:link href="http://openstack.example.com/openstack/servers/55db7849-8ec4-46dd-8897-492d82282f29" rel="bookmark"/>
|
<atom:link href="http://openstack.example.com/openstack/servers/55db7849-8ec4-46dd-8897-492d82282f29" rel="bookmark"/>
|
||||||
</server>
|
</server>
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
"status": "RESCUE",
|
"status": "RESCUE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-09-19T09:22:27Z",
|
"updated": "2012-09-19T09:22:27Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -49,7 +49,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-09-19T09:22:28Z",
|
"updated": "2012-09-19T09:22:28Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-09-12T17:20:37Z",
|
"updated": "2012-09-12T17:20:37Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -49,10 +49,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-08-20T21:11:09Z",
|
"updated": "2012-08-20T21:11:09Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,8 +14,6 @@
|
|||||||
<ip version="4" addr="192.168.0.3"/>
|
<ip version="4" addr="192.168.0.3"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="http://openstack.example.com/v2/openstack/servers/3f9f7d18-aaf3-4703-b368-ea9b4d609c95" rel="self"/>
|
<atom:link href="http://openstack.example.com/v2/openstack/servers/3f9f7d18-aaf3-4703-b368-ea9b4d609c95" rel="self"/>
|
||||||
<atom:link href="http://openstack.example.com/openstack/servers/3f9f7d18-aaf3-4703-b368-ea9b4d609c95" rel="bookmark"/>
|
<atom:link href="http://openstack.example.com/openstack/servers/3f9f7d18-aaf3-4703-b368-ea9b4d609c95" rel="bookmark"/>
|
||||||
</server>
|
</server>
|
@ -50,11 +50,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "2012-09-07T16:56:37Z",
|
"updated": "2012-09-07T16:56:37Z",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -15,8 +15,6 @@
|
|||||||
<ip version="4" addr="192.168.0.3"/>
|
<ip version="4" addr="192.168.0.3"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="http://openstack.example.com/v2/openstack/servers/7c3c0f79-343e-4b99-93bc-2ade47641e64" rel="self"/>
|
<atom:link href="http://openstack.example.com/v2/openstack/servers/7c3c0f79-343e-4b99-93bc-2ade47641e64" rel="self"/>
|
||||||
<atom:link href="http://openstack.example.com/openstack/servers/7c3c0f79-343e-4b99-93bc-2ade47641e64" rel="bookmark"/>
|
<atom:link href="http://openstack.example.com/openstack/servers/7c3c0f79-343e-4b99-93bc-2ade47641e64" rel="bookmark"/>
|
||||||
</server>
|
</server>
|
||||||
|
@ -98,11 +98,6 @@ def make_server(elem, detailed=False):
|
|||||||
# Attach addresses node
|
# Attach addresses node
|
||||||
elem.append(ips.AddressesTemplate())
|
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')
|
xmlutil.make_links(elem, 'links')
|
||||||
|
|
||||||
|
|
||||||
@ -500,13 +495,6 @@ class Controller(wsgi.Controller):
|
|||||||
|
|
||||||
return instances
|
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):
|
def _get_servers(self, req, is_detail):
|
||||||
"""Returns a list of servers, based on any search options specified."""
|
"""Returns a list of servers, based on any search options specified."""
|
||||||
|
|
||||||
@ -574,7 +562,6 @@ class Controller(wsgi.Controller):
|
|||||||
|
|
||||||
if is_detail:
|
if is_detail:
|
||||||
self._add_instance_faults(context, instance_list)
|
self._add_instance_faults(context, instance_list)
|
||||||
self._add_instance_volumes(context, instance_list)
|
|
||||||
response = self._view_builder.detail(req, instance_list)
|
response = self._view_builder.detail(req, instance_list)
|
||||||
else:
|
else:
|
||||||
response = self._view_builder.index(req, instance_list)
|
response = self._view_builder.index(req, instance_list)
|
||||||
@ -751,7 +738,6 @@ class Controller(wsgi.Controller):
|
|||||||
instance = self.compute_api.get(context, id)
|
instance = self.compute_api.get(context, id)
|
||||||
req.cache_db_instance(instance)
|
req.cache_db_instance(instance)
|
||||||
self._add_instance_faults(context, [instance])
|
self._add_instance_faults(context, [instance])
|
||||||
self._add_instance_volumes(context, [instance])
|
|
||||||
return self._view_builder.show(req, instance)
|
return self._view_builder.show(req, instance)
|
||||||
except exception.NotFound:
|
except exception.NotFound:
|
||||||
msg = _("Instance could not be found")
|
msg = _("Instance could not be found")
|
||||||
|
@ -108,8 +108,6 @@ class ViewBuilder(common.ViewBuilder):
|
|||||||
"links": self._get_links(request,
|
"links": self._get_links(request,
|
||||||
instance["uuid"],
|
instance["uuid"],
|
||||||
self._collection_name),
|
self._collection_name),
|
||||||
"volumes_attached": [{'id': vol_id} for vol_id in
|
|
||||||
instance.get("volumes_attached", [])],
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
_inst_fault = self._get_fault(request, instance)
|
_inst_fault = self._get_fault(request, instance)
|
||||||
|
@ -314,7 +314,6 @@ class ServersControllerTest(test.TestCase):
|
|||||||
"href": "http://localhost/fake/servers/%s" % uuid,
|
"href": "http://localhost/fake/servers/%s" % uuid,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,7 +380,6 @@ class ServersControllerTest(test.TestCase):
|
|||||||
"href": "http://localhost/fake/servers/%s" % uuid,
|
"href": "http://localhost/fake/servers/%s" % uuid,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,79 +449,11 @@ class ServersControllerTest(test.TestCase):
|
|||||||
"href": "http://localhost/fake/servers/%s" % uuid,
|
"href": "http://localhost/fake/servers/%s" % uuid,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.assertThat(res_dict, matchers.DictMatches(expected_server))
|
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):
|
def test_get_server_addresses_from_cache(self):
|
||||||
pub0 = ('172.19.0.1', '172.19.0.2',)
|
pub0 = ('172.19.0.1', '172.19.0.2',)
|
||||||
pub1 = ('1.2.3.4',)
|
pub1 = ('1.2.3.4',)
|
||||||
@ -4272,7 +4202,6 @@ class ServersViewBuilderTest(test.TestCase):
|
|||||||
"href": bookmark_link,
|
"href": bookmark_link,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4351,7 +4280,6 @@ class ServersViewBuilderTest(test.TestCase):
|
|||||||
"message": "HTTPNotFound",
|
"message": "HTTPNotFound",
|
||||||
"details": "Stock details for test",
|
"details": "Stock details for test",
|
||||||
},
|
},
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4492,7 +4420,6 @@ class ServersViewBuilderTest(test.TestCase):
|
|||||||
"href": bookmark_link,
|
"href": bookmark_link,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4555,7 +4482,6 @@ class ServersViewBuilderTest(test.TestCase):
|
|||||||
"href": bookmark_link,
|
"href": bookmark_link,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4618,7 +4544,6 @@ class ServersViewBuilderTest(test.TestCase):
|
|||||||
"href": bookmark_link,
|
"href": bookmark_link,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4683,78 +4608,12 @@ class ServersViewBuilderTest(test.TestCase):
|
|||||||
"href": bookmark_link,
|
"href": bookmark_link,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"volumes_attached": [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
output = self.view_builder.show(self.request, self.instance)
|
output = self.view_builder.show(self.request, self.instance)
|
||||||
self.assertThat(output, matchers.DictMatches(expected_server))
|
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):
|
class ServerXMLSerializationTest(test.TestCase):
|
||||||
|
|
||||||
|
@ -631,7 +631,3 @@ def stub_snapshot_get_all(self, context):
|
|||||||
return [stub_snapshot(100, project_id='fake'),
|
return [stub_snapshot(100, project_id='fake'),
|
||||||
stub_snapshot(101, project_id='superfake'),
|
stub_snapshot(101, project_id='superfake'),
|
||||||
stub_snapshot(102, project_id='superduperfake')]
|
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'}]
|
|
||||||
|
@ -51,8 +51,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"progress": 0,
|
"progress": 0,
|
||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,7 @@
|
|||||||
"progress": 0,
|
"progress": 0,
|
||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
"hostId": "%(hostid)s",
|
"hostId": "%(hostid)s",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"My Server Name": "Apache1"
|
"My Server Name": "Apache1"
|
||||||
},
|
}
|
||||||
"volumes_attached": []
|
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
"hostId": "%(hostid)s",
|
"hostId": "%(hostid)s",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"My Server Name": "Apache1"
|
"My Server Name": "Apache1"
|
||||||
},
|
}
|
||||||
"volumes_attached": []
|
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -53,8 +53,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -52,7 +52,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,6 @@
|
|||||||
"hostId": "%(hostid)s",
|
"hostId": "%(hostid)s",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"My Server Name": "Apache1"
|
"My Server Name": "Apache1"
|
||||||
},
|
}
|
||||||
"volumes_attached": []
|
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,10 +66,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
OS-EXT-IPS-MAC:mac_addr="%(mac_addr)s"/>
|
OS-EXT-IPS-MAC:mac_addr="%(mac_addr)s"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
||||||
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
||||||
<security_groups>
|
<security_groups>
|
||||||
|
@ -67,11 +67,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
OS-EXT-IPS-MAC:mac_addr="%(mac_addr)s"/>
|
OS-EXT-IPS-MAC:mac_addr="%(mac_addr)s"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
||||||
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
||||||
<security_groups>
|
<security_groups>
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,10 +49,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
<ip version="4" addr="%(ip)s"/>
|
<ip version="4" addr="%(ip)s"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
||||||
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
||||||
</server>
|
</server>
|
||||||
|
@ -50,11 +50,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
<ip version="4" addr="%(ip)s"/>
|
<ip version="4" addr="%(ip)s"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
||||||
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
||||||
</server>
|
</server>
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
"status": "%(status)s",
|
"status": "%(status)s",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
"status": "%(status)s",
|
"status": "%(status)s",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,10 +49,6 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
<ip version="4" addr="%(ip)s"/>
|
<ip version="4" addr="%(ip)s"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
||||||
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
||||||
</server>
|
</server>
|
||||||
|
@ -50,11 +50,7 @@
|
|||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"tenant_id": "openstack",
|
"tenant_id": "openstack",
|
||||||
"updated": "%(timestamp)s",
|
"updated": "%(timestamp)s",
|
||||||
"user_id": "fake",
|
"user_id": "fake"
|
||||||
"volumes_attached": [
|
|
||||||
{"id": "volume_id1"},
|
|
||||||
{"id": "volume_id2"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
<ip version="4" addr="%(ip)s"/>
|
<ip version="4" addr="%(ip)s"/>
|
||||||
</network>
|
</network>
|
||||||
</addresses>
|
</addresses>
|
||||||
<volume_attached id="volume_id1"/>
|
|
||||||
<volume_attached id="volume_id2"/>
|
|
||||||
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
<atom:link href="%(host)s/v2/openstack/servers/%(id)s" rel="self"/>
|
||||||
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
<atom:link href="%(host)s/openstack/servers/%(id)s" rel="bookmark"/>
|
||||||
</server>
|
</server>
|
||||||
|
@ -459,8 +459,6 @@ class ServersSampleJsonTest(ServersSampleBase):
|
|||||||
|
|
||||||
def test_servers_get(self):
|
def test_servers_get(self):
|
||||||
uuid = self.test_servers_post()
|
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)
|
response = self._do_get('servers/%s' % uuid)
|
||||||
subs = self._get_regexes()
|
subs = self._get_regexes()
|
||||||
subs['hostid'] = '[a-f0-9]+'
|
subs['hostid'] = '[a-f0-9]+'
|
||||||
@ -478,8 +476,6 @@ class ServersSampleJsonTest(ServersSampleBase):
|
|||||||
|
|
||||||
def test_servers_details(self):
|
def test_servers_details(self):
|
||||||
uuid = self._post_server()
|
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')
|
response = self._do_get('servers/detail')
|
||||||
subs = self._get_regexes()
|
subs = self._get_regexes()
|
||||||
subs['hostid'] = '[a-f0-9]+'
|
subs['hostid'] = '[a-f0-9]+'
|
||||||
|
Loading…
Reference in New Issue
Block a user