search for: tools_util

Displaying 20 results from an estimated 157 matches for "tools_util".

Did you mean: tools_utils
2019 Mar 22
8
[PATCH 0/4] OCaml tools: output messages as JSON machine
...o (4): common/mltools: move the code for machine readable up common/mltools: make sure machine readable output is flushed common/mltools: allow fd for machine readable output OCaml tools: output messages into JSON for machine readable common/mltools/Makefile.am | 2 +- common/mltools/tools_utils-c.c | 68 ++++++++++++++++++++++++++ common/mltools/tools_utils.ml | 88 ++++++++++++++++++++++------------ lib/guestfs.pod | 24 ++++++++++ 4 files changed, 151 insertions(+), 31 deletions(-) -- 2.20.1
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 b/common/mltools/tools_utils-c.c index b015dcace..3b80091c0 100644 --- a/common/mltools/tools_utils-c.c +++ b/...
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 b/mltools/tools_utils.ml index 1271802..d54ec58 100644 --- a/mltools/tools_utils.ml +++ b/mltools/tools_utils.ml @@ -679,3 +679,53 @@ l...
2019 Jan 16
10
[PATCH 0/5] [RFC] builder: handle unavailable repos
...mmand mltools: curl: turn Curl.run to raise exceptions builder: ignore repositories with download failures builder/builder.ml | 39 ++++++++++++++++++++--------- common/mltools/curl.ml | 15 ++++++++++- common/mltools/curl.mli | 3 +++ common/mltools/tools_utils.ml | 26 +++++++++---------- common/mltools/tools_utils.mli | 8 ++++++ common/mltools/tools_utils_tests.ml | 22 ++++++++++++++++ v2v/copy_to_local.ml | 9 ++++++- v2v/v2v.ml | 9 ++++++- 8 files changed, 103 insertions(+), 28 deletions(-) --...
2020 Jan 22
0
[PATCH] mltools, options: support --allow-discards when decrypting LUKS devices
--- mltools/tools_utils-c.c | 8 ++++---- mltools/tools_utils.ml | 6 +++--- mltools/tools_utils.mli | 2 +- options/decrypt.c | 5 +++-- options/inspect.c | 2 +- options/options.h | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/mltools/tools_utils-c.c b/mltools/tools_utils-c....
2019 Mar 28
8
[PATCH v2 0/4] OCaml tools: output messages as JSON machine
...kefile.am | 39 ++++++- common/mltools/parse_tools_messages_test.py | 118 ++++++++++++++++++++ common/mltools/test-machine-readable.sh | 7 ++ common/mltools/test-tools-messages.sh | 28 +++++ common/mltools/tools_messages_tests.ml | 46 ++++++++ common/mltools/tools_utils-c.c | 51 +++++++++ common/mltools/tools_utils.ml | 89 ++++++++++----- lib/guestfs.pod | 24 ++++ 9 files changed, 371 insertions(+), 32 deletions(-) create mode 100644 common/mltools/parse_tools_messages_test.py create mode 100755 commo...
2018 Nov 19
2
[PATCH] common/mltools: Add a debug statement when we try to run a non-existent program.
...39;/var/tmp/null.dTxRFN' Notice there is no "earlier error message". After this commit the error changes to: openstack: executable not found virt-v2v: error: openstack: precheck failed, there may be a problem with authentication, see earlier error messages --- common/mltools/tools_utils.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index ad08d05eb..298d89b4d 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -420,9 +420,11 @@ and do_run ?(echo_cmd = true)...
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.
2018 Mar 16
0
[PATCH v2 4/5] tools: Add machine_output function.
Produces machine-readable output delimited by special markers __MACHINEBEGIN__ __MACHINEEND__ --- common/mltools/tools_utils.ml | 8 ++++++++ common/mltools/tools_utils.mli | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 09f1bb544..f7abd5c3e 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -102,6 +102...
2019 Jan 16
0
[PATCH 2/5] mltools: create a new external_command_code
Split most of the code from external_command to a new external_command_code, so it is possible to get the exit code of the process without considering it fatal. --- common/mltools/tools_utils.ml | 22 ++++++++++------------ common/mltools/tools_utils.mli | 8 ++++++++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 3b1554c5a..e6b2b5713 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/t...
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_ut...
2019 Jan 16
2
Re: [PATCH 2/5] mltools: create a new external_command_code
On Wed, Jan 16, 2019 at 03:17:32PM +0100, Pino Toscano wrote: > Split most of the code from external_command to a new > external_command_code, so it is possible to get the exit code of the > process without considering it fatal. > --- > common/mltools/tools_utils.ml | 22 ++++++++++------------ > common/mltools/tools_utils.mli | 8 ++++++++ > 2 files changed, 18 insertions(+), 12 deletions(-) > > diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml > index 3b1554c5a..e6b2b5713 100644 > --- a/common/mltools/tools_u...
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 a/common/mltools/tools_utils-c.c b/common/mltools/tools_utils-c.c index c88c95082..553aa6631 100644 --- a/common/mltoo...
2019 Mar 25
1
Re: [PATCH 2/4] common/mltools: make sure machine readable output is flushed
...n 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 --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml > index 5a35708cd..ade4cb37f 100644 > --- a/common/mltools/tools_utils.ml > +++ b/common/mltools/tools_utils.ml > @@ -59,7 +59,11 @@...
2019 Mar 22
0
[PATCH 4/4] OCaml tools: output messages into JSON for machine readable
...n 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 +- common/mltools/tools_utils-c.c | 51 ++++++++++++++++++++++++++++++++++ common/mltools/tools_utils.ml | 16 +++++++++++ lib/guestfs.pod | 19 +++++++++++++ 4 files changed, 87 insertions(+), 1 deletion(-) diff --git a/common/mltools/Makefile.am b/common/mltools/Makefile.am index 37d10e610..ee8c319fd 100644...
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 enabled...
2018 Sep 19
0
[PATCH 1/2] mltools: create a cmdline_options struct
Instead of returning directly a Getopt.t handle, now Tools_utils.create_standard_options returns a struct, which at the moment contains only the Getopt.t handle. This way, it will be easy to add more data needed for handling standard command line options. This is mostly refactoring, with no functional changes. --- builder/cmdline.ml |...
2019 Mar 28
0
[PATCH v2 4/4] OCaml tools: output messages into JSON for machine readable
...| 1 + common/mltools/Makefile.am | 39 ++++++- common/mltools/parse_tools_messages_test.py | 118 ++++++++++++++++++++ common/mltools/test-tools-messages.sh | 28 +++++ common/mltools/tools_messages_tests.ml | 46 ++++++++ common/mltools/tools_utils-c.c | 51 +++++++++ common/mltools/tools_utils.ml | 16 +++ lib/guestfs.pod | 19 ++++ 8 files changed, 316 insertions(+), 2 deletions(-) create mode 100644 common/mltools/parse_tools_messages_test.py create mode 100755 common/mltools/tes...
2019 Jan 08
1
[PATCH] v2v: -o openstack: Don't echo full commands (RHBZ#1664310).
...v2v/output_openstack.ml @@ -177,8 +177,10 @@ class output_openstack output_conn output_password output_storage let stdout_fd = if verbose () then None else Some (openfile "/dev/null" [O_WRONLY] 0) in - (* Note that run_command will close stdout_fd if defined. *) - Tools_utils.run_command ?stdout_fd cmd + (* Note that run_command will close stdout_fd if defined. + * Don't echo the command because it can contain passwords. + *) + Tools_utils.run_command ~echo_cmd:false ?stdout_fd cmd in (* Similar to above, run the openstack command and capture...
2019 Jan 16
0
[PATCH 1/5] mltools: split helper do_check_exitcode
It will be used later in more parts of Tools_utils. Simple refactoring with no behaviour changes. --- common/mltools/tools_utils.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 24641369e..3b1554c5a 100644 --- a/common/mltools/tools_utils.ml +++ b/common...