'Creates a CG from a either a cgsnapshot or group of cinder vols.
:returns: An implicit update for the volumes model that is
interpreted by the manager as a successful operation.'

@utils.trace_method
def create_consistencygroup_from_src(self, context, group, volumes, cgsnapshot=None, snapshots=None, source_cg=None, source_vols=None):

    LOG.debug('VOLUMES    %s    ', ',    '.join([vol['id'] for vol in volumes]))
    model_update = None
    volumes_model_update = []
    if cgsnapshot:
        vols = zip(volumes, snapshots)
        for (volume, snapshot) in vols:
            update = self.create_volume_from_snapshot(volume, snapshot)
            update['id'] = volume['id']
            volumes_model_update.append(update)
    elif (source_cg and source_vols):
        hosts = [source_vol['host'] for source_vol in source_vols]
        flexvols = self._get_flexvol_names_from_hosts(hosts)
        snapshot_name = ('snapshot-temp-' + source_cg['id'])
        self.zapi_client.create_cg_snapshot(flexvols, snapshot_name)
        vols = zip(volumes, source_vols)
        for (volume, source_vol) in vols:
            self._clone_backing_file_for_volume(source_vol['name'], volume['name'], source_vol['id'], source_snapshot=snapshot_name)
            volume_model_update = (self._get_volume_model_update(volume) or {})
            volume_model_update.update({'id': volume['id'], 'provider_location': source_vol['provider_location']})
            volumes_model_update.append(volume_model_update)
        for flexvol_name in flexvols:
            self.zapi_client.wait_for_busy_snapshot(flexvol_name, snapshot_name)
            self.zapi_client.delete_snapshot(flexvol_name, snapshot_name)
    else:
        LOG.error('Unexpected    set    of    parameters    received    when    creating    consistency    group    from    source.')
        model_update = {'status': fields.ConsistencyGroupStatus.ERROR}
    return (model_update, volumes_model_update)
