summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-09-24 19:56:26 -0600
committerEric Blake <eblake@redhat.com>2011-10-10 16:54:16 -0600
commitf2013c9dd1ce468b8620ee35c232a93ef7026fb0 (patch)
treed382e50eef09fd2b1a58de48a754b9d69e9f561b /python/generator.py
parentdocs: fix html bug (diff)
downloadlibvirt-f2013c9dd1ce468b8620ee35c232a93ef7026fb0.tar.gz
libvirt-f2013c9dd1ce468b8620ee35c232a93ef7026fb0.tar.bz2
libvirt-f2013c9dd1ce468b8620ee35c232a93ef7026fb0.zip
snapshot: new virDomainSnapshotListChildrenNames API
The previous API addition allowed traversal up the hierarchy; this one makes it easier to traverse down the hierarchy. In the python bindings, virDomainSnapshotNumChildren can be generated, but virDomainSnapshotListChildrenNames had to copy from the hand-written example of virDomainSnapshotListNames. * include/libvirt/libvirt.h.in (virDomainSnapshotNumChildren) (virDomainSnapshotListChildrenNames): New prototypes. (VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS): New flag alias. * src/libvirt.c (virDomainSnapshotNumChildren) (virDomainSnapshotListChildrenNames): New functions. * src/libvirt_public.syms: Export them. * src/driver.h (virDrvDomainSnapshotNumChildren) (virDrvDomainSnapshotListChildrenNames): New callbacks. * python/generator.py (skip_impl, nameFixup): Update lists. * python/libvirt-override-api.xml: Likewise. * python/libvirt-override.c (libvirt_virDomainSnapshotListChildrenNames): New wrapper function.
Diffstat (limited to 'python/generator.py')
-rwxr-xr-xpython/generator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/generator.py b/python/generator.py
index 79558ddbd..71afdb771 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -352,6 +352,7 @@ skip_impl = (
'virConnectListDefinedInterfaces',
'virConnectListNWFilters',
'virDomainSnapshotListNames',
+ 'virDomainSnapshotListChildrenNames',
'virConnGetLastError',
'virGetLastError',
'virDomainGetInfo',
@@ -963,6 +964,9 @@ def nameFixup(name, classe, type, file):
elif name[0:26] == "virDomainSnapshotListNames":
func = name[9:]
func = string.lower(func[0:1]) + func[1:]
+ elif name[0:28] == "virDomainSnapshotNumChildren":
+ func = name[17:]
+ func = string.lower(func[0:1]) + func[1:]
elif name[0:20] == "virDomainSnapshotNum":
func = name[9:]
func = string.lower(func[0:1]) + func[1:]