similar to: [PATCH 0/4] OCaml tools: output messages as JSON machine

Displaying 20 results from an estimated 1000 matches similar to: "[PATCH 0/4] OCaml tools: output messages as JSON machine"

2019 Mar 28
8
[PATCH v2 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Changes from v1: - use Obj.magic to convert int -> Unix.file_descr - add tests Pino Toscano (4):
2018 Aug 21
4
[PATCH 0/2] RFC: add output selection for --machine-readable
Hi, this is a first approach (hence RFC, since it misses tests & documentation) in selecting the output for --machine-readable. The possible choices are: * --machine-readable: to stdout, like before * --machine-readable=file:name-of-file: to the specified file * --machine-readable=stream:stdout: explicitly to stdout * --machine-readable=stream:stderr: explicitly to stderr This makes it
2019 Apr 01
2
[PATCH] OCaml tools: fix 3999 -> 3339 typo
RFC 3339 is the actual RFC for date/time strings. Typo found by Martin 'eagle eyes' Kletzander. Fixes commit f79129b8dc92470e3a5597daf53c84038bd6859e. --- common/mltools/tools_utils-c.c | 4 ++-- common/mltools/tools_utils.ml | 4 ++-- lib/guestfs.pod | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/mltools/tools_utils-c.c
2019 Mar 22
0
[PATCH 3/4] common/mltools: allow fd for machine readable output
Allow to specify a file descriptor for the machine readable output. Sadly, the OCaml C glue for the channels is not public API, so enable the internals for this... --- common/mltools/tools_utils-c.c | 17 +++++++++++++++++ common/mltools/tools_utils.ml | 10 +++++++++- lib/guestfs.pod | 5 +++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git
2018 Aug 23
3
[PATCH v2 0/2] add output selection for --machine-readable
Hi, this adds the possibility to select the output for --machine-readable in OCaml tools. The possible choices are: * --machine-readable: to stdout, like before * --machine-readable=file:name-of-file: to the specified file * --machine-readable=stream:stdout: explicitly to stdout * --machine-readable=stream:stderr: explicitly to stderr This makes it possible to add additional output for
2019 Mar 28
0
[PATCH v2 1/4] common/mltools: move the code for machine readable up
Move the code for handling machine readable up in the file, so it can be used by other functions. Only code motion, no behaviour changes. --- common/mltools/tools_utils.ml | 60 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 24641369e..5a35708cd 100644 ---
2019 Mar 22
0
[PATCH 4/4] OCaml tools: output messages into JSON for machine readable
When the machine readable mode is enabled, print all the messages (progress, info, warning, and errors) also as JSON in the machine readable stream: this way, users can easily parse the status of the OCaml tool, and report that back. The formatting of the current date time into the RFC 3999 format is done in C, because of the lack of OCaml APIs for this. --- common/mltools/Makefile.am | 2
2019 Mar 28
0
[PATCH v2 3/4] common/mltools: allow fd for machine readable output
Allow to specify a file descriptor for the machine readable output. Use the same assumption as done in v2v, i.e. that Unix.file_descr is simply the int file descriptor. --- common/mltools/test-machine-readable.sh | 7 +++++++ common/mltools/tools_utils.ml | 11 ++++++++++- lib/guestfs.pod | 5 +++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git
2020 Jan 21
12
[PATCH 0/1] WIP: Support LUKS-encrypted partitions
The following patch attempts to implement sparsification of LUKS-encrypted partitions. It uses lsblk to pair the underlying LUKS block device with its mapped name. Also, --allow-discards was added by default to luks_open(). There are several potential issues that I can think of: 1) If and entire device is encrypted (not just one of more partitions), the lsblk trick might not work. 2) The
2018 Aug 21
0
[PATCH 2/2] OCaml tools: add output selection for --machine-readable
Add an optional argument for --machine-readable to select the output, adding a new function to specifically write data to that output stream. The possible choices are: * --machine-readable: to stdout, like before * --machine-readable=file:name-of-file: to the specified file * --machine-readable=stream:stdout: explicitly to stdout * --machine-readable=stream:stderr: explicitly to stderr Adapt all
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi, the following series adds a --key option in the majority of tools: this makes it possible to pass LUKS credentials programmatically, avoid the need to manually input them, or unsafely pass them via stdin. Thanks, Pino Toscano (2): mltools: create a cmdline_options struct Introduce a --key option in tools that accept keys builder/cmdline.ml | 2 +-
2020 Jan 27
3
[PATCH v2 1/2] mltools, options: support --allow-discards when decrypting LUKS devices
--- mltools/tools_utils-c.c | 8 ++++---- mltools/tools_utils.ml | 6 +++--- mltools/tools_utils.mli | 8 ++++++-- options/decrypt.c | 5 +++-- options/inspect.c | 2 +- options/options.h | 2 +- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/mltools/tools_utils-c.c b/mltools/tools_utils-c.c index 6c43b8d..1dcebc4 100644 --- a/mltools/tools_utils-c.c +++
2018 Aug 23
0
[PATCH v2 2/2] OCaml tools: add output selection for --machine-readable
Add an optional argument for --machine-readable to select the output, adding a new function to specifically write data to that output stream. The possible choices are: * --machine-readable: to stdout, like before * --machine-readable=file:name-of-file: to the specified file * --machine-readable=stream:stdout: explicitly to stdout * --machine-readable=stream:stderr: explicitly to stderr Adapt all
2019 Jan 16
10
[PATCH 0/5] [RFC] builder: handle unavailable repos
In case a repository of virt-builder references files (e.g. the index) that cannot be downloaded (network issues, 404, etc) then virt-builder errors out on this situation. This is not a nice situation, from an user POV. This series does some refactoring to allow to better handle downloading failures, and handle the failures gracefully in virt-builder. RFC because I'm not yet too convinced
2017 Sep 26
5
[PATCH 0/5] Miscellaneous refactoring of common/utils, create common/mltools
Miscellaneous refactoring, but the main one is to rename mllib/ as common/mltools/ Rich.
2020 May 04
1
[common PATCH] mltools: add run_in_guest_command helper
Add an helper function to run a command in the guest, checking for the host/guest compatibility. This is mostly extracted from the internal do_run helper currently in the Customize_run module of virt-customize. --- mltools/tools_utils.ml | 50 +++++++++++++++++++++++++++++++++++++++++ mltools/tools_utils.mli | 10 +++++++++ 2 files changed, 60 insertions(+) diff --git a/mltools/tools_utils.ml
2018 Nov 19
2
[PATCH] common/mltools: Add a debug statement when we try to run a non-existent program.
Previously: $ virt-v2v -v -x -i disk fedora-28.img -o openstack -oo server-id=foo virt-v2v: libguestfs 1.39.11fedora=29,release=1.fc29,libvirt (x86_64) libvirt version: 4.5.0 virt-v2v: error: openstack: precheck failed, there may be a problem with authentication, see earlier error messages rm -rf '/var/tmp/null.dTxRFN' Notice there is no "earlier error message".
2019 Mar 25
1
Re: [PATCH 2/4] common/mltools: make sure machine readable output is flushed
On Fri, Mar 22, 2019 at 04:33:41PM +0100, Pino Toscano wrote: > Enhance the helper printf function for machine readable output to always > flush after each string: this way, readers of the machine readable > stream can get the output as soon as it is outputted. > --- > common/mltools/tools_utils.ml | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff
2018 Aug 17
8
[PATCH v3 4/4] v2v: Add --print-estimate option to print copy size
I rethought this again, as I think that it's a dangerous assumption to bake qemu-img measure output into our API. This patch series runs qemu-img measure behind the scenes, but then parses the output and sums it to a single number which we print. Doing that required a bit of reworking, moving the Jansson [JSON parser] bindings from virt-builder into the common directory and a couple of other
2019 Mar 28
0
[PATCH v2 4/4] OCaml tools: output messages into JSON for machine readable
When the machine readable mode is enabled, print all the messages (progress, info, warning, and errors) also as JSON in the machine readable stream: this way, users can easily parse the status of the OCaml tool, and report that back. The formatting of the current date time into the RFC 3999 format is done in C, because of the lack of OCaml APIs for this. --- .gitignore