'Deletes a group.
:param context: the context of the caller.
:param group: the group object.
:param volumes: a list of volume objects in the group.
:returns: model_update, volumes_model_update
ScaleIO will delete the volumes of the CG.'

def delete_group(self, context, group, volumes):

    if (not volume_utils.is_group_a_cg_snapshot_type(group)):
        raise NotImplementedError()
    LOG.info('Deleting    Group')
    model_update = {'status': fields.GroupStatus.DELETED}
    error_statuses = [fields.GroupStatus.ERROR, fields.GroupStatus.ERROR_DELETING]
    volumes_model_update = []
    for volume in volumes:
        try:
            self._delete_volume(volume['provider_id'])
            update_item = {'id': volume['id'], 'status': 'deleted'}
            volumes_model_update.append(update_item)
        except exception.VolumeBackendAPIException as err:
            update_item = {'id': volume['id'], 'status': 'error_deleting'}
            volumes_model_update.append(update_item)
            if (model_update['status'] not in error_statuses):
                model_update['status'] = 'error_deleting'
            LOG.error('Failed    to    delete    the    volume    %(vol)s    of    group.    Exception:    %(exception)s.', {'vol': volume['name'], 'exception': err})
    return (model_update, volumes_model_update)
