summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-12-11 00:51:57 +0000
committerGerrit Code Review <review@openstack.org>2012-12-11 00:51:57 +0000
commitfcedc02a6f320681ae20bc1641c8bf6cd519885e (patch)
tree7c06024ea8c96edc48b57ccc8f38716dfea28e5d
parente8df8b3ff5342bb66ac4778974508c502eb6135a (diff)
parentee1b598ef1fe2435bc98411ff1403fade735475a (diff)
downloadnova-fcedc02a6f320681ae20bc1641c8bf6cd519885e.tar.gz
nova-fcedc02a6f320681ae20bc1641c8bf6cd519885e.tar.xz
nova-fcedc02a6f320681ae20bc1641c8bf6cd519885e.zip
Merge "Correctly init XenAPIDriver in vm_vdi_cleaner.py"
-rwxr-xr-xtools/xenserver/vm_vdi_cleaner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/xenserver/vm_vdi_cleaner.py b/tools/xenserver/vm_vdi_cleaner.py
index d0ec2d6a8..06c7a2173 100755
--- a/tools/xenserver/vm_vdi_cleaner.py
+++ b/tools/xenserver/vm_vdi_cleaner.py
@@ -32,6 +32,7 @@ from nova import db
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import timeutils
+from nova.virt import virtapi
from nova.virt.xenapi import driver as xenapi_driver
@@ -285,7 +286,9 @@ def main():
raise Exception("`zombie_instance_updated_at_window` has to be longer"
" than `resize_confirm_window`.")
- xenapi = xenapi_driver.XenAPIDriver()
+ # NOTE(blamar) This tool does not require DB access, so passing in the
+ # 'abstract' VirtAPI class is acceptable
+ xenapi = xenapi_driver.XenAPIDriver(virtapi.VirtAPI())
if command == "list-vdis":
if CONF.verbose: