'Permit Admins to unpause the server.'

@wsgi.response(202)
@extensions.expected_errors((404, 409, 501))
@wsgi.action('unpause')
def _unpause(self, req, id, body):

    ctxt = req.environ['nova.context']
    ctxt.can((ps_policies.POLICY_ROOT % 'unpause'))
    server = common.get_instance(self.compute_api, ctxt, id)
    try:
        self.compute_api.unpause(ctxt, server)
    except exception.InstanceIsLocked as e:
        raise exc.HTTPConflict(explanation=e.format_message())
    except exception.InstanceInvalidState as state_error:
        common.raise_http_conflict_for_instance_invalid_state(state_error, 'unpause', id)
    except (exception.InstanceUnknownCell, exception.InstanceNotFound) as e:
        raise exc.HTTPNotFound(explanation=e.format_message())
    except NotImplementedError:
        common.raise_feature_not_supported()
