diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-06-06 21:49:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-06-06 21:49:38 +0000 |
| commit | 66a7b1895dcf0b7b4ad133edeec3d04205e75c41 (patch) | |
| tree | 32c3c19ed5761722c44097ad2b5a11245369c83c /nova/virt | |
| parent | 534e6cf87338d7d47349d6186e622ba73ecb9e40 (diff) | |
| parent | 6548c509f1780a7168f26de6f2045ec7d5768520 (diff) | |
Merge "Implements resume_state_on_host_boot for libvirt."
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/driver.py | 4 | ||||
| -rw-r--r-- | nova/virt/fake.py | 3 | ||||
| -rw-r--r-- | nova/virt/libvirt/connection.py | 7 |
3 files changed, 14 insertions, 0 deletions
diff --git a/nova/virt/driver.py b/nova/virt/driver.py index 895a32ed3..f7dfbf7cd 100644 --- a/nova/virt/driver.py +++ b/nova/virt/driver.py @@ -326,6 +326,10 @@ class ComputeDriver(object): # TODO(Vek): Need to pass context in for access to auth_token raise NotImplementedError() + def resume_state_on_host_boot(self, context, instance, network_info): + """resume guest state when a host is booted""" + raise NotImplementedError() + def rescue(self, context, instance, network_info, image_meta): """Rescue the specified instance""" raise NotImplementedError() diff --git a/nova/virt/fake.py b/nova/virt/fake.py index 0ec705a53..316a7769a 100644 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -117,6 +117,9 @@ class FakeDriver(driver.ComputeDriver): def agent_update(self, instance, url, md5hash): pass + def resume_state_on_host_boot(self, context, instance, network_info): + pass + def rescue(self, context, instance, network_info, image_meta): pass diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 0cfcf2993..a91ab26e9 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -840,6 +840,13 @@ class LibvirtDriver(driver.ComputeDriver): dom.create() @exception.wrap_exception() + def resume_state_on_host_boot(self, context, instance, network_info): + """resume guest state when a host is booted""" + # NOTE(dprince): use hard reboot to ensure network and firewall + # rules are configured + self._hard_reboot(instance, network_info) + + @exception.wrap_exception() def rescue(self, context, instance, network_info, image_meta): """Loads a VM using rescue images. |
