From d1414c8a4f44484a4b4c39d9ba5f8a9d386f696b Mon Sep 17 00:00:00 2001 From: Alessandro Pilotti Date: Fri, 1 Mar 2013 02:23:48 +0200 Subject: Fixes the Hyper-V driver's method signature Fixes Bug: 1132772 Corrects an issue in the Hyper-V driver's destroy method argument list. Change-Id: Ieb15df80a2d3738a46f7bdd56ba0de57b68fac14 --- nova/tests/test_hypervapi.py | 2 +- nova/virt/hyperv/driver.py | 5 +++-- nova/virt/hyperv/vmops.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nova/tests/test_hypervapi.py b/nova/tests/test_hypervapi.py index 5912bb301..aaceff8ec 100644 --- a/nova/tests/test_hypervapi.py +++ b/nova/tests/test_hypervapi.py @@ -516,7 +516,7 @@ class HyperVAPITestCase(test.TestCase): self._setup_destroy_mocks() self._mox.ReplayAll() - self._conn.destroy(self._instance_data) + self._conn.destroy(self._instance_data, None) self._mox.VerifyAll() def test_live_migration(self): diff --git a/nova/virt/hyperv/driver.py b/nova/virt/hyperv/driver.py index aac47deef..491aaa2fe 100755 --- a/nova/virt/hyperv/driver.py +++ b/nova/virt/hyperv/driver.py @@ -57,9 +57,10 @@ class HyperVDriver(driver.ComputeDriver): block_device_info=None): self._vmops.reboot(instance, network_info, reboot_type) - def destroy(self, instance, network_info=None, cleanup=True, + def destroy(self, instance, network_info, block_device_info=None, destroy_disks=True): - self._vmops.destroy(instance, network_info, cleanup, destroy_disks) + self._vmops.destroy(instance, network_info, block_device_info, + destroy_disks) def get_info(self, instance): return self._vmops.get_info(instance) diff --git a/nova/virt/hyperv/vmops.py b/nova/virt/hyperv/vmops.py index c7a4e5468..f488e993f 100644 --- a/nova/virt/hyperv/vmops.py +++ b/nova/virt/hyperv/vmops.py @@ -241,7 +241,7 @@ class VMOps(object): create_dir=False, remove_dir=True) - def destroy(self, instance, network_info=None, cleanup=True, + def destroy(self, instance, network_info=None, block_device_info=None, destroy_disks=True): instance_name = instance['name'] LOG.info(_("Got request to destroy instance: %s"), instance_name) -- cgit