On Mon, Mar 24, 2008 at 02:28:18AM +0000, Daniel P. Berrange wrote: > Rather that creating a full vmmConnection() object, I think its a > little simpler to just make the save() method on the vmmDomain() > object take a flag such as 'background', and if set make it use a > separate libvirt level connection() object. Same end result, but > closer to the design we'll need when libvirt gets support for a > VIR_DOMAIN_SAVE_ASYNC flag on the save() method.
Something like this? -- Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/
Index: virt-manager-0.5.3/src/virtManager/domain.py
===================================================================
--- virt-manager-0.5.3.orig/src/virtManager/domain.py 2008-03-28 12:38:14.867233454 +0100
+++ virt-manager-0.5.3/src/virtManager/domain.py 2008-03-28 13:25:59.827152136 +0100
@@ -390,8 +390,14 @@
self.vm.resume()
self._update_status()
- def save(self, file, ignore1=None):
- self.vm.save(file)
+ def save(self, file, ignore1=None, background=True):
+ if background:
+ conn = libvirt.open(self.connection.uri)
+ vm = conn.lookupByID(self.get_id())
+ else:
+ vm = self.vm
+
+ vm.save(file)
self._update_status()
def destroy(self):
signature.asc
Description: Digital signature
_______________________________________________ et-mgmt-tools mailing list [email protected] https://www.redhat.com/mailman/listinfo/et-mgmt-tools
