summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* python: Generate virStreamFree but don't expose in bindingsCole Robinson2011-06-231-1/+10
| | | | | | Turns out I was right in removing this the first time :) This is needed in our custom __del__ function, but the C code wasn't being generated. Add new infrastructure to do what we want
* python: Mark event callback wrappers as privateCole Robinson2011-06-214-73/+59
| | | | | | | | These functions aren't intended to be called directly by users, so mark them as private. While we're at it, remove unneeded exception handling, and break some long lines.
* python: events: Fix C->Python handle callback prototypeCole Robinson2011-06-211-2/+24
| | | | | | | | | | | | | | | If registering our own event loop implementation written in python, any handles or timeouts callbacks registered by libvirt C code must be wrapped in a python function. There is some argument trickery that makes this all work, by wrapping the user passed opaque value in a tuple, along with the callback function. Problem is, the current setup requires the user's event loop to know about this trickery, rather than just treating the opaque value as truly opaque. Fix this in a backwards compatible manner, and adjust the example python event loop to do things the proper way.
* python: Add bindings for virEvent*Handle/TimeoutCole Robinson2011-06-213-36/+221
|
* Promote virEvent*Handle/Timeout to public APICole Robinson2011-06-211-0/+8
| | | | | | | | | | Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. v2: Actually add APIs to libvirt.h
* python: Implement virStreamSend/RecvAll helpersCole Robinson2011-06-212-2/+66
| | | | | | | | Pure python implementation. The handler callbacks have been altered a bit compared to the C API: RecvAll doesn't pass length of the data read since that can be trivially obtained from python string objects, and SendAll requires the handler to return the string data to send rather than store the data in a string pointer.
* python: Implement virStreamSend/RecvCole Robinson2011-06-215-4/+117
| | | | | | | The return values for the python version are different that the C version of virStreamSend: on success we return a string, an error raises an exception, and if the stream would block we return int(-2). We need to do this since strings aren't passed by reference in python.
* python: Implement bindings for virStreamEventAddCallbackCole Robinson2011-06-204-14/+100
| | | | | v2: Don't generate virStreamFree
* python: generator: Don't print warning if nothing to warn aboutCole Robinson2011-06-201-3/+5
|
* python: libvirt-override: use simpler debugCole Robinson2011-06-201-104/+57
| | | | | | | | In a couple instances we have to mark a debug variable as ATTRIBUTE_UNUSED to avoid warnings. v2: Use #if 0 to comment out debug define