diff options
| author | Rafi Khardalian <rafi@metacloud.com> | 2012-09-16 16:28:58 +0000 |
|---|---|---|
| committer | Rafi Khardalian <rafi@metacloud.com> | 2012-09-04 12:13:45 +0000 |
| commit | b01ec8012a2a2568feb5fa05a56909a6bdf14ef8 (patch) | |
| tree | 643d053b51b5cfae51c8293fdd50c1401a0c5a22 /nova/tests | |
| parent | 0ffff7c490d54f9b932df4b2dcd62158242dae2a (diff) | |
Re-attach volumes after instance resize
Fixes bug 1051600.
Update the compute manager to pass block_device_info to three
additional driver entry points and update all virtualization drivers
to accept it as an optional argument.
Within libvirt, migrate_disk_and_power_off() will now iterate and disconnect
any existing connections. finish_migration() simply updates its use
of to_xml(), passing block_device_info, which returns a libvirt XML
fully populated with volumes. Finally, finish_revert_migration() no
longer uses the on-disk XML file, instead generating it via to_xml; as
the former lacks volume configuration.
Change-Id: I7dccd03ef9cc7d2848f07764d4def3787e41e202
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_libvirt.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 19839c56e..14a1ec95f 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -3736,7 +3736,8 @@ class LibvirtDriverTestCase(test.TestCase): def fake_extend(path, size): pass - def fake_to_xml(instance, network_info): + def fake_to_xml(instance, network_info, image_meta=None, rescue=None, + block_device_info=None): return "" def fake_plug_vifs(instance, network_info): @@ -3802,6 +3803,11 @@ class LibvirtDriverTestCase(test.TestCase): def fake_get_info(instance): return {'state': power_state.RUNNING} + def fake_to_xml(instance, network_info, image_meta=None, rescue=None, + block_device_info=None): + return "" + + self.stubs.Set(self.libvirtconnection, 'to_xml', fake_to_xml) self.stubs.Set(self.libvirtconnection, 'plug_vifs', fake_plug_vifs) self.stubs.Set(utils, 'execute', fake_execute) fw = base_firewall.NoopFirewallDriver() |
