'Delete a group.'

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

    LOG.debug('delete    called    for    group    %s', id)
    context = req.environ['cinder.context']
    del_vol = False
    if body:
        if (not self.is_valid_body(body, 'delete')):
            msg = _("Missing    required    element    'delete'    in    request    body.")
            raise exc.HTTPBadRequest(explanation=msg)
        grp_body = body['delete']
        try:
            del_vol = strutils.bool_from_string(grp_body.get('delete-volumes', False), strict=True)
        except ValueError:
            msg = (_("Invalid    value    '%s'    for    delete-volumes    flag.") % del_vol)
            raise exc.HTTPBadRequest(explanation=msg)
    LOG.info('Delete    group    with    id:    %s', id, context=context)
    try:
        group = self.group_api.get(context, id)
        self._check_default_cgsnapshot_type(group.group_type_id)
        self.group_api.delete(context, group, del_vol)
    except exception.GroupNotFound:
        raise
    except exception.InvalidGroup as error:
        raise exc.HTTPBadRequest(explanation=error.msg)
    return webob.Response(status_int=http_client.ACCEPTED)
