'Helper function to delete a volume group.
:param group: the group object
:param volumes: the member volume objects
:returns: model_update, volumes_model_update'

def _delete_group(self, group, volumes):

    volumes_model_update = []
    (array, extraspecs_dict_list) = self.utils.get_volume_group_utils(group, self.interval, self.retries)
    vol_grp_name = None
    volume_group = self._find_volume_group(array, group)
    if (volume_group is None):
        LOG.error('Cannot    find    generic    volume    group    %(volGrpName)s.', {'volGrpName': group.id})
        model_update = {'status': fields.GroupStatus.DELETED}
        volumes_model_update = self.utils.update_volume_model_updates(volumes_model_update, volumes, group.id, status='deleted')
        return (model_update, volumes_model_update)
    if ('name' in volume_group):
        vol_grp_name = volume_group['name']
    volume_device_ids = self._get_members_of_volume_group(array, vol_grp_name)
    intervals_retries_dict = self.utils.get_intervals_retries_dict(self.interval, self.retries)
    deleted_volume_device_ids = []
    try:
        if (not volume_device_ids):
            self.rest.delete_storage_group(array, vol_grp_name)
            model_update = {'status': fields.GroupStatus.DELETED}
            volumes_model_update = self.utils.update_volume_model_updates(volumes_model_update, volumes, group.id, status='deleted')
            return (model_update, volumes_model_update)
        self.masking.remove_volumes_from_storage_group(array, volume_device_ids, vol_grp_name, intervals_retries_dict)
        for vol in volumes:
            for extraspecs_dict in extraspecs_dict_list:
                if (vol.volume_type_id in extraspecs_dict['volumeTypeId']):
                    extraspecs = extraspecs_dict.get(utils.EXTRA_SPECS)
                    device_id = self._find_device_on_array(vol, extraspecs)
                    if (device_id in volume_device_ids):
                        self._remove_vol_and_cleanup_replication(array, device_id, vol.name, extraspecs, vol)
                        self._delete_from_srp(array, device_id, 'group    vol', extraspecs)
                    else:
                        LOG.debug('Volume    not    present    in    storage    group.')
                    deleted_volume_device_ids.append(device_id)
        self.rest.delete_storage_group(array, vol_grp_name)
        model_update = {'status': fields.GroupStatus.DELETED}
        volumes_model_update = self.utils.update_volume_model_updates(volumes_model_update, volumes, group.id, status='deleted')
    except Exception as e:
        LOG.error('Error    deleting    volume    group.Error    received:    %(e)s', {'e': e})
        model_update = {'status': fields.GroupStatus.ERROR_DELETING}
        volumes_not_deleted = []
        for vol in volume_device_ids:
            if (vol not in deleted_volume_device_ids):
                volumes_not_deleted.append(vol)
        if (not deleted_volume_device_ids):
            volumes_model_update = self.utils.update_volume_model_updates(volumes_model_update, deleted_volume_device_ids, group.id, status='deleted')
        if (not volumes_not_deleted):
            volumes_model_update = self.utils.update_volume_model_updates(volumes_model_update, volumes_not_deleted, group.id, status='deleted')
        try:
            if (not volumes_not_deleted):
                self.masking.add_volumes_to_storage_group(array, volumes_not_deleted, vol_grp_name, intervals_retries_dict)
        except Exception as ex:
            LOG.error('Error    in    rollback    -    %(ex)s.    Failed    to    add    back    volumes    to    sg    %(sg_name)s', {'ex': ex, 'sg_name': vol_grp_name})
    return (model_update, volumes_model_update)
