diff options
| author | Armando Migliaccio <armando.migliaccio@eu.citrix.com> | 2012-02-17 16:17:44 +0000 |
|---|---|---|
| committer | Armando Migliaccio <armando.migliaccio@eu.citrix.com> | 2012-02-23 13:28:21 +0000 |
| commit | 939f082cc2fb0b71bb601f80e3ea95d0be355e4c (patch) | |
| tree | ec1d9ff36d598ea5f2338441a0ded1e92e19b63f /nova/compute | |
| parent | 0c6765a71ad5538a7569dbc03dd8fe95713dc818 (diff) | |
| download | nova-939f082cc2fb0b71bb601f80e3ea95d0be355e4c.tar.gz nova-939f082cc2fb0b71bb601f80e3ea95d0be355e4c.tar.xz nova-939f082cc2fb0b71bb601f80e3ea95d0be355e4c.zip | |
blueprint host-aggregates: host maintenance - xenapi implementation
this changeset introduces the following:
- refactoring around host-related operations for xenapi
- increased test coverage
- first cut at implementing host evacuation for a XS/XCP host
Change-Id: I8509cdde95f6777ecfa928663b0c4bedbccf5d38
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 4 | ||||
| -rw-r--r-- | nova/compute/manager.py | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index be9b8dbb9..80abd37e1 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1640,7 +1640,9 @@ class HostAPI(base.Base): def set_host_maintenance(self, context, host, mode): """Start/Stop host maintenance window. On start, it triggers guest VMs evacuation.""" - raise NotImplementedError() + return _call_compute_message(self.db, "host_maintenance_mode", context, + host=host, params={"host": host, + "mode": mode}) class AggregateAPI(base.Base): diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 3066cb3a6..b64086115 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1464,6 +1464,12 @@ class ComputeManager(manager.SchedulerDependentManager): return self.driver.host_power_action(host, action) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) + def host_maintenance_mode(self, context, host, mode): + """Start/Stop host maintenance window. On start, it triggers + guest VMs evacuation.""" + return self.driver.host_maintenance_mode(host, mode) + + @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) def set_host_enabled(self, context, host=None, enabled=None): """Sets the specified host's ability to accept new instances.""" return self.driver.set_host_enabled(host, enabled) |
