server's action confirm_resize return 204 now, but it should be 202
@wsgi.response(202)
@wsgi.serializers(xml=FullServerTemplate)
@wsgi.deserializers(xml=ActionDeserializer)
@wsgi.action('confirm_resize')
def _action_confirm_resize(self, req, id, body):
context = req.environ['nova.context']
instance = self._get_server(context, req, id)
try:
self.compute_api.confirm_resize(context, instance)
except exception.MigrationNotFound:
msg = _("Instance has not been resized.")
raise exc.HTTPBadRequest(explanation=msg)
except exception.InstanceInvalidState as state_error:
common.raise_http_conflict_for_instance_invalid_state(state_error,
'confirm_resize')
return exc.HTTPNoContent()
The 'return exc.HTTPNoContent()' overwrite the '@wsgi.response(202)'
Fix in this patch:
https:/ /review. openstack. org/#/c/ 45596/