Merge "virt: Fix images test interaction"

This commit is contained in:
Jenkins 2015-03-04 01:24:45 +00:00 committed by Gerrit Code Review
commit 1c40d03378
1 changed files with 4 additions and 0 deletions

View File

@ -48,6 +48,10 @@ def qemu_img_info(path):
"""Return an object containing the parsed output from qemu-img info."""
# TODO(mikal): this code should not be referring to a libvirt specific
# flag.
# NOTE(sirp): The config option import must go here to avoid an import
# cycle
CONF.import_opt('images_type', 'nova.virt.libvirt.imagebackend',
group='libvirt')
if not os.path.exists(path) and CONF.libvirt.images_type != 'rbd':
msg = (_("Path does not exist %(path)s") % {'path': path})
raise exception.InvalidDiskInfo(reason=msg)