api: Add response body schemas for server shares APIs

We had missed one.

Change-Id: Icc63959d73b1881b7db19b93cf8fb80dcb77cad8
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2025-07-31 15:44:24 +01:00
parent f80e4935e8
commit dab02447e6
2 changed files with 4 additions and 0 deletions

View File

@@ -73,6 +73,8 @@ show_response = {
'additionalProperties': False
}
delete_response = {'type': 'null'}
index_response = {
'title': 'Server shares',
'type': 'object',

View File

@@ -38,6 +38,7 @@ def _get_instance_mapping(context, server_id):
raise webob.exc.HTTPNotFound(explanation=e.format_message())
@validation.validated
class ServerSharesController(wsgi.Controller):
_view_builder_class = server_shares.ViewBuilder
@@ -231,6 +232,7 @@ class ServerSharesController(wsgi.Controller):
@wsgi.api_version("2.97")
@wsgi.response(200)
@wsgi.expected_errors((400, 403, 404, 409))
@validation.response_body_schema(schema.delete_response)
def delete(self, req, server_id, id):
context = req.environ["nova.context"]
# Get instance mapping to query the required cell database