diff options
Diffstat (limited to 'libvirt-override-virDomain.py')
-rw-r--r-- | libvirt-override-virDomain.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libvirt-override-virDomain.py b/libvirt-override-virDomain.py new file mode 100644 index 0000000..ccc4d5f --- /dev/null +++ b/libvirt-override-virDomain.py @@ -0,0 +1,11 @@ + def listAllSnapshots(self, flags): + """List all snapshots and returns a list of snapshot objects""" + ret = libvirtmod.virDomainListAllSnapshots(self._o, flags) + if ret is None: + raise libvirtError("virDomainListAllSnapshots() failed", conn=self) + + retlist = list() + for snapptr in ret: + retlist.append(virDomainSnapshot(self, _obj=snapptr)) + + return retlist |