

def prepare_ephemeral_drv(self, info, new_info, map_new_to_old_ids):
    info = copy.deepcopy(info)
    new_info = copy.deepcopy(new_info)
    for (new_id, old_id) in map_new_to_old_ids.iteritems():
        instance_old = info[INSTANCES][old_id]
        instance_new = new_info[INSTANCES][new_id]
        ephemeral_path_dst = instance_new[EPHEMERAL][PATH_SRC]
        instance_new[EPHEMERAL][PATH_DST] = ephemeral_path_dst
        ephemeral_host_dst = instance_new[EPHEMERAL][HOST_SRC]
        instance_new[EPHEMERAL][HOST_DST] = ephemeral_host_dst
        diff_path_dst = instance_new[DIFF][PATH_SRC]
        instance_new[DIFF][PATH_DST] = diff_path_dst
        diff_host_dst = instance_new[DIFF][HOST_SRC]
        instance_new[DIFF][HOST_DST] = diff_host_dst
        ephemeral_path_src = instance_old[EPHEMERAL][PATH_SRC]
        instance_new[EPHEMERAL][PATH_SRC] = ephemeral_path_src
        ephemeral_host_src = instance_old[EPHEMERAL][HOST_SRC]
        instance_new[EPHEMERAL][HOST_SRC] = ephemeral_host_src
        diff_path_src = instance_old[DIFF][PATH_SRC]
        instance_new[DIFF][PATH_SRC] = diff_path_src
        diff_host_src = instance_old[DIFF][HOST_SRC]
        instance_new[DIFF][HOST_SRC] = diff_host_src
    return new_info

dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/os/actions/transport_instance.py TransportInstance.prepare_ephemeral_drv/original