From 2cb47fbabf09ced76178e8453d508c66f86a7a3a Mon Sep 17 00:00:00 2001 From: Arata Notsu Date: Thu, 18 Oct 2012 22:40:01 +0900 Subject: Remove ComputeDriver.update_host_status() Nobody calls the method. Change-Id: Ib585f769788753c64e19fe49a1f186880e1c6f49 --- nova/tests/test_virt_drivers.py | 5 ----- nova/virt/baremetal/driver.py | 5 ----- nova/virt/driver.py | 4 ---- nova/virt/fake.py | 4 ---- nova/virt/hyperv/driver.py | 4 ---- nova/virt/libvirt/driver.py | 8 -------- nova/virt/xenapi/driver.py | 5 ----- 7 files changed, 35 deletions(-) diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py index 05fe140d1..d5a2203f3 100644 --- a/nova/tests/test_virt_drivers.py +++ b/nova/tests/test_virt_drivers.py @@ -458,11 +458,6 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase): self.assertIn('host_memory_total', host_status) self.assertIn('host_memory_free', host_status) - @catch_notimplementederror - def test_update_host_status(self): - host_status = self.connection.update_host_status() - self._check_host_status_fields(host_status) - @catch_notimplementederror def test_get_host_stats(self): host_status = self.connection.get_host_stats() diff --git a/nova/virt/baremetal/driver.py b/nova/virt/baremetal/driver.py index e0941c37c..544e38c17 100644 --- a/nova/virt/baremetal/driver.py +++ b/nova/virt/baremetal/driver.py @@ -692,11 +692,6 @@ class BareMetalDriver(driver.ComputeDriver): """See comments of same method in firewall_driver.""" pass - def update_host_status(self): - """Update the status info of the host, and return those values - to the calling program.""" - return self.HostState.update_status() - def get_host_stats(self, refresh=False): """Return the current state of the host. If 'refresh' is True, run the update first.""" diff --git a/nova/virt/driver.py b/nova/virt/driver.py index d741524b0..59fac115f 100644 --- a/nova/virt/driver.py +++ b/nova/virt/driver.py @@ -586,10 +586,6 @@ class ComputeDriver(object): """Unplug VIFs from networks.""" raise NotImplementedError() - def update_host_status(self): - """Refresh host stats""" - raise NotImplementedError() - def get_host_stats(self, refresh=False): """Return currently known host stats""" raise NotImplementedError() diff --git a/nova/virt/fake.py b/nova/virt/fake.py index 959ab174c..6134019b2 100644 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -273,10 +273,6 @@ class FakeDriver(driver.ComputeDriver): """ Removes the named VM, as if it crashed. For testing""" self.instances.pop(instance_name) - def update_host_status(self): - """Return fake Host Status of ram, disk, network.""" - return self.host_status - def get_host_stats(self, refresh=False): """Return fake Host Status of ram, disk, network.""" return self.host_status diff --git a/nova/virt/hyperv/driver.py b/nova/virt/hyperv/driver.py index 1026ced95..f02ad3511 100644 --- a/nova/virt/hyperv/driver.py +++ b/nova/virt/hyperv/driver.py @@ -123,10 +123,6 @@ class HyperVDriver(driver.ComputeDriver): def get_available_resource(self): return self._vmops.get_available_resource() - def update_host_status(self): - """See xenapi_conn.py implementation.""" - pass - def get_host_stats(self, refresh=False): """See xenapi_conn.py implementation.""" return {} diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 763a98e80..2d3b1d954 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -2732,14 +2732,6 @@ class LibvirtDriver(driver.ComputeDriver): self.firewall_driver.unfilter_instance(instance_ref, network_info=network_info) - def update_host_status(self): - """Retrieve status info from libvirt. - - Query libvirt to get the state of the compute node, such - as memory and disk usage. - """ - return self.host_state.update_status() - def get_host_stats(self, refresh=False): """Return the current state of the host. diff --git a/nova/virt/xenapi/driver.py b/nova/virt/xenapi/driver.py index 04b75598c..2db7c1b17 100644 --- a/nova/virt/xenapi/driver.py +++ b/nova/virt/xenapi/driver.py @@ -554,11 +554,6 @@ class XenAPIDriver(driver.ComputeDriver): def refresh_provider_fw_rules(self): return self._vmops.refresh_provider_fw_rules() - def update_host_status(self): - """Update the status info of the host, and return those values - to the calling program.""" - return self.host_state.update_status() - def get_host_stats(self, refresh=False): """Return the current state of the host. If 'refresh' is True, run the update first.""" -- cgit