search for: opthandl

Displaying 20 results from an estimated 64 matches for "opthandl".

Did you mean: opthandle
2018 Sep 19
0
[PATCH 1/2] mltools: create a cmdline_options struct
...| 2 +- 14 files changed, 28 insertions(+), 15 deletions(-) diff --git a/builder/cmdline.ml b/builder/cmdline.ml index f05aecc76..bd099e218 100644 --- a/builder/cmdline.ml +++ b/builder/cmdline.ml @@ -191,7 +191,7 @@ read the man page virt-builder(1). ") prog in let opthandle = create_standard_options argspec ~anon_fun ~machine_readable:true usage_msg in - Getopt.parse opthandle; + Getopt.parse opthandle.getopt; (* Dereference options. *) let args = List.rev !args in diff --git a/builder/repository_main.ml b/builder/repository_main.ml index 554715a73..60ee962...
2018 Aug 20
0
[PATCH 2/2] OCaml tools: simplify machine-readable handling
...le appliance network (default)"; [ L"no-network" ], Getopt.Clear network, s_"Disable appliance network"; @@ -193,7 +190,7 @@ A short summary of the options is given below. For detailed help please read the man page virt-builder(1). ") prog in - let opthandle = create_standard_options argspec ~anon_fun usage_msg in + let opthandle = create_standard_options argspec ~anon_fun ~machine_readable:true usage_msg in Getopt.parse opthandle; (* Dereference options. *) @@ -209,7 +206,6 @@ read the man page virt-builder(1). let format = match !format...
2016 Sep 19
0
[PATCH 3/3] OCaml tools: add crypto support (RHBZ#1362649)
...e_main.ml b/customize/customize_main.ml index 07fd790..5613277 100644 --- a/customize/customize_main.ml +++ b/customize/customize_main.ml @@ -102,7 +102,7 @@ A short summary of the options is given below. For detailed help please read the man page virt-customize(1). ") prog in - let opthandle = create_standard_options argspec usage_msg in + let opthandle = create_standard_options argspec ~key_opts:true usage_msg in Getopt.parse opthandle; if not !format_consumed then @@ -175,6 +175,9 @@ read the man page virt-customize(1). g#launch (); g in + (* Decrypt the disks....
2018 Aug 20
2
[PATCH 1/2] mlstdutils/mltools: factorize the machine-readable option
Store the machine-readable flag globally, just like done for verbose/debug/etc, and enhance create_standard_options to provide --machine-readable automatically. --- common/mlstdutils/std_utils.ml | 4 ++++ common/mlstdutils/std_utils.mli | 7 +++++-- common/mltools/tools_utils.ml | 7 ++++++- common/mltools/tools_utils.mli | 5 ++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff
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 +-
2017 May 22
1
[PATCH] v2v: add crypto support (RHBZ#1451665)
...ertions(+), 1 deletion(-) diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml index a1338eb..70301ab 100644 --- a/v2v/cmdline.ml +++ b/v2v/cmdline.ml @@ -236,7 +236,7 @@ A short summary of the options is given below. For detailed help please read the man page virt-v2v(1). ") prog in - let opthandle = create_standard_options argspec ~anon_fun usage_msg in + let opthandle = create_standard_options argspec ~anon_fun ~key_opts:true usage_msg in Getopt.parse opthandle; (* Dereference the arguments. *) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 8cf1fad..59f5ef1 100644 --- a/v2v/v2v.ml +++...
2016 Sep 19
6
[PATCH 0/3] add crypto/LUKS support in some OCaml-based tools
Hi, this series refactors some guestfish code (not much), and exposes it via Common_utils, so it is possible to decrypt LUKS partitions when using virt-customize, virt-get-kernel, virt-sparsify, and virt-sysprep. This brings them closer in features with C tools. Most probably a couple more of other OCaml-based tools (virt-v2v to convert encrypted guests, and virt-builder to use encrypted
2023 Mar 07
1
[V2V PATCH v2 3/5] convert: introduce "block_driver" convert option
...-- a/in-place/in_place.ml +++ b/in-place/in_place.ml @@ -294,7 +294,8 @@ read the man page virt-v2v-in-place(1). (* Get the conversion options. *) let conv_options = { - Convert.keep_serial_console = true; + Convert.block_driver = Virtio_blk; + keep_serial_console = true; ks = opthandle.ks; network_map; root_choice; diff --git a/inspector/inspector.ml b/inspector/inspector.ml index a6428946..02d1a0e7 100644 --- a/inspector/inspector.ml +++ b/inspector/inspector.ml @@ -324,7 +324,8 @@ read the man page virt-v2v-inspector(1). (* Get the conversion options. *) let...
2023 Mar 10
1
[V2V PATCH v3 3/6] convert: introduce "block_driver" convert option
...-- a/in-place/in_place.ml +++ b/in-place/in_place.ml @@ -294,7 +294,8 @@ read the man page virt-v2v-in-place(1). (* Get the conversion options. *) let conv_options = { - Convert.keep_serial_console = true; + Convert.block_driver = Virtio_blk; + keep_serial_console = true; ks = opthandle.ks; network_map; root_choice; diff --git a/inspector/inspector.ml b/inspector/inspector.ml index a6428946..02d1a0e7 100644 --- a/inspector/inspector.ml +++ b/inspector/inspector.ml @@ -324,7 +324,8 @@ read the man page virt-v2v-inspector(1). (* Get the conversion options. *) let...
2023 Mar 07
1
[V2V PATCH v2 5/5] v2v, in-place: introduce --block-driver command line option
...nput_mode in let print_source = !print_source in @@ -294,7 +303,7 @@ read the man page virt-v2v-in-place(1). (* Get the conversion options. *) let conv_options = { - Convert.block_driver = Virtio_blk; + Convert.block_driver = block_driver; keep_serial_console = true; ks = opthandle.ks; network_map; diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 22f7c631..3b2eafbd 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -48,6 +48,7 @@ let rec main () = let bandwidth = ref None in let bandwidth_file = ref None in + let block_driver = ref None in let input_conn = ref None in...
2023 Mar 10
2
[V2V PATCH v3 5/6] v2v, in-place: introduce --block-driver command line option
...nput_mode in let print_source = !print_source in @@ -294,7 +303,7 @@ read the man page virt-v2v-in-place(1). (* Get the conversion options. *) let conv_options = { - Convert.block_driver = Virtio_blk; + Convert.block_driver = block_driver; keep_serial_console = true; ks = opthandle.ks; network_map; diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 22f7c631..3b2eafbd 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -48,6 +48,7 @@ let rec main () = let bandwidth = ref None in let bandwidth_file = ref None in + let block_driver = ref None in let input_conn = ref None in...
2018 Aug 20
1
[PATCH] common/mltools: getopt: add Getopt.OptString
...OptString ("string", set_optstr), "Set optional string"; ] let usage_msg = sprintf "%s: test the Getopt parser" prog +let print_optstring_value = function + | Unset -> "not set" + | NoValue -> "<none>" + | Value s -> s + let opthandle = create_standard_options argspec ~anon_fun usage_msg let () = Getopt.parse opthandle; @@ -66,4 +81,5 @@ let () = printf "clear_flag = %b\n" !clear_flag; printf "set_flag = %b\n" !set_flag; printf "set_int = %d\n" !si; - printf "set_string = %s\n&qu...
2023 Mar 07
6
[V2V PATCH v2 0/5] Bring support for virtio-scsi back to Windows
Discussion on v1: https://listman.redhat.com/archives/libguestfs/2023-February/030849.html https://listman.redhat.com/archives/libguestfs/2023-March/030917.html v1 -> v2: * Adapt the patch suggested by Richard, splitting it up into 3: https://listman.redhat.com/archives/libguestfs/2023-March/030975.html Now we have "--block-driver" command line option which regulates the
2023 Mar 06
2
[PATCH v2v] convert: Allow preferred block driver to be specified on the command line
This is just an outline patch, only compile tested. It doesn't make changes to virt-v2v-in-place, but those would be the same as made in v2v/v2v.ml. It reuses the existing Types.guestcaps_block_type which is a bit ugly but fairly practical. I've made the change to the documentation, but it needs a test. Rich.
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...set_standard_options argspec in let args = ref [] in let anon_fun s = push_front s args in @@ -192,7 +184,8 @@ A short summary of the options is given below. For detailed help please read the man page virt-builder(1). ") prog in - Arg.parse argspec anon_fun usage_msg; + let opthandle = create_standard_options argspec ~anon_fun usage_msg in + Getopt.parse opthandle; (* Dereference options. *) let args = List.rev !args in diff --git a/customize/Makefile.am b/customize/Makefile.am index de3d7e0..f18e238 100644 --- a/customize/Makefile.am +++ b/customize/Makefile.am @@ -7...
2018 Aug 21
0
[PATCH 1/2] common/mltools: getopt: add Getopt.OptString
...OptString ("string", set_optstr), "Set optional string"; ] let usage_msg = sprintf "%s: test the Getopt parser" prog +let print_optstring_value = function + | Unset -> "not set" + | NoValue -> "<none>" + | Value s -> s + let opthandle = create_standard_options argspec ~anon_fun usage_msg let () = Getopt.parse opthandle; @@ -66,4 +81,5 @@ let () = printf "clear_flag = %b\n" !clear_flag; printf "set_flag = %b\n" !set_flag; printf "set_int = %d\n" !si; - printf "set_string = %s\n&qu...
2023 Mar 10
7
[V2V PATCH v3 0/6] Bring support for virtio-scsi back to Windows
Discussion on v2: https://listman.redhat.com/archives/libguestfs/2023-March/030987.html v2 -> v3: * Patch 2/6 ("convert_windows: add Inject_virtio_win.Virtio_SCSI as a possible block type"): omit "Inject_virtio_win." prefix in favor of type inference. Add a short commit message body; * Add tests/test-v2v-block-driver.sh testing the new "--block-driver"
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
2016 Jul 15
0
[PATCH 3/3] mllib: tests: Add tests of the new Getopt module.
...quot;Set int"; + [ L"ss"; L"set-string"], Getopt.Set_string ("string", ss), "Set string"; + [ S 't'; L"set" ], Getopt.Set set_flag, "Set flag"; +] + +let usage_msg = sprintf "%s: test the Getopt parser" prog + +let opthandle = create_standard_options argspec ~anon_fun usage_msg +let () = + Getopt.parse opthandle; + + (* Implicit settings. *) + printf "trace = %b\n" (trace ()); + printf "verbose = %b\n" (verbose ()); + + (* Print the results. *) + printf "adds = [%s]\n" (String.conca...
2019 Mar 28
0
[PATCH v2 4/4] OCaml tools: output messages into JSON for machine readable
....sh script. + *) + +open Printf + +open Std_utils +open Tools_utils +open Getopt.OptionName + +let is_error = ref false + +let args = [ + [ L "error" ], Getopt.Set is_error, "Only print the error"; +] +let usage_msg = sprintf "%s: test the message outputs" prog + +let opthandle = create_standard_options args ~machine_readable:true usage_msg +let () = + Getopt.parse opthandle.getopt; + + if !is_error then + error "Error!"; + + message "Starting"; + info "An information message"; + warning "Warning: message here"; + message...