'Reset status on group snapshots'

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('groupSnapshotStatusUpdate')
        notifier.info(context, 'groupsnapshots.reset_status.start', {'id': id, 'update': status})
        gsnapshot = self.group_snapshot_api.get_group_snapshot(context, id)
        self.group_snapshot_api.reset_group_snapshot_status(context, gsnapshot, status)
        notifier.info(context, 'groupsnapshots.reset_status.end', {'id': id, 'update': status})
    except exception.GroupSnapshotNotFound as error:
        notifier.error(context, 'groupsnapshots.reset_status', {'error_message': error.msg, 'id': id})
        raise
    except exception.InvalidGroupSnapshotStatus as error:
        notifier.error(context, 'groupsnapshots.reset_status', {'error_message': error.msg, 'id': id})
        raise exc.HTTPBadRequest(explanation=error.msg)
    return webob.Response(status_int=http_client.ACCEPTED)
