@wsgi.response(202)
    @extensions.expected_errors((404, 409, 403))
    @wsgi.action('restore')
    def _restore(self, req, id, body):
        context = req.environ["nova.context"]
        authorize(context)
        instance = common.get_instance(self.compute_api, context, id)
        try:
            self.compute_api.restore(context, instance)
        except exception.InstanceUnknownCell as error:
            raise webob.exc.HTTPNotFound(explanation=error.format_message())
        except exception.QuotaError as error:
            raise webob.exc.HTTPForbidden(explanation=error.format_message())
        except exception.InstanceInvalidState as state_error:
            common.raise_http_conflict_for_instance_invalid_state(state_error,
                    'restore', id)
Restore a previously deleted instance.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/deferred_delete.py/DeferredDeleteController._restore