nova/nova/virt/libvirt/volume
Matt Riedemann cafe3d066e libvirt: fix native luks encryption failure to find volume_id
Not all volume types put a 'volume_id' entry in the
connection_info['data'] dict. This change uses a new
utility method to look up the volume_id in the connection_info
data dict and if not found there, uses the 'serial' value
from the connection_info, which we know at least gets set
when the DriverVolumeBlockDevice code attaches the volume.

This also has to update pre_live_migration since the connection_info
dict doesn't have a 'volume_id' key in it. It's unclear what
this code was expecting, or if it ever really worked, but since
an attached volume represented by a BlockDeviceMapping here has
a volume_id attribute, we can just use that. As that code path
was never tested, this updates related unit tests and refactors
the tests to actually use the type of DriverVolumeBlockDevice
objects that the ComputeManager would be sending down to the
driver pre_live_migration method. The hard-to-read squashed
dicts in the tests are also re-formatted so a human can actually
read them.

Change-Id: Ie02d298cd92d5b5ebcbbcd2b0e8be01f197bfafb
Closes-Bug: #1746609
2018-02-02 15:00:30 -05:00
..
__init__.py libvirt: move volume/remotefs/quobyte modules under volume subdir 2015-07-28 17:46:05 -07:00
aoe.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
disco.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
drbd.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
fibrechannel.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
fs.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
gpfs.py libvirt: convert GPFS volume driver to LibvirtBaseFileSystemVolumeDriver 2015-08-10 09:34:39 +00:00
hgst.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
iscsi.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
iser.py Update libvirt volume drivers to use os-brick constants 2017-10-07 13:49:57 -05:00
mount.py Cleanup mount / umount and associated rmdir calls 2017-10-18 17:52:58 +11:00
net.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
nfs.py libvirt: Fix races with nfs volume mount/umount 2017-05-08 15:33:23 +00:00
quobyte.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
remotefs.py Cleanup mount / umount and associated rmdir calls 2017-10-18 17:52:58 +11:00
scaleio.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
smbfs.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
storpool.py Add the Nova libvirt StorPool attachment driver. 2018-01-24 00:01:42 +02:00
volume.py libvirt: fix native luks encryption failure to find volume_id 2018-02-02 15:00:30 -05:00
vrtshyperscale.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00
vzstorage.py Remove unused argument from LibvirtDriver._disconnect_volume 2017-12-17 07:12:04 +00:00