Commit Graph

116 Commits

Author SHA1 Message Date
Miloslav Trmač
9dc3b99345 Secret manipulation API docs refresh & wire up python generator
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'
2009-09-01 18:27:06 +01:00
Cole Robinson
3c2051f86a python: Raise exceptions if virDomain*Stats fail.
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.
2009-07-26 17:25:06 -04:00
Jim Meyering
07613d2020 remove all trailing blank lines
by running this command:
git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/'
This is in preparation for a more strict make syntax-check
rule that will detect trailing blank lines.
2009-07-16 15:06:42 +02:00
Jim Meyering
fb98f4b10d remove all .cvsignore files 2009-07-08 16:17:51 +02:00
Dan Kenigsberg
813a2f683d Fix python examples to use read-write conn
* docs/examples/python/domstart.py python/tests/create.py:
The two example were broken as they needed full-access connection
but only opened read-only connections
2009-07-06 17:05:41 +02:00
Daniel P. Berrange
7c99cb93c5 Fix python domain events example & binding 2009-05-28 11:02:11 +00:00
Daniel P. Berrange
c9e6c8c02f Add virInterface APIs to python code generator 2009-05-21 10:57:05 +00:00
Cole Robinson
5b13f4375d Better error reporting if 'import libvirtmod' fails
Don't squash a possibly legitimate libvirtmod error (e.g. some from
clashing libvirt.so versions) with 'Cannot import cygvirtmod'
2009-05-19 13:03:03 +00:00
Daniel P. Berrange
10467f1c5b Fix crash after calling virConnectClose 2009-04-01 10:39:12 +00:00
Daniel P. Berrange
61243e0f57 Fix generation of networkCreateXML and storagePoolCreateXML 2009-04-01 10:37:57 +00:00
Jim Meyering
260082321c update .gitignore and .hgignore files 2009-03-03 11:25:00 +00:00
Daniel P. Berrange
8d13558ae6 Internal driver API for sVirt support (James Morris & Dan Walsh) 2009-03-03 09:14:28 +00:00
Daniel P. Berrange
1d1748b63e Ignore some generated autotools files in example app 2009-03-02 20:24:46 +00:00
Daniel Veillard
a7868e0131 * python/Makefile.am: avoid a parallel make issue #472702
provided by Michael Marineau
Daniel
2009-02-26 13:58:35 +00:00
Cole Robinson
a3d1fb9cf3 Fix building python bindings: Skip bindings for virSaveLastError and
virFreeError
2009-02-16 22:44:49 +00:00
Daniel P. Berrange
554d82a200 Use global thread-local error for all python error reporting 2009-01-20 22:10:52 +00:00
Daniel P. Berrange
a485cae819 Replace __FUNCTION__ with __func__ for better portability (John Levon) 2008-12-18 12:25:11 +00:00
Daniel P. Berrange
264ed02079 Fix gcc-ism in python build (John Levon) 2008-12-18 12:20:00 +00:00
Jim Meyering
7125975d3c syntax-check: enforce the no-cvs-keywords prohibition
* Makefile.maint (sc_prohibit_cvs_keyword): New rule.
Suggested by Daniel Veillard.
The new test exposed two uses of $Date$.
* docs/Goals: Don't use $Date$.
* python/TODO: Likewise.
2008-12-15 10:24:54 +00:00
Daniel P. Berrange
1eeceaa649 Support domain lifecycle events for Xen (Ben Guthro & Daniel Berrange) 2008-11-25 10:44:52 +00:00
Daniel P. Berrange
c673689430 Fix python bindings events code (David Lively) 2008-11-24 19:28:12 +00:00
Daniel P. Berrange
83928c2074 Python binding for node device APIs (David Lively) 2008-11-21 12:41:15 +00:00
Daniel P. Berrange
6d04effac7 Add a virFreeCallback to event loop APIs 2008-11-19 16:24:01 +00:00
Daniel P. Berrange
6d41cb87d3 Change public API for virEventAddHandle to allow multiple registrations per FD 2008-11-19 16:19:36 +00:00
Daniel P. Berrange
3d41e86534 Add a virFreeCallback to virDomainEventRegister (from David Lively) 2008-11-19 15:25:24 +00:00
Daniel P. Berrange
d3d54d2fc9 Add domain events detail information 2008-11-17 16:43:00 +00:00
Daniel P. Berrange
48e9d7b726 Fix domain events python thread safety & incorrect enum generation 2008-11-17 10:26:09 +00:00
Daniel Veillard
7d3041aff3 * python/virConnect.py: needed for events from the python bindings
by Ben Guthro
daniel
2008-10-31 13:56:47 +00:00
Daniel Veillard
7b716fce8e * python/Makefile.am python/generator.py python/libvir.c
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
2008-10-31 10:13:45 +00:00
Daniel Veillard
1509b8027f Massive patch adding event APIs by Ben Guthro
* 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
2008-10-23 13:18:18 +00:00
Jim Meyering
164fbbd6e6 generate .gitignore files from .cvsignore ones
* Makefile.maint (sync-vcs-ignore-files): New target.
Prompted by a patch from James Morris.
http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773
Add all (now-generated) .gitignore files.
* .gitignore: New file.
* build-aux/.gitignore: New file.
* docs/.gitignore: New file.
* docs/devhelp/.gitignore: New file.
* docs/examples/.gitignore: New file.
* docs/examples/python/.gitignore: New file.
* gnulib/lib/.gitignore: New file.
* gnulib/lib/arpa/.gitignore: New file.
* gnulib/lib/netinet/.gitignore: New file.
* gnulib/lib/sys/.gitignore: New file.
* gnulib/tests/.gitignore: New file.
* include/.gitignore: New file.
* include/libvirt/.gitignore: New file.
* po/.gitignore: New file.
* proxy/.gitignore: New file.
* python/.gitignore: New file.
* python/tests/.gitignore: New file.
* qemud/.gitignore: New file.
* src/.gitignore: New file.
* tests/.gitignore: New file.
* tests/confdata/.gitignore: New file.
* tests/sexpr2xmldata/.gitignore: New file.
* tests/virshdata/.gitignore: New file.
* tests/xencapsdata/.gitignore: New file.
* tests/xmconfigdata/.gitignore: New file.
* tests/xml2sexprdata/.gitignore: New file.
2008-10-17 10:03:15 +00:00
Daniel Veillard
3bc324139e Xen interface order and fix python parallel build
* src/xend_internal.c: fix ordering when parsing multiple Xen
  interfaces, patch by Jim Fehlig
* python/Makefile.am: fix parallel build
Daniel
2008-10-01 15:31:02 +00:00
Daniel P. Berrange
8f789f1b2f Use libvirt error message for python exceptions 2008-08-22 10:50:18 +00:00
Daniel Veillard
3c487a4229 Fix connection lookup in python storage instances
* python/generator.py: patch from Cole Robinson trying to fix
  problem of connection lookup when creating storage instances
Daniel
2008-08-12 08:11:09 +00:00
Daniel Veillard
5ee15074af Skip python bindings for virDomainBlockPeek and virDomainMemoryPeek
* python/generator.py: skip generation for virDomainBlockPeek and
  virDomainMemoryPeek as they break the build
Daniel
2008-07-25 12:37:06 +00:00
Daniel P. Berrange
1e3e8d147a Ignore JIT'd python files 2008-07-09 08:17:51 +00:00
Daniel Veillard
2de7d9d224 * python/types.c: patch from Ryan Scott to remove misplaced verbosity
when compiling in debug mode.
Daniel
2008-06-25 11:42:27 +00:00
Daniel Veillard
c0626a02a9 * python/libvir.py python/libvirt-python-api.xml: more python
cleanups by Cole Robinson
Daniel
2008-06-11 07:49:01 +00:00
Daniel Veillard
cb96ae2583 * python/generator.py python/libvir.c python/libvirt-python-api.xml:
Apply patch from Cole Robinson fixing UUIDString for python
Daniel
2008-06-10 15:20:25 +00:00
Daniel P. Berrange
2168e27738 Fix python code generation for storage APIs 2008-05-29 14:53:58 +00:00
Daniel P. Berrange
922fbeb8b7 Don't free C object after destroy method in python 2008-05-21 20:18:20 +00:00
Daniel P. Berrange
b11f2be30e Python header workaround 2008-04-18 18:31:32 +00:00
Jim Meyering
f41ba90c18 Work around Python.h name-space pollution.
* python/libvir.c (HAVE_PTHREAD_H): #undef.
Without this, we'd get a redefinition warning.
2008-04-18 18:07:40 +00:00
Jim Meyering
5bf824ea10 convert TAB-based indentation in C sources to use only spaces
Done using this command (also includes .c.in and .h.in files):
for i in $(g ls-files|grep -E '\.[ch](\.in)?$'|grep -v gnulib); do
  expand -i $i > j && mv j $i;done
2008-04-10 16:54:54 +00:00
Jim Meyering
dc42a9d2de remove Vim and Emacs variable settings from C source files
Done with these commands:
git grep -l Local.variab|xargs \
  perl -0x3b -pi -e 's,\n+/\*\n \* vim:(.|\n)*,\n,'

git grep -l Local.variab|xargs \
  perl -0x3b -pi -e 's,\n+/\*\n \* Local variables:\n(.|\n)*,\n,'
2008-04-10 16:53:29 +00:00
Daniel Veillard
2579443e21 Fix potential infinite loop in python generator
* python/generator.py: fix an infinite loop bug
Daniel
2008-04-08 08:26:15 +00:00
Richard W.M. Jones
3e59e29859 Fix typo "informations" -> "information" (Atsushi SAKAI and
Saori FUKUTA).
2008-03-14 11:08:03 +00:00
Richard W.M. Jones
bb8340c18d Many typos fixed (Atsushi SAKAI). 2008-02-29 12:53:10 +00:00
Daniel P. Berrange
859679f72a Added python binding for storage APIs 2008-02-20 15:26:22 +00:00
Daniel Veillard
ecaf98fcc5 Python bindings return values fixes
* python/libvir.c: apply patch from Cole Robinson to provide
  return values for manulally written python bindings.
Daniel
2008-02-07 09:49:13 +00:00