summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Still <mikal@stillhq.com>2013-01-12 12:44:49 +1100
committerMichael Still <mikal@stillhq.com>2013-01-12 12:44:49 +1100
commit02132bd91b0a6a694f9c0cbb327e7298735ece66 (patch)
treedc075a5cc3cbd67df223d0bd5772f62b314cebcf
parentb828391d524fb352e147f5924f7db3ebafcb00f0 (diff)
downloadnova-02132bd91b0a6a694f9c0cbb327e7298735ece66.tar.gz
nova-02132bd91b0a6a694f9c0cbb327e7298735ece66.tar.xz
nova-02132bd91b0a6a694f9c0cbb327e7298735ece66.zip
Fix incorrect comment, and move a variable close to use.
Change-Id: Ifd10df2d6ce3844fb676cfb5c294de170cf375bf
-rw-r--r--nova/virt/xenapi/vm_utils.py6
1 files changed, 1 insertions, 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,