summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Pino Toscano [Fri, 21 Sep 2018 09:59:46 +0000 (11:59 +0200)]
Various small API doc improvements
Pino Toscano [Fri, 21 Sep 2018 09:59:45 +0000 (11:59 +0200)]
Synchronize few states/types with libvirt 4.6.0
Add states/types that do not require using enum values in newer libvirt
versions.
Pino Toscano [Fri, 21 Sep 2018 09:59:44 +0000 (11:59 +0200)]
Fix broken libvirt links
Split a single broken link into 3 sections that replaced the old page.
Pino Toscano [Fri, 21 Sep 2018 09:59:43 +0000 (11:59 +0200)]
Switch all the links to https
This does not fix broken links.
Pino Toscano [Fri, 21 Sep 2018 09:59:42 +0000 (11:59 +0200)]
Libvirt_version: fix license comment
Do not use the ocamldoc comment for it, since there is no need to put
the copyright/license block in the generated API documentation.
Pino Toscano [Wed, 19 Sep 2018 17:16:21 +0000 (19:16 +0200)]
Expose Secret API
Add a new Secret submodule to expose most of the virSecret* APIs, so it
is possible to interact with libvirt secrets.
Add the needed glue in the generator, in the helper macros/functions,
and in the Libvirt module itself.
Include a simple example, list_secrets.ml.
Pino Toscano [Wed, 19 Sep 2018 17:16:20 +0000 (19:16 +0200)]
examples: switch from C.connect_readonly to connect_auth_readonly
This way it is possible to connect to URIs that require some kind of
authentication.
Pino Toscano [Wed, 5 Sep 2018 16:03:14 +0000 (18:03 +0200)]
Implement Connect.get_auth_default ()
Add a function to return the default libvirt authentication handler,
in case it is needed.
Followup of commit
1ea690b8c809f3b13cb6400721cf28e65b13ca39.
Pino Toscano [Wed, 5 Sep 2018 16:03:13 +0000 (18:03 +0200)]
Make Optstring_val return const char *
The users just read the result, never changing it.
This also fixes the build in case CAML_SAFE_STRING is defined (which
makes String_val() return const char *).
Pino Toscano [Thu, 30 Aug 2018 16:14:25 +0000 (18:14 +0200)]
Update config.guess and config.sub
Update config.guess and config.sub from their canonical upstream
location, after 12 years.
Pino Toscano [Thu, 30 Aug 2018 16:14:24 +0000 (18:14 +0200)]
Remove note from the TODO file
Authentication was implemented with
commit
1ea690b8c809f3b13cb6400721cf28e65b13ca39.
Richard W.M. Jones [Thu, 30 Aug 2018 10:31:18 +0000 (11:31 +0100)]
Update MANIFEST
Pino Toscano [Thu, 30 Aug 2018 10:13:44 +0000 (12:13 +0200)]
Drop the generated libvirt_c.c from the sources
Let it be autogenerated from the generator.pl script during build, with
no need to keep a copy of it in the sources.
This also makes Perl an hard requirement, checking for its presence at
configure time.
Pino Toscano [Thu, 30 Aug 2018 10:13:43 +0000 (12:13 +0200)]
Disable -Wmissing-prototypes for GCC
We do not provide prototypes for all the C implementations of OCaml
APIs, so just make GCC not warn about that for now.
Pino Toscano [Thu, 30 Aug 2018 10:13:42 +0000 (12:13 +0200)]
Register a custom exception printer
This way all the users of ocaml-libvirt can use Printexc.to_string to
print a Virterror exception, even in case they do not catch it
explicitly.
Pino Toscano [Thu, 30 Aug 2018 10:13:41 +0000 (12:13 +0200)]
Avoid VLAs with size depending on user input
Do not use var-length arrays with sizes from user input (like
parameters), since they may grow the stack too much.
Instead, allocate the memory on the heap.
Pino Toscano [Thu, 30 Aug 2018 10:13:40 +0000 (12:13 +0200)]
Workaround lack of constness in custom_operations::identifier
Sadly the custom_operations struct of the OCaml C API uses char* for the
'identifier' member, even though it does not change it.
To avoid getting warnings when building with stricter CFLAGS, apply ugly
casts.
Pino Toscano [Thu, 30 Aug 2018 10:13:39 +0000 (12:13 +0200)]
Add an helper CHECK_ERROR_CLEANUP macro
Extend the existing CHECK_ERROR macro to allow some code to be executed
right before raising Virterror. Rework CHECK_ERROR to use
CHECK_ERROR_CLEANUP.
Pino Toscano [Thu, 30 Aug 2018 10:13:38 +0000 (12:13 +0200)]
Add Domain.get_xml_desc_flags
Much like Domain.get_xml_desc with the possibility to specify flags for
the XML description. The function is marked with a [`W] phantom because
some of the flags (e.g. XmlSecure) require a read/write connection.
Pino Toscano [Thu, 30 Aug 2018 10:13:37 +0000 (12:13 +0200)]
Synchronize Virterror with libvirt 4.6.0
In particular, add all the various error codes, and error domains.
Also, add an older domain that was previously skipped.
Pino Toscano [Thu, 30 Aug 2018 10:13:36 +0000 (12:13 +0200)]
Connect: add auth/credential handling for connect
Add OCaml versions of virConnectCredential & virConnectAuth structs,
using them to implement proper connect_auth & connect_auth_readonly.
This makes it possible to properly supply credentials when opening a
connection.
Pino Toscano [Thu, 30 Aug 2018 10:13:35 +0000 (12:13 +0200)]
Add Val_opt_const & Val_const_ptr_t
Counterparts of Val_opt & Val_ptr_t, but with constness for the pointer.
Richard W.M. Jones [Wed, 8 Nov 2017 16:52:58 +0000 (16:52 +0000)]
Use -safe-string and fix the library.
Note this changes the type of the cpumap from string to bytes,
since (by the design of the API) it must be mutated.
Richard W.M. Jones [Tue, 28 Mar 2017 12:52:51 +0000 (13:52 +0100)]
Change binding of virConnectGetAllDomainStats to return dom UUID.
The virDomainPtr object returned by this binding isn't a reliable
virDomainPtr object. The only thing we can safely do with it is to
get its UUID. Modify the API correspondingly.
Updates commit
380f1e05b244ae4750ca5101b5b5a182dcd0d1fd.
Richard W.M. Jones [Tue, 28 Mar 2017 12:11:09 +0000 (13:11 +0100)]
examples: Print more stats in the get_all_domain_stats.ml example.
Updates commit
380f1e05b244ae4750ca5101b5b5a182dcd0d1fd.
Richard W.M. Jones [Tue, 28 Mar 2017 09:08:06 +0000 (10:08 +0100)]
Add a binding for virConnectGetAllDomainStats (RHBZ#1390171).
Richard W.M. Jones [Mon, 27 Mar 2017 13:13:47 +0000 (14:13 +0100)]
Update dependencies.
Richard W.M. Jones [Mon, 27 Mar 2017 13:12:50 +0000 (14:12 +0100)]
Use -g -warn-error.
Use -g for ocamlopt. ocamlopt has supported generating DWARF
information for quite a long time.
Also use -warn-error with the same set of warnings as is used
by libguestfs.
Fix a warning in examples/get_cpu_stats.ml found by enabling
-warn-error.
Richard W.M. Jones [Fri, 5 Feb 2016 16:28:34 +0000 (16:28 +0000)]
Remove unused 'not_supported' function.
Found by compiling under GCC 6. The warning was:
In file included from libvirt_c.c:2058:0:
libvirt_c_epilogue.c:89:1: error: 'not_supported' defined but not used [-Werror=unused-function]
not_supported (const char *fn)
^~~~~~~~~~~~~
Richard W.M. Jones [Tue, 17 Mar 2015 12:53:29 +0000 (12:53 +0000)]
Don't bother checking return from virInitialize.
The Perl bindings don't do this, and it seems that the call can never
fail, or if it does we don't care.
Richard W.M. Jones [Tue, 17 Mar 2015 12:51:50 +0000 (12:51 +0000)]
Suppress errors to stderr and use thread-local virErrorPtr
This allows us to capture errors that happen during virConnectOpen,
without spewing error messages on stderr.
The patch is rather large, only because we don't need to pass the
virConnectPtr argument to CHECK_ERROR/_raise_virterror any longer.
Richard W.M. Jones [Fri, 6 Mar 2015 15:35:46 +0000 (15:35 +0000)]
Add a binding for virDomainCreateXML.
This is more modern than the ancient virDomainCreateLinux API,
and crucially allows you to pass flags such as AUTODESTROY.
Richard W.M. Jones [Sat, 30 Aug 2014 18:10:19 +0000 (19:10 +0100)]
Use C99 standard int64_t instead of OCaml defined (and soon to go) int64.
Richard W.M. Jones [Tue, 26 Aug 2014 14:38:10 +0000 (15:38 +0100)]
Kill broken NSIS support.
Richard W.M. Jones [Mon, 25 Aug 2014 19:48:02 +0000 (20:48 +0100)]
Version 0.6.1.4.
Richard W.M. Jones [Mon, 25 Aug 2014 19:46:13 +0000 (20:46 +0100)]
Update MANIFEST.
Richard W.M. Jones [Mon, 25 Aug 2014 19:44:12 +0000 (20:44 +0100)]
Version 0.6.1.3.
Richard W.M. Jones [Wed, 8 May 2013 11:31:26 +0000 (12:31 +0100)]
Update dependencies.
David Scott [Wed, 24 Apr 2013 10:39:06 +0000 (11:39 +0100)]
Add a simple example to show how to receive event callbacks
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Wed, 24 Apr 2013 10:39:05 +0000 (11:39 +0100)]
Add event callback implementation based on virConnectDomainEventRegisterAny
A client may register a callback as follows:
E.register_default_impl ();
let conn = C.connect_readonly ?name () in
let id = E.register_any conn (E.Lifecycle (fun dom e ->
printd dom "Lifecycle %s" (E.Lifecycle.to_string e)
)) in
Internally this will:
1. generate a unique int64 used to identify the specific callback
2. add the callback to an OCaml hashtable based on the signature
(there is a distinct hashtable per callback signature)
3. call virConnectDomainEventRegisterAny which registers a
generic C callback in the stubs (one distinct callback per
signature) and supply the int64 as the "opaque" data
The client must enter the event loop with:
while true do
E.run_default_impl ()
done
When an event is triggered, the C callback will upcall into an OCaml
function (having re-acquired the heap lock) supplying the int64 value.
The OCaml function can then find the right callback in the Hashtbl
and call it.
The client can deregister the callback with:
E.deregister_any conn id;
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Wed, 24 Apr 2013 10:39:04 +0000 (11:39 +0100)]
Add binding for virConnectSetKeepAlive
This one is a 'one-off' but it ought to be possible to use the generator
to create the function (it has signature 'conn, int, int : int')
This function first appeared in libvirt version 0.9.8.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Wed, 24 Apr 2013 10:39:03 +0000 (11:39 +0100)]
Remove backwards compatability logic to simplify the bindings
Rather than compile against old versions of libvirt and resort
to throwing 'not supported' exceptions at runtime, we instead
require all symbols and definitions to be available at compile-time
i.e. we require a much more recent libvirt.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Wed, 17 Apr 2013 10:23:00 +0000 (11:23 +0100)]
Fix typo in ocaml_libvirt_storage_vol_get_info
The info.capacity was being overwritten with the info.allocation.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Richard W.M. Jones [Wed, 6 Mar 2013 17:00:43 +0000 (17:00 +0000)]
Update dependencies.
David Scott [Wed, 6 Mar 2013 16:18:05 +0000 (16:18 +0000)]
Functions returning "unit" correspond to C fns which use -1 for failure
This affects the following functions:
virStoragePoolBuild
virStoragePoolDelete
virStorageVolDelete
Previously a call to virStorageVolDelete would succeed returning 0, which
was interpreted as false, causing us to raise an exception with
VIR_ERR_NONE.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Wed, 6 Mar 2013 16:18:04 +0000 (16:18 +0000)]
Volume.delete takes a flags parameter
This corrects a mismatch between the generated C stubs and the .ml
interface.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
David Scott [Wed, 6 Mar 2013 16:18:03 +0000 (16:18 +0000)]
Correct typos in the storage interface's phantom types
A connection is either read/write (type rw = [`R|`W]) or read/only
(type ro = [`R]). A function which requires the ability to write
needs to take a parameter [> `W] rather than [`W] (which would
correspond to a write-only connection).
We can now use a read/write connection to call:
Pool.set_autostart
Volume.create_xml
Volume.delete
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Richard W.M. Jones [Fri, 12 Oct 2012 10:48:17 +0000 (11:48 +0100)]
Add contrib directory, and non-upstream patch to add Domain.get_cpu_stats_total.
This patch needs more thorough review.
Hu Tao [Wed, 9 May 2012 08:48:30 +0000 (16:48 +0800)]
remove parameter nr_pcpus of Libvirt.Domain.get_cpu_stats
remove the value because we can get it from the libvirt API
Richard W.M. Jones [Fri, 23 Mar 2012 12:39:31 +0000 (12:39 +0000)]
Version 0.6.1.2.
Richard W.M. Jones [Fri, 23 Mar 2012 12:38:25 +0000 (12:38 +0000)]
Domain.get_cpu_stats: get number of params correctly (thanks Eric Blake).
See:
https://www.redhat.com/archives/libvir-list/2012-March/msg00306.html
This fixes commit
c96c3a119b44d3321dddc5e189dcba991aaff677.
Richard W.M. Jones [Mon, 5 Mar 2012 16:29:21 +0000 (16:29 +0000)]
Version 0.6.1.1.
Lai Jiangshan [Wed, 8 Feb 2012 08:59:45 +0000 (16:59 +0800)]
ocaml-libvirt: add D.get_cpu_stats() API to ocaml-libvirt
Changed from V3:
use new virDomainGetCPUStats() libvirt-API.
use C code to construct the typed_param list array
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Richard W.M. Jones [Mon, 5 Mar 2012 16:19:14 +0000 (16:19 +0000)]
Remove virConnectListAllDomains.
This was never in a released libvirt.
Richard W.M. Jones [Mon, 5 Mar 2012 16:15:56 +0000 (16:15 +0000)]
Add header to Make.rules.in.
Richard W.M. Jones [Mon, 5 Mar 2012 16:12:27 +0000 (16:12 +0000)]
Remove obsolete: mlvirsh, gettext support, Windows installer.
Richard W.M. Jones [Mon, 5 Mar 2012 16:05:51 +0000 (16:05 +0000)]
Remove .hgignore.
Richard W.M. Jones [Mon, 5 Mar 2012 16:04:53 +0000 (16:04 +0000)]
Remove jobs API.
This was never in a released libvirt.
Richard Jones [Mon, 16 Nov 2009 13:47:02 +0000 (13:47 +0000)]
Add .gitignore file.
Richard W.M. Jones [Tue, 10 Mar 2009 11:10:09 +0000 (11:10 +0000)]
Correct to-do list.
Richard W.M. Jones [Tue, 10 Mar 2009 10:32:48 +0000 (10:32 +0000)]
Version 0.6.1.0 for release.
Richard W.M. Jones [Tue, 10 Mar 2009 10:32:33 +0000 (10:32 +0000)]
Correct mlvirsh for new read-write connection.
Richard W.M. Jones [Tue, 10 Mar 2009 10:31:56 +0000 (10:31 +0000)]
virDomainBlockPeek and virDomainMemoryPeek need a read/write connection
(CVE-2008-5086) (found by David Lutterkort).
Richard W.M. Jones [Wed, 3 Sep 2008 16:36:20 +0000 (17:36 +0100)]
D.get_id returns -1 for inactive domains instead of throwing an error.
Richard W.M. Jones [Wed, 3 Sep 2008 16:36:04 +0000 (17:36 +0100)]
Don't duplicate unnecessary call to D.get_info.
Richard W.M. Jones [Wed, 3 Sep 2008 15:27:43 +0000 (16:27 +0100)]
Implement version 3 of virConnectListAllDomains.
Richard W.M. Jones [Mon, 1 Sep 2008 14:54:45 +0000 (15:54 +0100)]
Add support for virConnectListAllDomains call.
Richard W.M. Jones [Fri, 29 Aug 2008 16:39:44 +0000 (17:39 +0100)]
Revert previous change.
Richard W.M. Jones [Fri, 29 Aug 2008 16:38:12 +0000 (17:38 +0100)]
Use CAMLreturn0 to avoid a warning.
Richard W.M. Jones [Thu, 14 Aug 2008 08:45:34 +0000 (09:45 +0100)]
Allow destdir options to be passed to 'make install' (Guillaume Rousse).
Richard W.M. Jones [Wed, 9 Jul 2008 19:55:26 +0000 (20:55 +0100)]
Split peek requests into maximum-sized chunks.
Richard W.M. Jones [Wed, 9 Jul 2008 19:55:15 +0000 (20:55 +0100)]
Add Domain.max_peek function to determine maximum size of
peek requests.
Richard W.M. Jones [Wed, 9 Jul 2008 11:52:12 +0000 (12:52 +0100)]
Don't pass -destdir parameter to ocamlfind. Version 0.4.4.2.
Richard W.M. Jones [Mon, 7 Jul 2008 13:03:21 +0000 (14:03 +0100)]
Version 0.4.4.1 for release.
Richard W.M. Jones [Mon, 7 Jul 2008 13:03:04 +0000 (14:03 +0100)]
Changed INRIA to Red Hat (for Debian)
Richard W.M. Jones [Mon, 7 Jul 2008 11:19:37 +0000 (12:19 +0100)]
Files missed by 'make distclean' (for Debian)
Richard W.M. Jones [Mon, 7 Jul 2008 10:37:04 +0000 (11:37 +0100)]
Removed old ChangeLog file.
Richard W.M. Jones [Mon, 7 Jul 2008 10:30:20 +0000 (11:30 +0100)]
Clarify the license again for Debian.
Richard W.M. Jones [Mon, 7 Jul 2008 10:27:13 +0000 (11:27 +0100)]
Revert previous commit.
Richard W.M. Jones [Mon, 7 Jul 2008 09:57:00 +0000 (10:57 +0100)]
Reference the license from LGPL files (for Debian).
Richard W.M. Jones [Mon, 7 Jul 2008 09:32:32 +0000 (10:32 +0100)]
Clarify the license for Debian.
Richard W.M. Jones [Fri, 4 Jul 2008 14:28:44 +0000 (15:28 +0100)]
Split 'make install' into separate 'make install-opt' and 'make install-byte' (Sylvain Le Gall, via Debian)
Richard W.M. Jones [Tue, 10 Jun 2008 11:51:22 +0000 (12:51 +0100)]
Remove some old virt-top stuff.
Richard W.M. Jones [Tue, 10 Jun 2008 11:50:55 +0000 (12:50 +0100)]
Auto-generate ChangeLog.
Richard W.M. Jones [Tue, 10 Jun 2008 11:49:08 +0000 (12:49 +0100)]
Deprecate ChangeLog file.
Richard W.M. Jones [Tue, 10 Jun 2008 11:24:54 +0000 (12:24 +0100)]
Version 0.4.2.4 for release.
Richard W.M. Jones [Tue, 10 Jun 2008 11:24:39 +0000 (12:24 +0100)]
Missing dependencies.
Richard W.M. Jones [Tue, 10 Jun 2008 11:24:22 +0000 (12:24 +0100)]
List* functions throw exceptions if maxids = 0, so bypass this case.
Richard W.M. Jones [Mon, 9 Jun 2008 12:25:33 +0000 (13:25 +0100)]
Version 0.4.2.3.
Richard W.M. Jones [Thu, 5 Jun 2008 21:37:55 +0000 (22:37 +0100)]
Fix some bugs in the implementation of virDomainMemoryPeek
Richard W.M. Jones [Thu, 5 Jun 2008 19:25:56 +0000 (20:25 +0100)]
Updated MANIFEST
Richard W.M. Jones [Thu, 5 Jun 2008 18:46:12 +0000 (19:46 +0100)]
Add domblkpeek, dommempeek commands and
add per-argument help.
Richard W.M. Jones [Thu, 5 Jun 2008 18:45:52 +0000 (19:45 +0100)]
Add support for virDomainBlockPeek, virDomainMemoryPeek and
remove the deprecated conn/dom/net fields in virterror.
Richard W.M. Jones [Thu, 5 Jun 2008 18:45:03 +0000 (19:45 +0100)]
Remove Windows cruft from when it was lacking ocamlfind.
Richard W.M. Jones [Tue, 27 May 2008 11:34:41 +0000 (12:34 +0100)]
Brazilian Portuguese translation by Herli Joaquim de Menezes and revised by Igor Pires Soares.
Richard W.M. Jones [Wed, 16 Apr 2008 13:24:40 +0000 (14:24 +0100)]
Just the OCaml bindings (C library).
Richard W.M. Jones [Wed, 16 Apr 2008 12:43:00 +0000 (13:43 +0100)]
Initial import from old virt-top repository.