summaryrefslogtreecommitdiffstats
path: root/generator.py
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
commit4ba57a33c5ce575a837c9a71c2dd9d95382a82a2 (patch)
treeb597aa431a6108a77d06ccff1db9c967e0adb628 /generator.py
parente6f0751453273b3fa76b6fb2f554965288a16e2f (diff)
downloadlibvirt-python-split-4ba57a33c5ce575a837c9a71c2dd9d95382a82a2.tar.gz
libvirt-python-split-4ba57a33c5ce575a837c9a71c2dd9d95382a82a2.tar.xz
libvirt-python-split-4ba57a33c5ce575a837c9a71c2dd9d95382a82a2.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 'generator.py')
-rwxr-xr-xgenerator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/generator.py b/generator.py
index 79558dd..71afdb7 100755
--- a/generator.py
+++ b/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:]