summaryrefslogtreecommitdiff
path: root/libvirt-override-virDomainCheckpoint.py
Commit message (Collapse)AuthorAgeFilesLines
* override: Convert to list comprehensionPhilipp Hahn2020-08-181-5/+1
| | | | | | :%s/retlist = list()\n\s*\(for \w\+ in ret\):\n\s*retlist.append(\(.*\))\n\n\s*return retlist/return [\2 \1]/ Signed-off-by: Philipp Hahn <hahn@univention.de>
* override: Add manual PEP 484 type annotationsPhilipp Hahn2020-08-181-3/+3
| | | | Signed-off-by: Philipp Hahn <hahn@univention.de>
* Remove legacy libvirtError argumentsPhilipp Hahn2020-08-061-1/+1
| | | | | | | | | | | | The fields have been deprecated in C with git:f60dc0bc09f09c6817d6706a9edb1579a3e2b2b8 They are only passed to the libvirtError constructor, but not stored for later or used anywhere else. sed -ri '/raise libvirtError/s/, \w+=self(\._dom)?//' *.py Signed-off-by: Philipp Hahn <hahn@univention.de>
* generator: Fix domainCheckpoint.listAllChildren()Philipp Hahn2020-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | virDomainCheckpoint(dom, _obj) expects a reference to the virDomain as its first argument, but virDomainCheckpoint.listAllChildren() passes `self` instead: libvirt.py:7056: error: Argument 1 to "virDomainCheckpoint" has incompatible type "virDomainCheckpoint"; expected "virDomain" >>> import libvirt >>> con = libvirt.open('test:///default') >>> dom = con.lookupByName("test") >>> first = dom.checkpointCreateXML("""<domaincheckpoint><name>First</name></domaincheckpoint>""") >>> second = dom.checkpointCreateXML("""<domaincheckpoint><name>Second</name></domaincheckpoint>""") >>> child, = first.listAllChildren() >>> second.domain() <libvirt.virDomain object at 0x7f828d777b80> ^^^^^^^^^ >>> child.domain() <libvirt.virDomainCheckpoint object at 0x7f828d8160a0> ^^^^^^^^^^^^^^^^^^^ Signed-off-by: Philipp Hahn <hahn@univention.de>
* Add virDomainCheckpoint APIsEric Blake2019-07-291-0/+19
Copies heavily from existing virDomainSnapshot handling, regarding what special cases the generator has to be taught and what overrides need to be written. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>