summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-05-23 10:40:50 -0600
committerEric Blake <eblake@redhat.com>2012-06-19 13:50:03 -0600
commit37bb0447bb5e585fd0171b30628abd313a0b1e64 (patch)
tree7dfd6e1a61879b904453beb67db5cca5c98ec184 /python/generator.py
parentsnapshot: expose new flags in virsh (diff)
downloadlibvirt-37bb0447bb5e585fd0171b30628abd313a0b1e64.tar.gz
libvirt-37bb0447bb5e585fd0171b30628abd313a0b1e64.tar.bz2
libvirt-37bb0447bb5e585fd0171b30628abd313a0b1e64.zip
list: add virDomainListAllSnapshots API
There was an inherent race between virDomainSnapshotNum() and virDomainSnapshotListNames(), where an additional snapshot could be created in the meantime, or where a snapshot could be deleted before converting the name back to a virDomainSnapshotPtr. It was also an awkward name: the function operates on domains, not domain snapshots. virDomainSnapshotListChildrenNames() suffered from the same inherent race, although its naming was nicer. This patch makes things nicer by grabbing a snapshot list atomically, in the format most useful to the user. * include/libvirt/libvirt.h.in (virDomainListAllSnapshots) (virDomainSnapshotListAllChildren): New declarations. * src/libvirt.c (virDomainSnapshotListNames) (virDomainSnapshotListChildrenNames): Add cross-references. (virDomainListAllSnapshots, virDomainSnapshotListAllChildren): New functions. * src/libvirt_public.syms (LIBVIRT_0.9.13): Export them. * src/driver.h (virDrvDomainListAllSnapshots) (virDrvDomainSnapshotListAllChildren): New callbacks. * python/generator.py (skip_function): Prepare for later hand-written versions.
Diffstat (limited to 'python/generator.py')
-rwxr-xr-xpython/generator.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/generator.py b/python/generator.py
index 0b6ac7c2a..2dada6e17 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -454,6 +454,8 @@ skip_function = (
'virSaveLastError', # We have our own python error wrapper
'virFreeError', # Only needed if we use virSaveLastError
'virConnectListAllDomains', #overridden in virConnect.py
+ 'virDomainListAllSnapshots', # overridden in virDomain.py
+ 'virDomainSnapshotListAllChildren', # overridden in virDomainSnapshot.py
'virStreamRecvAll', # Pure python libvirt-override-virStream.py
'virStreamSendAll', # Pure python libvirt-override-virStream.py