From 8c8116f2282229b50d6922ca6006f98a1822693e Mon Sep 17 00:00:00 2001 From: Giampaolo Lauria Date: Mon, 11 Feb 2013 19:08:40 -0500 Subject: Fix ComputeAPI.get_host_uptime Remove host from the list of parameters Fixes bug 1122552 Change-Id: I0fd6b9130a408bfd80d3bdd24ecad786adb0f151 --- nova/compute/manager.py | 4 ++-- nova/tests/compute/test_rpcapi.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'nova') diff --git a/nova/compute/manager.py b/nova/compute/manager.py index afeb9f02e..81750921c 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2394,9 +2394,9 @@ class ComputeManager(manager.SchedulerDependentManager): return self.driver.set_host_enabled(host, enabled) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) - def get_host_uptime(self, context, host): + def get_host_uptime(self, context): """Returns the result of calling "uptime" on the target host.""" - return self.driver.get_host_uptime(host) + return self.driver.get_host_uptime(self.host) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) @wrap_instance_fault diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py index a78a13883..55318a064 100644 --- a/nova/tests/compute/test_rpcapi.py +++ b/nova/tests/compute/test_rpcapi.py @@ -162,6 +162,9 @@ class ComputeRpcAPITestCase(test.TestCase): self._test_compute_api('get_diagnostics', 'call', instance=self.fake_instance) + def test_get_host_uptime(self): + self._test_compute_api('get_host_uptime', 'call') + def test_get_vnc_console(self): self._test_compute_api('get_vnc_console', 'call', instance=self.fake_instance, console_type='type') -- cgit