From dab02447e6a26ec0f98aaeabd800495d9c83d1a2 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 31 Jul 2025 15:44:24 +0100 Subject: [PATCH] api: Add response body schemas for server shares APIs We had missed one. Change-Id: Icc63959d73b1881b7db19b93cf8fb80dcb77cad8 Signed-off-by: Stephen Finucane --- nova/api/openstack/compute/schemas/server_shares.py | 2 ++ nova/api/openstack/compute/server_shares.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nova/api/openstack/compute/schemas/server_shares.py b/nova/api/openstack/compute/schemas/server_shares.py index 55876ac99655..5476e01c8ded 100644 --- a/nova/api/openstack/compute/schemas/server_shares.py +++ b/nova/api/openstack/compute/schemas/server_shares.py @@ -73,6 +73,8 @@ show_response = { 'additionalProperties': False } +delete_response = {'type': 'null'} + index_response = { 'title': 'Server shares', 'type': 'object', diff --git a/nova/api/openstack/compute/server_shares.py b/nova/api/openstack/compute/server_shares.py index 5171eedc1709..c7d85e03584a 100644 --- a/nova/api/openstack/compute/server_shares.py +++ b/nova/api/openstack/compute/server_shares.py @@ -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