diff options
| author | Brian Lamar <brian.lamar@rackspace.com> | 2012-12-10 14:29:34 -0500 |
|---|---|---|
| committer | Brian Lamar <brian.lamar@rackspace.com> | 2012-12-10 17:24:47 -0500 |
| commit | ee1b598ef1fe2435bc98411ff1403fade735475a (patch) | |
| tree | a28e69d9f025f00707b58da58fd0009792817d89 /tools | |
| parent | 8b4bbb7a668d354159688c6ac8c7f82ca620fb42 (diff) | |
| download | nova-ee1b598ef1fe2435bc98411ff1403fade735475a.tar.gz nova-ee1b598ef1fe2435bc98411ff1403fade735475a.tar.xz nova-ee1b598ef1fe2435bc98411ff1403fade735475a.zip | |
Correctly init XenAPIDriver in vm_vdi_cleaner.py
Fixes bug 1088615
Change-Id: Iaf0569fd45ed180d141dc0367c547f014b7502e1
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/xenserver/vm_vdi_cleaner.py | 5 |
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: |
