'Creates a consistencygroup from cgsnapshot or source cg.'

def create_consistencygroup_from_src(self, context, group, volumes, cgsnapshot=None, snapshots=None, soure_cg=None, source_vols=None):

    for vol in volumes:
        try:
            if snapshots:
                for snapshot in snapshots:
                    if (vol['snapshot_id'] == snapshot['id']):
                        self.create_volume_from_snapshot(vol, snapshot)
                        break
        except Exception:
            raise
        try:
            if source_vols:
                for source_vol in source_vols:
                    if (vol['source_volid'] == source_vol['id']):
                        self.create_cloned_volume(vol, source_vol)
                        break
        except Exception:
            raise
    return (None, None)
