summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-09-28 21:34:32 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-09-28 21:34:32 +0000
commitd0ea6adf902d7bfb22bb39491b2fab6cadfa8ae7 (patch)
tree2a55f29978f792ed55d63671f668b7a8049b97c2
parent64702669c879dbc5cf27712ef8fadb9fd043664d (diff)
xenapi: implement resume_state_on_host_boot
Implement the resume_state_on_host_boot() driver method for XenAPI. This makes it possible to automatically start instances when nova-compute starts up with the XenAPI driver. Change-Id: I68eb11fae57825898009aa1d9567d8112aad53b3
-rw-r--r--nova/virt/xenapi/driver.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/virt/xenapi/driver.py b/nova/virt/xenapi/driver.py
index 3425c64f8..6464c4d6d 100644
--- a/nova/virt/xenapi/driver.py
+++ b/nova/virt/xenapi/driver.py
@@ -597,6 +597,11 @@ class XenAPIDriver(driver.ComputeDriver):
# TODO(tr3buchet): remove this function once all virts return false
return False
+ def resume_state_on_host_boot(self, context, instance, network_info,
+ block_device_info=None):
+ """resume guest state when a host is booted"""
+ self._vmops.power_on(instance)
+
class XenAPISession(object):
"""The session to invoke XenAPI SDK calls"""