summaryrefslogtreecommitdiffstats
path: root/generator.py
Commit message (Collapse)AuthorAgeFilesLines
* Add usage type/id as a public API property of virSecretv0.7.1libvirt-0.7.1-9.fc13libvirt-0.7.1-9.fc12libvirt-0.7.1-8.fc13libvirt-0.7.1-8.fc12libvirt-0.7.1-15.fc12libvirt-0.7.1-14.fc12libvirt-0.7.1-13.fc12libvirt-0.7.1-12.fc13libvirt-0.7.1-12.fc12libvirt-0.7.1-11.fc13libvirt-0.7.1-11.fc12libvirt-0.7.1-10.fc13libvirt-0.7.1-10.fc12Daniel P. Berrange2009-09-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in: Add virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage * python/generator.py: Mark virSecretGetUsageType, virSecretGetUsageID as not throwing exceptions * qemud/remote.c: Implement dispatch for virLookupSecretByUsage * qemud/remote_protocol.x: Add usage type & ID as attributes of remote_nonnull_secret. Add RPC calls for new public APIs * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h, qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate * src/datatypes.c, src/datatypes.h: Add usageType and usageID as properties of virSecretPtr * src/driver.h: Add virLookupSecretByUsage driver entry point * src/libvirt.c: Implement virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage * src/libvirt_public.syms: Export virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage * src/remote_internal.c: Implement virLookupSecretByUsage entry * src/secret_conf.c, src/secret_conf.h: Remove the virSecretUsageType enum, now in public API. Make volume path mandatory when parsing XML * src/secret_driver.c: Enforce usage uniqueness when defining secrets. Implement virSecretLookupByUsage api method * src/virsh.c: Include usage for secret-list command
* Fix UUID handling in secrets/storage encryption APIsDaniel P. Berrange2009-09-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert all the secret/storage encryption APIs / wire format to handle UUIDs in raw format instead of non-canonical printable format. Guarentees data format correctness. * docs/schemas/storageencryption.rng: Make UUID mandatory for a secret and validate fully * docs/schemas/secret.rng: Fully validate UUID * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add virSecretLookupByUUID and virSecretGetUUID. Make virSecretGetUUIDString follow normal API design pattern * python/generator.py: Skip generation of virSecretGetUUID, virSecretGetUUIDString and virSecretLookupByUUID * python/libvir.c, python/libvirt-python-api.xml: Manual impl of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID * qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/ Fix get_nonnull_secret/make_nonnull_secret to use unsigned char * qemud/remote_protocol.x: Fix remote_nonnull_secret to use a remote_uuid instead of remote_nonnull_string for UUID field. Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an remote_uuid value * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h, qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate * src/datatypes.h, src/datatypes.c: Store UUID in raw format instead of printable. Change virGetSecret to use raw format UUID * src/driver.h: Rename virDrvSecretLookupByUUIDString to virDrvSecretLookupByUUID and use raw format UUID * src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID and re-implement virSecretLookupByUUIDString and virSecretGetUUIDString in terms of those * src/libvirt_public.syms: Add virSecretLookupByUUID and virSecretGetUUID * src/remote_internal.c: Rename remoteSecretLookupByUUIDString to remoteSecretLookupByUUID. Fix typo in args for remoteSecretDefineXML impl. Use raw UUID format for get_nonnull_secret and make_nonnull_secret * src/storage_encryption_conf.c, src/storage_encryption_conf.h: Storage UUID in raw format, and require it to be present in XML. Use UUID parser to validate. * secret_conf.h, secret_conf.c: Generate a UUID if none is provided. Storage UUID in raw format. * src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets in a filed with printable UUID, instead of base64 UUID. * src/virsh.c: Adjust for changed public API contract of virSecretGetUUIDString. * src/storage_Backend.c: DOn't undefine secret we just generated upon successful volume creation. Fix to handle raw UUIDs. Generate a non-clashing UUID * src/qemu_driver.c: Change to use lookupByUUID instead of lookupByUUIDString
* Secret manipulation API docs refresh & wire up python generatorMiloslav Trmač2009-09-011-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sample session: >>> import libvirt >>> c = libvirt.open('qemu:///session') >>> c.listSecrets() ['12247729-47d2-a783-88ce-b329d4781cd3', 'reee', 'abc'] >>> s = c.secretDefineXML("<secret ephemeral='no' private='no'>\n<description>Something for use</description>\n<volume>/foo/bar</volume>\n</secret>\n") >>> s.UUIDString() '340c2dfb-811b-eda8-da9e-25ccd7bfd650' >>> s.XMLDesc() "<secret ephemeral='no' private='no'>\n <uuid>340c2dfb-811b-eda8-da9e-25ccd7bfd650</uuid>\n <description>Something for use</description>\n <volume>/foo/bar</volume>\n</secret>\n" >>> s.setValue('abc\0xx\xffx') 0 >>> s.value() 'abc\x00xx\xffx' >>> s.undefine() 0 * python/generator.py: Add rules for virSecret APIs * python/libvir.c, python/libvirt-python-api.xml: Manual impl of virSecretSetValue, virSecretGetValue$ and virConnectListSecrets APIs * python/libvirt_wrap.h, python/types.c: Wrapper for virSecret objects * docs/libvirt-api.xml, docs/libvirt-refs.xml, docs/html/libvirt-virterror.html, docs/html/libvirt-libvirt.html, docs/devhelp/libvirt-virterror.html, docs/devhelp/libvirt-libvirt.html: Re-generate with 'make api'
* python: Raise exceptions if virDomain*Stats fail.v0.7.0Cole Robinson2009-07-261-1/+4
| | | | | The generator couldn't tell that the stats return values were pointers. Stick a white list in the function which tries to make this distinction.
* Add virInterface APIs to python code generatorDaniel P. Berrange2009-05-211-3/+42
|
* Fix crash after calling virConnectClosev0.6.3v0.6.2libvirt-0.6.2-19.fc11LIBVIRT_0_6_3LIBVIRT_0_6_2Daniel P. Berrange2009-04-011-0/+3
|
* Fix generation of networkCreateXML and storagePoolCreateXMLDaniel P. Berrange2009-04-011-0/+6
|
* Internal driver API for sVirt support (James Morris & Dan Walsh)Daniel P. Berrange2009-03-031-0/+2
|
* Fix building python bindings: Skip bindings for virSaveLastError andCole Robinson2009-02-161-0/+2
| | | | virFreeError
* Python binding for node device APIs (David Lively)Daniel P. Berrange2008-11-211-3/+23
|
* * python/Makefile.am python/generator.py python/libvir.cDaniel Veillard2008-10-311-4/+15
| | | | | | | | | | python/libvir.py python/libvirt_wrap.h python/types.c: adds support for events from the python bindings, also improves the generator allowing to embbed per function definition files, patch by Ben Guthro * examples/domain-events/events-python/event-test.py: also adds a programming example Daniel
* Massive patch adding event APIs by Ben GuthroDaniel Veillard2008-10-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | * include/libvirt/libvirt.h include/libvirt/libvirt.h.in src/libvirt.c src/libvirt_sym.version: new libvirt event entry points, big patch provided by Ben Guthro * Makefile.am configure.in src/driver.h src/event.c src/event.h src/internal.h src/libvirt.c src/libvirt_sym.version src/lxc_driver.c src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c src/remote_internal.c src/storage_backend_fs.c src/test.c qemud/event.c qemud/event.h qemud/mdns.c qemud/qemud.c qemud/qemud.h qemud/remote.c qemud/remote_dispatch_localvars.h qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h qemud/remote_protocol.c qemud/remote_protocol.h qemud/remote_protocol.x proxy/Makefile.am python/generator.py: Not much is left untouched by the patch adding the events support * docs/libvirt-api.xml docs/libvirt-refs.xml docs/html/libvirt-libvirt.html: regenerated the docs * examples/domain-events/events-c/Makefile.am examples/domain-events/events-c/event-test.c: a test example * AUTHORS: added Ben Guthro daniel
* Fix connection lookup in python storage instancesDaniel Veillard2008-08-121-1/+5
| | | | | | * python/generator.py: patch from Cole Robinson trying to fix problem of connection lookup when creating storage instances Daniel
* Skip python bindings for virDomainBlockPeek and virDomainMemoryPeekDaniel Veillard2008-07-251-0/+2
| | | | | | * python/generator.py: skip generation for virDomainBlockPeek and virDomainMemoryPeek as they break the build Daniel
* * python/generator.py python/libvir.c python/libvirt-python-api.xml:Daniel Veillard2008-06-101-2/+3
| | | | | Apply patch from Cole Robinson fixing UUIDString for python Daniel
* Don't free C object after destroy method in pythonDaniel P. Berrange2008-05-211-6/+1
|
* Fix potential infinite loop in python generatorv0.4.2LIBVIRT_0_4_2Daniel Veillard2008-04-081-0/+3
| | | | | * python/generator.py: fix an infinite loop bug Daniel
* Added python binding for storage APIsDaniel P. Berrange2008-02-201-3/+88
|
* Remove all trailing blanks; turn on the rule to detect them.Jim Meyering2008-02-051-4/+4
| | | | | * Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank. * .x-sc_trailing_blank: New file, to exempt the few binary files.
* Given code like if (foo) free (foo); remove the useless "if (foo) " part.Jim Meyering2008-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Likewise, given if (foo != NULL) free (foo); remove the useless "if" test. * proxy/libvirt_proxy.c: Remove unnecessary "if" test before free. * python/generator.py: Likewise. * qemud/qemud.c: Likewise. * src/buf.c: Likewise. * src/conf.c: Likewise. * src/hash.c: Likewise. * src/iptables.c: Likewise. * src/libvirt.c: Likewise. * src/openvz_conf.c: Likewise. * src/qemu_conf.c: Likewise. * src/qemu_driver.c: Likewise. * src/remote_internal.c: Likewise. * src/test.c: Likewise. * src/virsh.c: Likewise. * src/virterror.c: Likewise. * src/xen_internal.c: Likewise. * src/xen_unified.c: Likewise. * src/xend_internal.c: Likewise. * src/xm_internal.c: Likewise. * src/xml.c: Likewise. * src/xmlrpc.c: Likewise. * src/xs_internal.c: Likewise. * tests/testutils.c: Likewise. * tests/xencapstest.c: Likewise. * tests/xmconfigtest.c: Likewise.
* Make python generator fail build on any missing APIsDaniel P. Berrange2008-01-211-17/+33
|
* Add missing vcpu/schedular APIs to python bindingDaniel P. Berrange2008-01-211-0/+6
|
* * python/generator.py python/libvir.c python/libvirt-python-api.xml:Daniel Veillard2007-12-071-0/+1
| | | | | add a python binding for virNodeGetCellsFreeMemory Daniel
* * python/generator.py python/libvir.c python/libvirt-python-api.xml:v0.3.3LIBVIRT_0_3_3Daniel Veillard2007-09-301-0/+2
| | | | | provide bindings for block and interface statistics Daniel
* * libvirt.spec.in NEWS docs/* po/*: preparing release 0.3.1v0.3.2v0.3.1LIBVIRT_0_3_2LIBVIRT_0_3_1Daniel Veillard2007-07-241-4/+0
| | | | | | * src/libvirt.c python/generator.py: some cleanup and warnings from Richard W.M. Jones Daniel
* Mon Jun 25 16:55:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>Richard W.M. Jones2007-06-251-0/+4
| | | | | | | * include/libvirt/libvirt.h.in, src/libvirt.c, src/libvirt_sym.version, python/generator.py: Added virDomainGetConnect and virNetworkGetConnect to allow us to get the "hidden" connection associated with each domain or network.
* +Tue May 29 15:56:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>v0.2.3LIVIRT_0_2_3Richard W.M. Jones2007-05-291-0/+2
| | | | | | | | | | + + * python/generator.py, python/libvir.c, python/libvir.py: + Wrap the virGetVersion call as Python libvirt.getVersion. + + * src/libvirt.c: Change virGetVersion so that the driver name + is case insensitive. +
* Fixed exception reporting for domain/network operationsv0.2.2LIBVIRT_0_2_2Daniel P. Berrange2007-04-161-16/+34
|
* * python/generator.py: Python bindings now throw exceptionsRichard W.M. Jones2007-03-281-9/+121
| | | | | in almost all cases where an error is encountered in the underlying libvirt code.
* * python/generator.py: patch from Tatsuro Enokura to fixv0.2.1LIBVIRT_0_2_1Daniel Veillard2007-03-161-2/+5
| | | | | virNetworkDefine binding Daniel
* * python/generator.py: fix the python binding generation forDaniel Veillard2007-03-151-0/+4
| | | | | | | virNetworkLookup...() functions, which were clashing with equivalent virConnLookup...() equivalents, as reported by Tatsuro Enokura Daniel
* Added python bindings for networking APIsDaniel P. Berrange2007-03-091-1/+24
|
* Blacklist vshRunConsole from pythonv0.2.0LIBVIRT_0_2_0Daniel P. Berrange2007-02-141-1/+2
|
* Added binding for virConnectListDefinedDomains apiv0.1.9v0.1.11v0.1.10LIBVIRT_0_1_9LIBVIRT_0_1_11LIBVIRT_0_1_10Daniel P. Berrange2006-11-161-0/+1
|
* * python/generator.py: changed the generator to generate a referenceDaniel Veillard2006-11-091-0/+10
| | | | | | | from Domain class instances to the Connect they were issued from should fix rhbz#204490 * docs//*: rebuilt Daniel
* Propagate libvirt errors back with python exceptionsDaniel P. Berrange2006-11-071-2/+13
|
* Make python bindings threaded, by dropping/acquiring Python GIL where neededDaniel P. Berrange2006-10-241-2/+4
|
* * python/generator.py: fix the generator when handling long integersv0.1.4LIBVIRT_0_1_4Daniel Veillard2006-08-041-2/+2
| | | | | | Dan Berrange reported problems due to this when using virDomainSetMemory bindings Daniel
* * configure.in libvirt.spec.in docs/examples/* include/Makefile.amDaniel Veillard2006-06-261-1/+1
| | | | | | | | | | include/libvirt/virterror.h python/generator.py python/libvir.c python/libvirt_wrap.h src/driver.h src/internal.h src/test.h src/virsh.c src/virterror.c src/xend_internal.c src/xend_internal.h src/xml.c src/xml.h: moved the includes from include/ to include/libvirt to reflect the installed include tree. This avoid using "" in the includes themselves. Daniel
* * include/libvirt.h[.in] include/virterror.h src/driver.hDaniel Veillard2006-03-291-0/+4
| | | | | | | | | | | src/internal.h src/libvirt_sym.version src/xen_internal.c src/xs_internal.c: added a new entry point to get node hardware informations virGetNodeInfo, and associated driver hook. * src/xend_internal.c: implemented the node and version information hooks for the Xen Daemon * python/libvir.c python/libvirt-python-api.xml python/generator.py: also added Python bindings for the new call Daniel
* * TODO: updatedDaniel Veillard2006-02-281-13/+12
| | | | | | | | | | * python/Makefile.am python/generator.py python/libvir.c python/libvir.py: improved python binding, raise exception when an instance creation or lookup fails, and add support for the global error handler, per conn handler still needed * python/tests/error.py python/tests/Makefile.am: adding a regression test Daniel
* * python/generator.py python/libvir.c python/libvirt-python-api.xml:Daniel Veillard2006-02-241-1/+2
| | | | | | UUID strings can contain zeroes, so the autogenerated conversion functions don't work. Daniel
* * src/libvirt.c: fixing a bug before the release of 0.0.5v0.0.5LIBVIRT_0_0_5Daniel Veillard2006-02-231-1/+6
| | | | | | | | * python/generator.py python/libvir.c python/libvirt-python-api.xml: also fixing the binding for getting a domain UUID * python/tests/Makefile.am python/tests/uuid.py: added a test for the new UUID API Daniel
* * //* : renamed the project libvirt , this affects all makefiles,v0.0.3LIBVIRT_0_0_3Daniel Veillard2006-02-091-25/+25
| | | | | | the specs, the icons, the docs, etc ... * configure.in: prepare for 0.0.3 Daniel
* * python/*: update of the python bindings, fix names, addDaniel Veillard2006-01-311-2/+27
| | | | | missing features like list of domains and domain info extraction Daniel
* * TODO: updatedDaniel Veillard2006-01-261-0/+2
| | | | | | * docs/search.php: use the new web site design * python/generator.py: fix a generation bug on python keyword Daniel
* * Makefile.am configure.in libvir.spec.in python/*: added a firstv0.0.1LIBVIR_0_0_1Daniel Veillard2005-12-191-0/+898
version for python bindings, heavilly based on libxml2/libxslt way of doing things, maybe this need to be revisited. Added packaging too. * src/hash.h: fixed the Copyright notice. Daniel