Logo
Explore Help
Sign In
NuKVM/libvirt
3
0
Fork 0
You've already forked libvirt
mirror of https://github.com/libvirt/libvirt.git synced 2025-02-25 18:55:26 -06:00
Code Issues Packages Projects Releases Wiki Activity
Files
d9a52520c732579484df76719be84fb45cfcbd8a
libvirt/python/libvirt-override-virDomain.py

12 lines
426 B
Python
Raw Normal View History

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.
2012-06-09 09:55:36 -06:00
def listAllSnapshots(self, flags):
"""List all snapshots and returns a list of snapshot objects"""
ret = libvirtmod.virDomainListAllSnapshots(self._o, flags)
if ret is None:
raise libvirtError("virDomainListAllSnapshots() failed", conn=self)
retlist = list()
for snapptr in ret:
retlist.append(virDomainSnapshot(self, _obj=snapptr))
return retlist
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 53ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API