summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* remove a static limit on max domains in python bindingsDaniel Veillard2011-12-291-4/+23
| | | | | | * python/libvirt-override.c: remove the predefined array in the virConnectListDomainsID binding and call virConnectNumOfDomains to do a proper allocation
* python: Fix problems of virDomain{Set, Get}BlockIoTune bindingsAlex Jia2011-12-292-4/+3
| | | | | | | | | | | | | | | | | | The parameter 'params' is useless for virDomainGetBlockIoTune API, and the return value type should be a virTypedParameterPtr but not integer. And "PyArg_ParseTuple" in functions libvirt_virDomain{Set,Get}BlockIoTune misses format unit for "format" argument. * libvirt-override-api.xml: Remove useless the parameter 'params' from virDomainGetBlockIoTune API, and change return value type from integer to virTypedParameterPtr. * python/libvirt-override.c: Add the missed format units. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770683 Signed-off-by: Alex Jia <ajia@redhat.com>
* add new API virDomain{G, S}etNumaParametersHu Tao2011-12-201-0/+2
| | | | | Set up the types for the numa functions and insert them into the virDriver structure definition.
* python: plug memory leak on libvirt_virConnectOpenAuthAlex Jia2011-12-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Detected by valgrind. Leak introduced in commit 5ab109f. * python/libvirt-override.c: avoid memory leak on libvirt_virConnectOpenAuth. * How to reproduce? % valgrind -v --leak-check=full virt-clone --print-xml Note: it can hit the issue although options are incomplete. * Actual valgrind result: ==1801== 12 bytes in 1 blocks are definitely lost in loss record 25 of 3,270 ==1801== at 0x4A05FDE: malloc (vg_replace_malloc.c:236) ==1801== by 0xCF1F60E: libvirt_virConnectOpenAuth (libvirt-override.c:1507) ==1801== by 0x3AFEEDE7F3: PyEval_EvalFrameEx (ceval.c:3794) ==1801== by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880) ==1801== by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880) ==1801== by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880) ==1801== by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880) ==1801== by 0x3AFEEE0466: PyEval_EvalCodeEx (ceval.c:3044) ==1801== by 0x3AFEEE0541: PyEval_EvalCode (ceval.c:545) ==1801== by 0x3AFEEFB88B: run_mod (pythonrun.c:1351) ==1801== by 0x3AFEEFB95F: PyRun_FileExFlags (pythonrun.c:1337) ==1801== by 0x3AFEEFCE4B: PyRun_SimpleFileExFlags (pythonrun.c:941) Signed-off-by: Alex Jia <ajia@redhat.com>
* python: Expose blockPeek and memoryPeek in Python bindingOsier Yang2011-12-153-0/+91
| | | | | | | | | | | | | | | | | | | | | | | A simple example to show how to use it: \#! /usr/bin/python import os import sys import libvirt disk = "/var/lib/libvirt/images/test.img" conn = libvirt.open(None) dom = conn.lookupByName('test') mem_contents = dom.memoryPeek(0, 32, libvirt.VIR_MEMORY_VIRTUAL); sys.stdout.write(mem_contents) % python test.py | hexdump 0000000 1660 0209 0000 0000 0000 0000 0000 0000 0000010 0000 0000 0000 0000 d3a0 01d0 0000 0000 0000020
* python: Fix export of virDomainSnapshotListChildrenNamesPeter Krempa2011-12-131-0/+1
| | | | | | | | Commit f2013c9dd1ce468b8620ee35c232a93ef7026fb0 added implementation of virDomainSnapshotListChildrenNames override export, but registration of the newly exported function was not added. *python/libvirt-override.c: - register export of function
* python: Expose binding for virNodeGetMemoryStats()v0.9.8Peter Krempa2011-12-052-0/+55
| | | | | | This patch adds binding for virNodeGetMemoryStats method of libvirtd. Return value is represented as a python dictionary mapping field names to values.
* python: Expose binding for virNodeGetCPUStats()Peter Krempa2011-12-052-0/+54
| | | | | | This patch adds binding for virNodeGetCPUStats method of libvirtd. Return value is represented as a python dictionary mapping field names to values.
* Support virDomain{Set, Get}BlockIoTune in the python APIv0.9.8-rc2v0.9.8-rc1Lei Li2011-11-303-3/+196
| | | | | | | | Python support for both setting and getting block I/O throttle. Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* Add new API virDomain{Set, Get}BlockIoTuneLei Li2011-11-291-0/+3
| | | | | | | | | This patch add new pulic API virDomainSetBlockIoTune and virDomainGetBlockIoTune. Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* python: Fix documentation of virStream recvv0.9.7Matthias Bolte2011-10-311-1/+1
| | | | This was fixed in be757a3f7baf93b for libvirt.c.
* startupPolicy: Emit event on disk source droppingv0.9.7-rc1Michal Privoznik2011-10-252-0/+62
| | | | | | | | | | If a disk source gets dropped because it is not accessible, mgmt application might want to be informed about this. Therefore we need to emit an event. The event presented in this patch is however a bit superset of what written above. The reason is simple: an intention to be easily expanded, e.g. on 'user ejected disk in guest' events. Therefore, callback gets source string and disk alias (which should be unique among a domain) and reason (an integer);
* Fix two comments related to error handlingPhilipp Hahn2011-10-171-1/+1
| | | | Signed-off-by: Philipp Hahn <hahn@univention.de>
* snapshot: new virDomainSnapshotListChildrenNames APIEric Blake2011-10-103-3/+58
| | | | | | | | | | | | | | | | | | | | | | 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.
* maint: typo fixesEric Blake2011-10-101-2/+2
| | | | | | | | | | | | | | | | I noticed a couple typos in recent commits, and fixed the remaining instances of them. * docs/internals/command.html.in: Fix spelling errors. * include/libvirt/libvirt.h.in (virConnectDomainEventCallback): Likewise. * python/libvirt-override.py (virEventAddHandle): Likewise. * src/lxc/lxc_container.c (lxcContainerChild): Likewise. * src/util/hash.c (virHashCreateFull): Likewise. * src/storage/storage_backend_logical.c (virStorageBackendLogicalMakeVol): Likewise. * src/esx/esx_driver.c (esxFormatVMXFileName): Likewise. * src/vbox/vbox_tmpl.c (vboxIIDIsEqual_v3_x): Likewise.
* python: Fix bindings generated in VPATH buildv0.9.6v0.9.5-rc3v0.9.5Jiri Denemark2011-09-161-4/+4
|
* python: Fix libvirt.py generation to include virterror infoCole Robinson2011-09-151-2/+5
| | | | | Recent generator refactoring broke libvirt.py. With this patch, libvirt.py is generated exactly the same as before offending commit 9eba0d25.
* qemu_api: Update Makefile to generate libvirtmod_qemu libv0.9.5-rc2Osier Yang2011-09-141-5/+28
|
* qemu_api: Update Py binding generator to generate files for QEMU APIsOsier Yang2011-09-141-69/+294
| | | | | | | | It will generate: libvirt-qemu.py libvirt-qemu.h libvirt-qemu.c libvirt-qemu-export.c
* qemu_api: Add override XML and C files for QEMU APIsOsier Yang2011-09-142-0/+148
| | | | | There is only one function (virDomainQemuMonitorCommand) need to be hand-craft.
* latency: Expose the new API for Python bindingv0.9.5-rc1Osier Yang2011-09-063-0/+93
|
* Add public API for getting migration speedJim Fehlig2011-09-013-0/+31
| | | | | | | | | Includes impl of python binding since the generator was not able to cope. Note: Requires gendispatch.pl patch from Matthias Bolte https://www.redhat.com/archives/libvir-list/2011-August/msg01367.html
* python: avoid unlikely sign extension bugv0.9.4Eric Blake2011-08-021-1/+1
| | | | | | | Detected by Coverity; same analysis as for commit f73198df. * python/libvirt-override.c (libvirt_virDomainGetVcpuPinInfo): Use correct type.
* freebsd: Fix build problem due to picking up the wrong libvirt.hMatthias Bolte2011-07-291-1/+2
| | | | | | | | | | | | | | | | | | Gettext annoyingly modifies CPPFLAGS in-place, putting -I/usr/local/include into the search patch if libintl headers must be used from that location. But since we must support automake 1.9.6 which lacks AM_CPPFLAGS, and since CPPFLAGS is used prior to INCLUDES, this means that the build picks up the _old_ installed libvirt.h in priority to the in-tree version, leading to all sorts of weird build failures on FreeBSD. Fix this by teaching configure to undo gettext's actions, but to keep any changes required by gettext at the end of INCLUDES after all in-tree locations are used first. Also requires adding a wrapper Makefile.am and making gnulib-tool create just gnulib.mk files during the bootstrap process. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: add missing copyright noticesv0.9.4-rc2Eric Blake2011-07-282-0/+6
| | | | | | | | | I went with the shorter license notice used by src/libvirt.c, rather than spelling out the full LGPLv2+ clause into each of these files. * configure.ac: Declare copyright. * all Makefile.am: Likewise.
* python: add python binding for virDomainSetMemoryParametersHu Tao2011-07-282-3/+92
|
* python: add python binding for virDomainGetMemoryParametersHu Tao2011-07-282-6/+79
|
* python: add python binding for virDomainSetBlkioParametersHu Tao2011-07-282-3/+92
|
* python: add python binding for virDomainGetBlkioParametersHu Tao2011-07-282-6/+79
|
* send-key: Implement Python APILai Jiangshan2011-07-271-0/+48
| | | | Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
* python: Properly report errors if virStreamRecv failsCole Robinson2011-07-261-1/+3
| | | | | We only want to raise the special value -2. -1 should return None which tells the bindings to throw an exception.
* python: Handle embedded NUL in stream.send datav0.9.4-rc1Cole Robinson2011-07-251-2/+3
| | | | Otherwise things like volume upload are only useful with text data.
* python: add Python binding for virDomainGetVcpuPinInfo APITaku Izumi2011-07-253-0/+76
| | | | | | | This patch adds the Python bindings for virDomainGetVcpuPinInfo API. * python/generator.py: add it to generator skip list * python/libvirt-override-api.xml: provide an override description * python/libvirt-override.c: provide an override binding implementation
* python: add Python binding for virDomainPinVcpusFlags APITaku Izumi2011-07-253-0/+57
| | | | | | | This patch adds the Python bindings for virDomainPinVcpuFlags API. * python/generator.py: add it to the generator skip list * python/libvirt-override-api.xml: provide override description * python/libvirt-override.c: provide override bindings implementation
* python: add Python binding for virDomainGetSchedulerParametersFlags APITaku Izumi2011-07-252-0/+103
| | | | | This patch adds the Python bindings for virDomainGetSchedulerParametersFlags API.
* python: add Python binding for virDomainGetSchedulerParametersFlags APITaku Izumi2011-07-252-0/+89
| | | | | | | This patch adds the Python bindings for virDomainGetSchedulerParametersFlags API. * python/libvirt-override-api.xml: provide and override description * python/libvirt-override.c: implement the bindings
* Asynchronous event for BlockJob completionAdam Litke2011-07-222-0/+64
| | | | | | | | | | | | | | | | | | | | When an operation started by virDomainBlockPull completes (either with success or with failure), raise an event to indicate the final status. This API allow users to avoid polling on virDomainGetBlockJobInfo if they would prefer to use an event mechanism. * daemon/remote.c: Dispatch events to client * include/libvirt/libvirt.h.in: Define event ID and callback signature * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Extend API to handle the new event * src/qemu/qemu_driver.c: Connect to the QEMU monitor event for block_stream completion and emit a libvirt block pull event * src/remote/remote_driver.c: Receive and dispatch events to application * src/remote/remote_protocol.x: Wire protocol definition for the event * src/remote_protocol-structs: structure definitions for protocol verification * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event from QEMU monitor
* Enable virDomainBlockPull in the python APIAdam Litke2011-07-223-1/+47
| | | | | | | | | virDomainGetBlockJobInfo requires manual override since it returns a custom type. * python/generator.py: reenable bindings for this entry point * python/libvirt-override-api.xml python/libvirt-override.c: manual overrides
* Add new API virDomainBlockPull* to headersAdam Litke2011-07-221-0/+2
| | | | | | | | | | | | | | | | Set up the types for the block pull functions and insert them into the virDriver structure definition. Symbols are exported in this patch to prevent documentation compile failures. * include/libvirt/libvirt.h.in: new API * src/driver.h: add the new entry to the driver structure * python/generator.py: fix compiler errors, the actual python bindings * are implemented later * src/libvirt_public.syms: export symbols * docs/apibuild.py: Extend 'unsigned long' parameter exception to this * API
* python: Fix makefile rule for code generationMatthias Bolte2011-07-211-1/+1
| | | | | | | Commit 8665f85523f0451c changed generated.stamp to $(GENERATE).stamp, but missed one instance in the CLEANFILES list. This can break the build in case the generated code is deleted but the .stamp file stays around and therefore the code isn't regenerated.
* Quieten build & ensure API build scripts exit with non-zero statusDaniel P. Berrange2011-07-192-9/+13
| | | | | | | | | | | | | | | | The current API build scripts will continue and exit with a zero status even if they find problems. This has been the cause of many build problems, or hidden build errors, in the past. Change the scripts so they always exit with a non-zero status for any problems they do not understand. Also turn off all debug output by default so they respect $(AM_V_GEN) * docs/Makefile.am: Use $(AM_V_GEN) for API/HTML scripts * docs/apibuild.py, python/generator.py: Exit with non-zero status if problems are found. Also be silent, not outputting any debug messages. * src/Makefile.am: Use $(AM_V_GEN) for ESX generator * python/Makefile.am: Tweak rule
* python: prefer unsigned flagsEric Blake2011-07-131-3/+3
| | | | | | * python/libvirt-override.c (libvirt_virConnectOpenAuth) (libvirt_virDomainSnapshotListNames) (libvirt_virDomainRevertToSnapshot): Change flags type.
* python: Fix bogus label placementMatthias Bolte2011-07-071-5/+3
|
* build: consistently use CFLAGSv0.9.3Eric Blake2011-07-011-2/+3
| | | | | | | | | | | | | | | | According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled in automake 1.9.6) should only include -I, -D, and -U directives; more generic directives like -Wall belong in CFLAGS since they affect more phases of the build process. Therefore, we should be sticking CFLAGS additions into a CFLAGS container, not a CPPFLAGS container. * src/Makefile.am (libvirt_driver_vmware_la_CFLAGS): Use AM_CFLAGS. (INCLUDES): Move CFLAGS items... (AM_CFLAGS): ...to their proper location. * python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise. * tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise. (commandtest_CFLAGS, commandhelper_CFLAGS) (virnetmessagetest_CFLAGS, virnetsockettest_CFLAGS): Use AM_CFLAGS.
* python: Don't declare Py_ssize_t for Python 2.6v0.9.3-rc2v0.9.3-rc1Matthias Bolte2011-06-241-1/+1
| | | | | | | | Commit cd48c3f4e95597 added a Py_ssize_t typedef for Python < 2.7. But Py_ssize_t was added in Python 2.5. This makes the build fail for Python 2.6. Adjust the check to match Python < 2.5 to fix this.
* Revert "Add new API virDomainBlockPull* to headers"Eric Blake2011-06-241-3/+0
| | | | | | | | | This reverts commit 7d56a16d036d9aa7292e10e884c129742036f8a7. Conflicts: python/generator.py src/libvirt_public.syms
* Revert "Enable virDomainBlockPull in the python API."Eric Blake2011-06-243-69/+3
| | | | | | | | This reverts commit d74b86f5d6ecae3d18a391f90a918fcac75914db. Conflicts: python/generator.py
* Revert "Asynchronous event for BlockPull completion"Eric Blake2011-06-242-60/+0
| | | | | | | | | | This reverts commit 12cd77a0c58a80179182f7d09e8e73f9f66b4677. Conflicts: python/libvirt-override-virConnect.py python/libvirt-override.c src/remote/remote_protocol.x
* build: avoid python 2.4 build failureEric Blake2011-06-241-1/+6
| | | | | | | | I'm not sure when Py_ssize_t was introduced; but Fedora 14 Python 2.7 has it, while RHEL 5 Python 2.4 lacks it. It should be easy enough to adjust if someone runs into problems. * python/typewrappers.h (Py_ssize_t): Define for older python.
* build: avoid python 2.4 build failureEric Blake2011-06-231-2/+2
| | | | | | | | | | | | | On RHEL 5, I got: /usr/bin/python ./generator.py /usr/bin/python File "./generator.py", line 427 "virStreamFree", # Needed in custom virStream __del__, but free shouldn't ^ SyntaxError: invalid syntax * python/generator.py (function_skip_python_impl): Use same syntax as other skip lists.