'Driver entry point for deleting a consistency group.
:returns: Updated consistency group model and list of volume models
for the volumes that were deleted.'

@utils.trace_method
def delete_consistencygroup(self, context, group, volumes):

    model_update = {'status': fields.ConsistencyGroupStatus.DELETED}
    volumes_model_update = []
    for volume in volumes:
        try:
            self._delete_file(volume['id'], volume['name'])
            volumes_model_update.append({'id': volume['id'], 'status': 'deleted'})
        except Exception:
            volumes_model_update.append({'id': volume['id'], 'status': 'error_deleting'})
            LOG.exception('Volume    %(vol)s    in    the    consistency    group    could    not    be    deleted.', {'vol': volume})
    return (model_update, volumes_model_update)
