api: Add response body schemas for servers APIs (6/6)
The last one: delete. Very simple, as always. Change-Id: I08a2dbcd86cf652e9cda193f64edfa655f986506 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
@@ -1771,6 +1771,8 @@ revert_resize_response = {'type': 'null'}
|
|||||||
|
|
||||||
reboot_response = {'type': 'null'}
|
reboot_response = {'type': 'null'}
|
||||||
|
|
||||||
|
delete_response = {'type': 'null'}
|
||||||
|
|
||||||
start_server_response = {'type': 'null'}
|
start_server_response = {'type': 'null'}
|
||||||
|
|
||||||
stop_server_response = {'type': 'null'}
|
stop_server_response = {'type': 'null'}
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ INVALID_FLAVOR_IMAGE_EXCEPTIONS = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@validation.validated
|
||||||
class ServersController(wsgi.Controller):
|
class ServersController(wsgi.Controller):
|
||||||
"""The Server API base controller class for the OpenStack API."""
|
"""The Server API base controller class for the OpenStack API."""
|
||||||
|
|
||||||
@@ -1143,6 +1144,7 @@ class ServersController(wsgi.Controller):
|
|||||||
|
|
||||||
@wsgi.response(204)
|
@wsgi.response(204)
|
||||||
@wsgi.expected_errors((404, 409))
|
@wsgi.expected_errors((404, 409))
|
||||||
|
@validation.response_body_schema(schema.delete_response)
|
||||||
def delete(self, req, id):
|
def delete(self, req, id):
|
||||||
"""Destroys a server."""
|
"""Destroys a server."""
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user