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