diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-11-28 20:20:30 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-11-28 20:20:30 +0000 |
| commit | 595168c711bd9ba82c1b7e59c847dbc9c8f92af4 (patch) | |
| tree | eecca523bb87c3a1167b2e66f692a65558a7b07b | |
| parent | 7d035cd1ee232a4ca8ea758e158891086cbe57d3 (diff) | |
| parent | e6ba5845cd0bebc5c606e976296164081fbbfcd3 (diff) | |
Merge "Add methods to Host operations to fake hypervisor"
| -rw-r--r-- | nova/virt/fake.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nova/virt/fake.py b/nova/virt/fake.py index 4f78175f2..9f5956b0d 100644 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -364,16 +364,20 @@ class FakeDriver(driver.ComputeDriver): def host_power_action(self, host, action): """Reboots, shuts down or powers up the host.""" - pass + return action def host_maintenance_mode(self, host, mode): """Start/Stop host maintenance window. On start, it triggers guest VMs evacuation.""" - pass + if not mode: + return 'off_maintenance' + return 'on_maintenance' def set_host_enabled(self, host, enabled): """Sets the specified host's ability to accept new instances.""" - pass + if enabled: + return 'enabled' + return 'disabled' def get_disk_available_least(self): """ """ |
