Merge "api: Add response body schemas for server shares APIs"
This commit is contained in:
@@ -73,6 +73,8 @@ show_response = {
|
||||
'additionalProperties': False
|
||||
}
|
||||
|
||||
delete_response = {'type': 'null'}
|
||||
|
||||
index_response = {
|
||||
'title': 'Server shares',
|
||||
'type': 'object',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user