Displaying 20 results from an estimated 1000 matches similar to: "[PATCH v2 0/4] OCaml tools: output messages as JSON machine"
2019 Mar 22
8
[PATCH 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.
Pino Toscano (4):
common/mltools: move the code for machine readable up
common/mltools: make sure machine
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
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 Dec 18
2
[v2v PATCH] po: do not extract tests
They do not contain messages.
---
Makefile.am | 1 +
po/POTFILES-ml | 11 -----------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4dde5002..46a52ca3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -115,6 +115,7 @@ po/POTFILES-ml: configure.ac
grep -v '^common/mlprogress/' | \
grep -v '^common/mlvisit/' | \
grep -v
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
2019 Dec 18
1
[PATCH] po: reduce the list of extracted sources
Prune from the list of sources where to extract messages various sources
with no messages:
- .pl and .pm files, as they do not contain messages: almost all the
.pl files are tests, and the only .pm file is the Perl Sys::Guestfs
module, which wraps the XS extension
- dummy.c sources; they are empty sources used to build OCaml-only
targets using automake
- gperf generated sources
- C/OCaml
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
---
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 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
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
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 +-
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
2019 Dec 17
1
[common PATCH] tests: fix srcdir references
Make sure to properly reference to files in the source directory.
---
mltools/test-tools-messages.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mltools/test-tools-messages.sh b/mltools/test-tools-messages.sh
index 0e24d6c..73e1beb 100755
--- a/mltools/test-tools-messages.sh
+++ b/mltools/test-tools-messages.sh
@@ -25,4 +25,4 @@ set -x
$TEST_FUNCTIONS
skip_if_skipped
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
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 Sep 20
1
Re: [PATCH 1/2] mltools: create a cmdline_options struct
On Wed, Sep 19, 2018 at 12:37:00PM +0200, Pino Toscano wrote:
> diff --git a/common/mltools/tools_utils.mli b/common/mltools/tools_utils.mli
> index 2b8c2b78a..99984bfa1 100644
> --- a/common/mltools/tools_utils.mli
> +++ b/common/mltools/tools_utils.mli
> @@ -74,7 +74,13 @@ val machine_readable : unit -> machine_readable_fn option
> readable output to, in case it was
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
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
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".
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
+++