~yolanda.robla/nova/precise-security

« back to all changes in this revision

Viewing changes to plugins/xenserver/xenapi/etc/xapi.d/plugins/migration

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-02 10:56:30 UTC
  • mto: (79.1.1 precise-proposed)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: package-import@ubuntu.com-20111202105630-tjly1gpmdh533s0q
Tags: upstream-2012.1~e2~20111202.11641
ImportĀ upstreamĀ versionĀ 2012.1~e2~20111202.11641

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
def move_vhds_into_sr(session, args):
36
36
    """Moves the VHDs from their copied location to the SR"""
37
37
    params = pickle.loads(exists(args, 'params'))
38
 
    instance_id = params['instance_id']
 
38
    instance_uuid = params['instance_uuid']
39
39
 
40
40
    old_base_copy_uuid = params['old_base_copy_uuid']
41
41
    old_cow_uuid = params['old_cow_uuid']
48
48
 
49
49
    # Discover the copied VHDs locally, and then set up paths to copy
50
50
    # them to under the SR
51
 
    source_image_path = "/images/instance%d" % instance_id
 
51
    source_image_path = "/images/instance%s" % instance_uuid
52
52
    source_base_copy_path = "%s/%s.vhd" % (source_image_path,
53
53
            old_base_copy_uuid)
54
54
    source_cow_path = "%s/%s.vhd" % (source_image_path, old_cow_uuid)
55
55
 
56
 
    temp_vhd_path = "%s/instance%d/" % (sr_temp_path, instance_id)
 
56
    temp_vhd_path = "%s/instance%s/" % (sr_temp_path, instance_uuid)
57
57
    new_base_copy_path = "%s/%s.vhd" % (temp_vhd_path, new_base_copy_uuid)
58
58
    new_cow_path = "%s/%s.vhd" % (temp_vhd_path, new_cow_uuid)
59
59
 
89
89
def transfer_vhd(session, args):
90
90
    """Rsyncs a VHD to an adjacent host"""
91
91
    params = pickle.loads(exists(args, 'params'))
92
 
    instance_id = params['instance_id']
 
92
    instance_uuid = params['instance_uuid']
93
93
    host = params['host']
94
94
    vdi_uuid = params['vdi_uuid']
95
95
    sr_path = params['sr_path']
96
96
    vhd_path = "%s.vhd" % vdi_uuid
97
97
 
98
98
    source_path = "%s/%s" % (sr_path, vhd_path)
99
 
    dest_path = '%s:/images/instance%d/' % (host, instance_id)
 
99
    dest_path = '%s:/images/instance%s/' % (host, instance_uuid)
100
100
 
101
101
    logging.debug("Preparing to transmit %s to %s" % (source_path,
102
102
            dest_path))