'Creates a new consistency group from an existing cg.
The new volumes will be in a consistent state, but this requires
taking a new temporary group snapshot and cloning from that.'

def _create_cg_from_cg(self, group, source_group, volumes, source_vols):

    pgroup_name = self._get_pgroup_name_from_id(source_group.id)
    tmp_suffix = ('%s-tmp' % uuid.uuid4())
    tmp_pgsnap_name = ('%(pgroup_name)s.%(pgsnap_suffix)s' % {'pgroup_name': pgroup_name, 'pgsnap_suffix': tmp_suffix})
    LOG.debug('Creating    temporary    Protection    Group    snapshot    %(snap_name)s    while    cloning    Consistency    Group    %(source_group)s.', {'snap_name': tmp_pgsnap_name, 'source_group': source_group.id})
    current_array = self._get_current_array()
    current_array.create_pgroup_snapshot(pgroup_name, suffix=tmp_suffix)
    try:
        for (source_vol, cloned_vol) in zip(source_vols, volumes):
            source_snap_name = self._get_pgroup_vol_snap_name(pgroup_name, tmp_suffix, self._get_vol_name(source_vol))
            cloned_vol_name = self._get_vol_name(cloned_vol)
            current_array.copy_volume(source_snap_name, cloned_vol_name)
            self._add_volume_to_consistency_group(group.id, cloned_vol_name)
    finally:
        self._delete_pgsnapshot(tmp_pgsnap_name)
