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:
Stephen Finucane
2024-11-29 13:04:09 +00:00
parent 9fd431315c
commit f80e4935e8
2 changed files with 4 additions and 0 deletions
@@ -1771,6 +1771,8 @@ revert_resize_response = {'type': 'null'}
reboot_response = {'type': 'null'}
delete_response = {'type': 'null'}
start_server_response = {'type': 'null'}
stop_server_response = {'type': 'null'}
+2
View File
@@ -89,6 +89,7 @@ INVALID_FLAVOR_IMAGE_EXCEPTIONS = (
)
@validation.validated
class ServersController(wsgi.Controller):
"""The Server API base controller class for the OpenStack API."""
@@ -1143,6 +1144,7 @@ class ServersController(wsgi.Controller):
@wsgi.response(204)
@wsgi.expected_errors((404, 409))
@validation.response_body_schema(schema.delete_response)
def delete(self, req, id):
"""Destroys a server."""
try: