diff options
| author | Kei Masumoto <masumotok@nttdata.co.jp> | 2011-05-27 15:14:16 +0900 |
|---|---|---|
| committer | Kei Masumoto <masumotok@nttdata.co.jp> | 2011-05-27 15:14:16 +0900 |
| commit | ca5a91b3fe6eaa1c2d2b85cb5a11d2bb36e7a436 (patch) | |
| tree | dd556f83b7277a745e9109fac4c6e5e81f8983cf | |
| parent | 87717c33ae78201a24c0f5a3416ae4b0080e4668 (diff) | |
| download | nova-ca5a91b3fe6eaa1c2d2b85cb5a11d2bb36e7a436.tar.gz nova-ca5a91b3fe6eaa1c2d2b85cb5a11d2bb36e7a436.tar.xz nova-ca5a91b3fe6eaa1c2d2b85cb5a11d2bb36e7a436.zip | |
fixed read_only check
| -rw-r--r-- | nova/virt/libvirt_conn.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 8c9a3550a..7982611fa 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -564,23 +564,27 @@ class LibvirtConnection(driver.ComputeDriver): @exception.wrap_exception def pause(self, instance, callback): """Pause VM instance""" - self._take_action_to_instance('suspend', instance) + dom = self._lookup_by_name(instance.name) + dom.suspend() @exception.wrap_exception def unpause(self, instance, callback): """Unpause paused VM instance""" - self._take_action_to_instance('resume', instance) + dom = self._lookup_by_name(instance.name) + dom.resume() @exception.wrap_exception def suspend(self, instance, callback): """Suspend the specified instance""" - self._take_action_to_instance('managedSave', instance, 0) + dom = self._lookup_by_name(instance.name) + dom.managedSave(0) @exception.wrap_exception def resume(self, instance, callback): """resume the specified instance""" try: - self._take_action_to_instance('create', instance) + dom = self._lookup_by_name(instance.name) + dom.create() except libvirt.LibvirtError: xml = self.to_xml(instance, None) self._create_new_domain(xml) |
