'Reset status on generic group.'

def _reset_status(self, req, id, body):

    context = req.environ['cinder.context']
    try:
        status = body['reset_status']['status'].lower()
    except (TypeError, KeyError):
        raise exc.HTTPBadRequest(explanation=_("Must    specify    'status'"))
    LOG.debug("Updating    group    '%(id)s'    with    '%(update)s'", {'id': id, 'update': status})
    try:
        notifier = rpc.get_notifier('groupStatusUpdate')
        notifier.info(context, 'groups.reset_status.start', {'id': id, 'update': status})
        group = self.group_api.get(context, id)
        self.group_api.reset_status(context, group, status)
        notifier.info(context, 'groups.reset_status.end', {'id': id, 'update': status})
    except exception.GroupNotFound as error:
        notifier.error(context, 'groups.reset_status', {'error_message': error.msg, 'id': id})
        raise
    except exception.InvalidGroupStatus as error:
        notifier.error(context, 'groups.reset_status', {'error_message': error.msg, 'id': id})
        raise exc.HTTPBadRequest(explanation=error.msg)
    return webob.Response(status_int=http_client.ACCEPTED)
