nova/nova/tests/unit/virt
Artom Lifshitz 8b9aa3e001 Use VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when rebasing
Previously, in swap_volume, the VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag
was not passed to virDomainBlockRebase. In the case of iSCSI-backed
disks, this caused the XML to change from <source dev=/dev/iscsi/lun>
to <source file=/dev/iscsi/lun>. This was a problem because
/dev/iscsi/lun is not a regular file. This patch passes the
VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag to virDomainBlockRebase, causing
the correct <source dev=/dev/iscsi/lun> to be generated upon
volume-update.

Conflicts:
      nova/tests/unit/virt/libvirt/test_driver.py
      nova/virt/libvirt/driver.py
      nova/virt/libvirt/guest.py

NOTE(mriedem): The conflicts are due to
fbcf8d6733 needing to translate
the exception message in driver.py and for passing instance
to disconnect_volume in test_driver, which was added in Pike with
b66b7d4f9d.

NOTE(artom): In stable/newton, the conflict in guest.py is due to a
different docstring for the rebase() method.

NOTE(artom): This backport squashes
5d5c5a5d92 to guard againt older libvirt
versions that don't have the VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag.

Change-Id: I868a0dae0baf8cded9c7c5807ea63ffc5eec0c5e
Closes-bug: 1691195
(cherry picked from commit a8a4a8ea7b)
(cherry picked from commit ef853e038d)
2017-10-18 12:58:32 -04:00
..
disk Guestfs handle no passwd or group in image 2017-01-11 18:18:45 +00:00
hyperv Hyper-V: fix image handling when shared storage is being used 2016-11-25 18:32:34 +00:00
image Use assert(Not)Equal instead of assertTrue(A == X) 2016-06-03 16:53:15 +01:00
ironic Ensure we mark baremetal links as phy links 2017-01-20 10:13:35 +00:00
libvirt Use VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when rebasing 2017-10-18 12:58:32 -04:00
vmwareapi Using get() method to prevent KeyError 2016-12-01 09:19:23 +00:00
xenapi Merge "Add support for vd2 user context to other drivers" 2016-08-31 02:40:59 +00:00
__init__.py
fakelibosinfo.py Fix misuse of assertTrue in console and virt tests 2016-02-22 16:09:21 +09:00
test_block_device.py Fix invalid uuid warnings in virt testcases 2016-06-02 18:24:12 +05:30
test_configdrive.py force_config_drive: StrOpt -> BoolOpt 2015-11-11 19:59:22 +00:00
test_diagnostics.py
test_driver.py Fix s390 "connector not found" issue 2017-03-09 11:19:10 +01:00
test_events.py
test_fake.py fake: fix public API signatures to match virt driver 2015-02-19 11:44:00 +00:00
test_firewall.py Add unit tests for nova.virt.firewall.IpTablesFirewallDriver (Part 4) 2016-08-16 13:55:30 +00:00
test_hardware.py libvirt: fix incorrect host cpus giving to emulator threads when RT 2016-11-03 20:53:17 +00:00
test_imagecache.py Remove mox from tests/unit/virt/test_imagecache.py 2016-06-16 23:40:01 +00:00
test_images.py Bump prlimit cpu time for qemu from 2 to 8 2016-12-12 12:48:03 +00:00
test_osinfo.py Fix misuse of assertTrue in console and virt tests 2016-02-22 16:09:21 +09:00
test_virt.py Replace stubs.Set with stub_out (os) 2016-01-14 22:35:53 -05:00
test_virt_drivers.py libvirt: Check if domain is persistent before detaching devices 2017-08-12 11:20:50 +10:00
test_volumeutils.py Switch to using os-brick 2015-07-27 10:47:22 -07:00