From 02132bd91b0a6a694f9c0cbb327e7298735ece66 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Sat, 12 Jan 2013 12:44:49 +1100 Subject: Fix incorrect comment, and move a variable close to use. Change-Id: Ifd10df2d6ce3844fb676cfb5c294de170cf375bf --- nova/virt/xenapi/vm_utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index ac35a4f2b..7bc9676a8 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -883,11 +883,6 @@ def generate_configdrive(session, instance, vm_ref, userdevice, try: with vdi_attached_here(session, vdi_ref, read_only=False) as dev: - dev_path = utils.make_dev_path(dev) - - # NOTE(mikal): libvirt supports injecting the admin password as - # well. This is not currently implemented for xenapi as it is not - # supported by the existing file injection extra_md = {} if admin_password: extra_md['admin_pass'] = admin_password @@ -899,6 +894,7 @@ def generate_configdrive(session, instance, vm_ref, userdevice, tmp_file = os.path.join(tmp_path, 'configdrive') cdb.make_drive(tmp_file) + dev_path = utils.make_dev_path(dev) utils.execute('dd', 'if=%s' % tmp_file, 'of=%s' % dev_path, -- cgit