From 4cf5ece64bc89de5c9da37f0b99ee0d28c88c96c Mon Sep 17 00:00:00 2001 From: Armando Migliaccio Date: Fri, 10 Feb 2012 19:16:29 +0000 Subject: [PATCH] blueprint host-aggregates: host maintenance First cut at implementing host maintenance (aka host evacuation). This allows zero-downtime upgrades of the hosts by moving VMs off of to another host to carry out hypervisor upgrades. A number of issues have been addressed in this changeset: - improved the semantic of update operation on hosts (as per dabo comment) - refactored host-related operations into a separate class in to improve readability/maintainability - refactored test_hosts to reduce duplicated code - added first stub of host-maintenance operation Change-Id: I933f7cb8736e56c9ecea5255936d8826ef6decec --- nova/tests/test_compute.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index d6d54227..34162bb2 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -2369,8 +2369,7 @@ class ComputeAPITestCase(BaseTestCase): self.assertEqual(instance_properties['host'], 'host2') self.assertIn('host2', filter_properties['ignore_hosts']) - self.stubs.Set(self.compute_api, '_cast_scheduler_message', - _fake_cast) + self.stubs.Set(compute.api, '_cast_scheduler_message', _fake_cast) context = self.context.elevated() instance = self._create_fake_instance(dict(host='host2')) @@ -2389,8 +2388,7 @@ class ComputeAPITestCase(BaseTestCase): self.assertEqual(instance_properties['host'], 'host2') self.assertNotIn('host2', filter_properties['ignore_hosts']) - self.stubs.Set(self.compute_api, '_cast_scheduler_message', - _fake_cast) + self.stubs.Set(compute.api, '_cast_scheduler_message', _fake_cast) self.flags(allow_resize_to_same_host=True) context = self.context.elevated()