mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-01 00:21:59 +03:00
list: provide python bindings for snapshots
This adds support for the new virDomainListAllSnapshots (a domain function) and virDomainSnapshotListAllChildren (a snapshot function) to the libvirt-python bindings. The implementation is done manually as the generator does not support wrapping lists of C pointers into python objects. * python/libvirt-override.c (libvirt_virDomainListAllSnapshots) (libvirt_virDomainSnapshotListAllChildren): New functions. * python/libvirt-override-api.xml: Document them. * python/libvirt-override-virDomain.py (listAllSnapshots): New file. * python/libvirt-override-virDomainSnapshot.py (listAllChildren): Likewise. * python/Makefile.am (CLASSES_EXTRA): Ship them.
This commit is contained in:
@ -406,17 +406,29 @@
|
||||
<arg name='flags' type='unsigned int' info='fine-tuning flags, currently unused, pass 0.'/>
|
||||
</function>
|
||||
<function name='virDomainSnapshotListNames' file='python'>
|
||||
<info>collect the list of snapshots for the given domain</info>
|
||||
<info>collect the list of snapshot names for the given domain</info>
|
||||
<arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
|
||||
<arg name='flags' type='unsigned int' info='flags'/>
|
||||
<return type='str *' info='the list of Names or None in case of error'/>
|
||||
</function>
|
||||
<function name='virDomainListAllSnapshots' file='python'>
|
||||
<info>returns the list of snapshots for the given domain</info>
|
||||
<arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
|
||||
<arg name='flags' type='unsigned int' info='flags'/>
|
||||
<return type='snapshot *' info='the list of snapshots or None in case of error'/>
|
||||
</function>
|
||||
<function name='virDomainSnapshotListChildrenNames' file='python'>
|
||||
<info>collect the list of child snapshots for the given snapshot</info>
|
||||
<info>collect the list of child snapshot names for the given snapshot</info>
|
||||
<arg name='snapshot' type='virDomainSnapshotPtr' info='pointer to the snapshot'/>
|
||||
<arg name='flags' type='unsigned int' info='flags'/>
|
||||
<return type='str *' info='the list of Names or None in case of error'/>
|
||||
</function>
|
||||
<function name='virDomainSnapshotListAllChildren' file='python'>
|
||||
<info>returns the list of child snapshots for the given snapshot</info>
|
||||
<arg name='snapshot' type='virDomainSnapshotPtr' info='pointer to the snapshot'/>
|
||||
<arg name='flags' type='unsigned int' info='flags'/>
|
||||
<return type='snapshot *' info='the list of snapshots or None in case of error'/>
|
||||
</function>
|
||||
<function name='virDomainRevertToSnapshot' file='python'>
|
||||
<info>revert the domain to the given snapshot</info>
|
||||
<arg name='dom' type='virDomainPtr' info='dummy domain pointer'/>
|
||||
|
Reference in New Issue
Block a user