mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-12-18 20:24:58 +03:00
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.
This commit is contained in:
@@ -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:]
|
||||
|
||||
Reference in New Issue
Block a user