summaryrefslogtreecommitdiffstats
path: root/libvirt-override.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix several minor problems introduced by the memtune seriesv0.8.5Matthias Bolte2010-10-121-2/+4
| | | | | | | | | | | | | | Add proper documentation to the new VIR_DOMAIN_MEMORY_* macros in libvirt.h.in to placate apibuild.py. Mark args as unused in for libvirt_virDomain{Get,Set}MemoryParameters in the Python bindings and add both to the libvirtMethods array. Update remote_protocol-structs to placate make syntax-check. Undo unintended modifications in vboxDomainGetInfo. Update the function table of the VirtualBox and XenAPI drivers.
* Adding structure and defines for virDomainSet/GetMemoryParametersNikunj A. Dadhania2010-10-121-0/+14
| | | | | | | | | | | | | | | | | | | | | This patch adds a structure virMemoryParameter, it contains the name of the parameter and the type of the parameter along with a union. dv: + rename enums to VIR_DOMAIN_MEMORY_PARAM_* + remove some extraneous tabs v4: + Add unsigned int flags to the public api for future extensions v3: + Protoype for virDomainGetMemoryParameters and dummy python binding. v2: + Includes dummy python bindings for the library to build cleanly. + Define string constants like "hard_limit", etc. + re-order this patch.
* python: Fix IOErrorReasonCallback bindingsCole Robinson2010-07-141-1/+1
| | | | | A copy and paste error was causing us to dispatch the incorrect routine. Spotted by Dan Kenigsberg.
* Fix up the python bindings for snapshotting.Chris Lalancette2010-05-201-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | This involved a few fixes. To start with, an virDomainSnapshot object is really tied to a domain, not a connection, so we have to generate a slightly different object so that we can get at self._dom for the object. Next, we had to "dummy" up an override piece of XML with a bogus argument that the function doesn't actually take. That's so that the generator places virDomainRevertToSnapshot underneath the correct class (namely, the virDomain class). Finally, we had to hand-implement the virDomainRevertToSnapshot implementation, ignoring the bogus pointer we are being passed. With all of this in place, I was able to successfully take a snapshot and revert to it using only the Python bindings. Signed-off-by: Chris Lalancette <clalance@redhat.com>
* python: don't ignore virInitialize failure in module initializationJim Meyering2010-05-181-1/+2
| | | | | * python/libvirt-override.c (initlibvirtmod): Upon virInitialize failure, skip the Py_InitModule call.
* Add support for another explicit IO error eventv0.8.1Daniel P. Berrange2010-04-301-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new event type VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON This event is the same as the previous VIR_DOMAIN_ID_IO_ERROR event, but also includes a string describing the cause of the event. Thus there is a new callback definition for this event type typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn, virDomainPtr dom, const char *srcPath, const char *devAlias, int action, const char *reason, void *opaque); This is currently wired up to the QEMU block IO error events * daemon/remote.c: Dispatch IO error events to client * examples/domain-events/events-c/event-test.c: Watch for IO error events * include/libvirt/libvirt.h.in: Define new IO error event ID and callback signature * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Extend API to handle IO error events * src/qemu/qemu_driver.c: Connect to the QEMU monitor event for block IO errors and emit a libvirt IO error event * src/remote/remote_driver.c: Receive and dispatch IO error events to application * src/remote/remote_protocol.x: Wire protocol definition for IO error events * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event from QEMU monitor
* Implement python binding for virDomainGetBlockInfoDaniel P. Berrange2010-04-291-0/+27
| | | | | | | | | | | | | | | This binds the virDomainGetBlockInfo API to python's blockInfo method on the domain object >>> c = libvirt.openReadOnly('qemu:///session') >>> d = c.lookupByName('demo') >>> f = d.blockInfo("/dev/loop0", 0) >>> print f [1048576000L, 104857600L, 104857600L] * python/libvirt-override-api.xml: Define override signature * python/generator.py: Skip C impl generator for virDomainGetBlockInfo * python/libvirt-override.c: Manual impl of virDomainGetBlockInfo
* nwfilter: python bindings for nwfilterStefan Berger2010-04-291-0/+124
| | | | | I have primarily followed the pattern of the 'secret' driver to provide support for the missing python bindings for the network filter API.
* Fixup python binding for virDomainSnapshot APIsDaniel P. Berrange2010-04-201-0/+46
| | | | | | | | | | The generator code was totally wrong for the virDomainSnapshot APIs, not generating the wrapper class, and giving methods the wrong names * generator.py: Set metadata for virDomainSnapshot type & APIs * libvirt-override-api.xml, libvirt-override.c: Hand-code the virDomainSnapshotListNames glue layer
* Fix up python bindings for new event callbacksDaniel P. Berrange2010-04-081-0/+451
| | | | | | | | | | | | | The generator was disabled for the new event callbacks, since they need to be hand written. This patch adds the C and python glue to expose the new APIs in the python binding. The python example program is extended to demonstrate of the code * python/libvirt-override.c: Registration and dispatch of events at the C layer * python/libvirt-override-virConnect.py: Python glue for events * examples/domain-events/events-python/event-test.py: Demo use of new event callbacks
* Introduce public API for domain async job handlingv0.7.7Daniel P. Berrange2010-03-021-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new public API that provides a way to get progress info on currently running jobs on a virDomainpPtr. APIs that are initially within scope of this idea are virDomainMigrate virDomainMigrateToURI virDomainSave virDomainRestore virDomainCoreDump These all take a potentially long time and benefit from monitoring. The virDomainJobInfo struct allows for various pieces of information to be reported - Percentage completion - Time - Overall data - Guest memory data - Guest disk/file data * include/libvirt/libvirt.h.in: Add virDomainGetJobInfo * python/generator.py, python/libvirt-override-api.xml, python/libvirt-override.c: Override for virDomainGetJobInfo API * python/typewrappers.c, python/typewrappers.h: Introduce wrapper for unsigned long long type
* libvirt-override.c: avoid a leak upon call with invalid argumentJim Meyering2010-02-161-2/+4
| | | | | * python/libvirt-override.c (libvirt_virConnectBaselineCPU): Don't leak the xmlcpus buffer upon encountering a non-string list element.
* virConnectBaselineCPU public APIJiri Denemark2010-02-121-0/+52
|
* Add virConnectGetVersion Python APIv0.7.6Taizo ITO2010-01-221-0/+27
| | | | | | | | | adds a new python API call for retrieving the running hypervisor version used by a connection: virConnectGetVersion * python/generator.py: skip virConnectGetVersion from autogenerated * python/libvirt-override-api.xml python/libvirt-override.c: define direct native bindings
* python: Add python bindings for virDomainMemoryStatsv0.7.5Adam Litke2009-12-201-0/+44
| | | | | | | | | | | | Enable virDomainMemoryStats in the python API. dom.memoryStats() will return a dictionary containing the supported statistics. A dictionary is required because the meaining of each quantity cannot be inferred from its index in a list. * python/generator.py: reenable bindings for this entry point * python/libvirt-override-api.xml python/libvirt-override.c: the generator can't handle this new function, add the new binding, and the XML description
* Fix threading problems in python bindingsDaniel P. Berrange2009-11-261-11/+100
| | | | | | | * libvirt-override.c: Add many missing calls to allow threading when entering C code, otherwise python blocks & then deadlocks when we have an async event to dispatch back into python code. Fix return value check for virDomainPinVcpu binding.
* python: Actually implement list*Interfaces bindingsv0.7.4v0.7.3Cole Robinson2009-11-201-0/+102
| | | | | | * python/generator.py python/libvirt-override-api.xml python/libvirt-override.c: implement the bindings for virConnectListInterfaces() and virConnectListDefinedInterfaces()
* Add virConnectGetLibvirtVersion APICole Robinson2009-11-121-0/+26
| | | | | | There is currently no way to determine the libvirt version of a remote libvirtd we are connected to. This is a useful piece of data to enable feature detection.
* give up python interpreter lock before calling cbDan Kenigsberg2009-11-031-2/+8
| | | | | | | | suggested by danpb on irc, patch by danken fixed for proper C syntax * python/libvirt-override.c: on event callback release the python interpreter lock and take it again when coming back so that the callback can reinvoke libvirt.
* Re-arrange python generator to make it clear what's auto-generatedDaniel P. Berrange2009-09-211-0/+2471
* README: New file describing what each file is used for * livvirt-override.c, libvirt-override.py, libvirt-override-api.xml, libvirt-override-virConnect.py: Manually written code overriding the generator * typewrappers.c, typewrappers.h: Data type wrappers * generator.py: Automatically pre-prend contents of libvirt-override.py to generated libvirt.py. Output into libvirt.py directly instead of libvirtclass.py. Don't generate libvirtclass.txt at all. Write C files into libvirt.c/.h directly * Makefile.am: Remove rule for creating libvirt.py from libvirt-override.py and libvirtclass.py, since generator.py does it directly