Displaying 20 results from an estimated 34 matches for "parse_output_options".
2020 Jan 29
1
Re: [PATCH v2v v2 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...>+ let rex_uuid = lazy (
>+ let hex = "[a-fA-F0-9]" in
>+ let str = sprintf "^%s{8}-%s{4}-%s{4}-%s{4}-%s{12}$" hex hex hex hex hex in
>+ PCRE.compile str
>+ ) in
>+ if uuid = nil_uuid then false
>+ else PCRE.matches rex_uuid uuid
>+
> let parse_output_options options =
> let rhv_cafile = ref None in
> let rhv_cluster = ref None in
>@@ -71,6 +81,8 @@ let parse_output_options options =
> | "rhv-verifypeer", "" -> rhv_verifypeer := true
> | "rhv-verifypeer", v -> rhv_verifypeer := bool_of_strin...
2020 Jan 29
4
[PATCH v2v v2 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab v2 at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279
It took me quite some time to go through the whole rfc 4122 just to realize we
do not need to do anything with the versions.
v2:
- Use EEXIST instead of EINVAL
- Put the colliding UUID into the error
- Do not evaluate the PCRE needlessly multiple times
v1:
2018 Nov 20
3
[PATCH v4 0/2] v2v: -o openstack: -oo verify-server-certificate=(true|false) (RHBZ#1651432).
The first patch restricts passthrough parameters to ones matching
"os-*". This was how it was documented, but not how it was
implemented.
The second patch is the same as v2 here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00187.html
Rich.
2018 Nov 19
1
[PATCH] v2v: -o openstack: Option to add --insecure flag to openstack command.
...urns off SSL cert
+ * validation).
+ *)
+ insecure : bool;
+
(* Optional guest_id which, if present, is saved as
* Cinder volume property virt_v2v_guest_id on every disk
* associated with this guest.
@@ -97,6 +102,7 @@ The os-* parameters and environment variables are optional.
let parse_output_options options =
let server_id = ref None in
let dev_disk_by_id = ref None in
+ let insecure = ref false in
let guest_id = ref None in
let authentication = ref [] in
List.iter (
@@ -105,6 +111,10 @@ let parse_output_options options =
server_id := Some v
| "dev-disk-by-id&...
2018 Dec 13
3
[PATCH] v2v: -o rhv-upload: decouple name of nbdkit python plugin
...Python
plugin of nbdkit.
---
v2v/output_rhv_upload.ml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
index f5e0e6b1c..d8f608cff 100644
--- a/v2v/output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -78,6 +78,7 @@ let parse_output_options options =
{ rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer }
+let nbdkit_python_plugin = "python"
let pidfile_timeout = 30
let finalization_timeout = 5*60
@@ -139,14 +140,14 @@ class output_rhv_upload output_alloc output_conn
*)
let error_unless_nbdkit_python_plugin...
2020 Mar 11
4
[PATCH v2v v3 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab v3 at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279
It took me quite some time to go through the whole rfc 4122 just to realize we
do not need to do anything with the versions.
v3:
- Do the check in precheck
- Fix for Lazy evaluation of regexp UUID
v2:
- https://www.redhat.com/archives/libguestfs/2020-January/msg00221.html
- Use EEXIST instead of EINVAL
- Put the
2018 Nov 20
0
[PATCH v2] v2v: -o openstack: -oo verify-server-certificate=(true|false) (RHBZ#1651432).
...cert validation).
+ *)
+ verify_server_certificate : bool;
+
(* Optional guest_id which, if present, is saved as
* Cinder volume property virt_v2v_guest_id on every disk
* associated with this guest.
@@ -100,6 +105,7 @@ The os-* parameters and environment variables are optional.
let parse_output_options options =
let server_id = ref None in
let dev_disk_by_id = ref None in
+ let verify_server_certificate = ref true in
let guest_id = ref None in
let authentication = ref [] in
List.iter (
@@ -108,6 +114,10 @@ let parse_output_options options =
server_id := Some v
| "...
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: add -oo rhv-disk-uuid option
...t: false).
-oo rhv-verifypeer[=true|false] Verify server identity (default: false).
+
+You can override the UUIDs of the disks, instead of using autogenerated UUIDs
+after their uploads (if you do, you must supply one for each disk):
+
+ -oo rhv-disk-uuid=UUID Disk UUID
")
let parse_output_options options =
@@ -48,6 +54,7 @@ let parse_output_options options =
let rhv_cluster = ref None in
let rhv_direct = ref false in
let rhv_verifypeer = ref false in
+ let rhv_disk_uuids = ref None in
List.iter (
function
@@ -63,6 +70,8 @@ let parse_output_options options =
| "...
2018 Aug 10
2
[PATCH] Change wording from "twice" to "more than once" in error messages
....length (List.sort_uniq keys) then
error (f_"-it vddk: duplicate -io options on the command line");
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
index 6260eaac5..2bff35029 100644
--- a/v2v/output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -53,11 +53,11 @@ let parse_output_options options =
function
| "rhv-cafile", v ->
if !rhv_cafile <> None then
- error (f_"-o rhv-upload: -oo rhv-cafile set twice");
+ error (f_"-o rhv-upload: -oo rhv-cafile set more than once");
rhv_cafile := Some v
| &qu...
2020 Jan 23
0
[v2v PATCH 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...+ let hex = "[a-fA-F0-9]" in
+ let rex_uuid = "^"^hex^"{8}-"^hex^"{4}-"^hex^"{4}-"^hex^"{4}-"^hex^"{12}$" in
+ let rex_uuid = PCRE.compile rex_uuid in
+ if uuid = nil_uuid then false
+ else PCRE.matches rex_uuid uuid
+
let parse_output_options options =
let rhv_cafile = ref None in
let rhv_cluster = ref None in
@@ -71,6 +79,8 @@ let parse_output_options options =
| "rhv-verifypeer", "" -> rhv_verifypeer := true
| "rhv-verifypeer", v -> rhv_verifypeer := bool_of_string v
| "rhv...
2020 Jan 29
0
[PATCH v2v v2 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...0000-0000-0000-000000000000" in
+ let rex_uuid = lazy (
+ let hex = "[a-fA-F0-9]" in
+ let str = sprintf "^%s{8}-%s{4}-%s{4}-%s{4}-%s{12}$" hex hex hex hex hex in
+ PCRE.compile str
+ ) in
+ if uuid = nil_uuid then false
+ else PCRE.matches rex_uuid uuid
+
let parse_output_options options =
let rhv_cafile = ref None in
let rhv_cluster = ref None in
@@ -71,6 +81,8 @@ let parse_output_options options =
| "rhv-verifypeer", "" -> rhv_verifypeer := true
| "rhv-verifypeer", v -> rhv_verifypeer := bool_of_string v
| "rhv...
2020 Mar 11
0
[PATCH v2v v3 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...0-000000000000" in
+ let rex_uuid = lazy (
+ let hex = "[a-fA-F0-9]" in
+ let str = sprintf "^%s{8}-%s{4}-%s{4}-%s{4}-%s{12}$" hex hex hex hex hex in
+ PCRE.compile str
+ ) in
+ if uuid = nil_uuid then false
+ else PCRE.matches (Lazy.force rex_uuid) uuid
+
let parse_output_options options =
let rhv_cafile = ref None in
let rhv_cluster = ref None in
@@ -71,6 +81,8 @@ let parse_output_options options =
| "rhv-verifypeer", "" -> rhv_verifypeer := true
| "rhv-verifypeer", v -> rhv_verifypeer := bool_of_string v
| "rhv...
2020 Jan 15
3
[PATCH v2v] v2v: -o rhv-upload: Make -oo rhv-cafile optional in all cases (RHBZ#1791240).
...is not used then the system’s
+global trust store is used.
=item I<-oo rhv-cluster=>C<CLUSTERNAME>
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
index 7b5ad7a86..14153db36 100644
--- a/v2v/output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -81,8 +81,6 @@ let parse_output_options options =
let rhv_direct = !rhv_direct in
let rhv_verifypeer = !rhv_verifypeer in
let rhv_disk_uuids = Option.map List.rev !rhv_disk_uuids in
- if rhv_verifypeer && rhv_cafile = None then
- error (f_"-o rhv-upload: must use ‘-oo rhv-cafile’ to supply the path to the oVirt...
2019 Sep 27
1
[PATCH] v2v: -o rhv-upload: make -oo rhv-cafile optional
...502826 100644
--- a/v2v/output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -28,7 +28,7 @@ open Types
open Utils
type rhv_options = {
- rhv_cafile : string;
+ rhv_cafile : string option;
rhv_cluster : string option;
rhv_direct : bool;
rhv_verifypeer : bool;
@@ -76,15 +76,13 @@ let parse_output_options options =
error (f_"-o rhv-upload: unknown output option ‘-oo %s’") k
) options;
- let rhv_cafile =
- match !rhv_cafile with
- | Some s -> s
- | None ->
- error (f_"-o rhv-upload: must use ‘-oo rhv-cafile’ to supply the path to the oVirt or RHV user...
2020 Jan 23
5
[v2v PATCH 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279
It took me quite some time to go through the whole rfc 4122 just to realize we
do not need to do anything with the versions.
Martin Kletzander (2):
rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
rhv-upload: Check that rhv-disk-uuid is not already taken
(RHBZ#1789279)
2019 Mar 25
1
Re: [PATCH 3/3] v2v: add -o json output mode
...() =
> + printf (f_"Output options (-oo) which can be used with -o json:
> +
> + -oo json-disks-pattern=PATTERN Pattern for the disks.
> +")
> +
> +let known_pattern_variables = ["DiskNo"; "DiskDeviceName"; "GuestName"]
> +
> +let parse_output_options options =
> + let json_disks_pattern = ref None in
> +
> + List.iter (
> + function
> + | "json-disks-pattern", v ->
> + if !json_disks_pattern <> None then
> + error (f_"-o json: -oo json-disks-pattern set more than once");
&g...
2019 Jan 07
0
Re: [PATCH] v2v: -o rhv-upload: decouple name of nbdkit python plugin
...rename the Python
> plugin of nbdkit.
I'm not saying this is wrong, but it does break "out of the box" -o
rhv-upload. It means that to get it to work on Fedora we _have_ to
patch:
> --- a/v2v/output_rhv_upload.ml
> +++ b/v2v/output_rhv_upload.ml
> @@ -78,6 +78,7 @@ let parse_output_options options =
>
> { rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer }
>
> +let nbdkit_python_plugin = "python"
to change this "python3" [1].
I would dearly love to drop Python 2 support everywhere, but I don't
think we can do that realisticly before the...
2020 Jan 16
0
Re: [PATCH v2v] v2v: -o rhv-upload: Make -oo rhv-cafile optional in all cases (RHBZ#1791240).
...al trust store is used.
>
> =item I<-oo rhv-cluster=>C<CLUSTERNAME>
>
> diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
> index 7b5ad7a86..14153db36 100644
> --- a/v2v/output_rhv_upload.ml
> +++ b/v2v/output_rhv_upload.ml
> @@ -81,8 +81,6 @@ let parse_output_options options =
> let rhv_direct = !rhv_direct in
> let rhv_verifypeer = !rhv_verifypeer in
> let rhv_disk_uuids = Option.map List.rev !rhv_disk_uuids in
> - if rhv_verifypeer && rhv_cafile = None then
> - error (f_"-o rhv-upload: must use ‘-oo rhv-cafile’ to sup...
2019 Feb 25
0
[PATCH 3/3] v2v: add -o json output mode
...read the man page virt-v2v(1).
| `RHV -> no_options (); `RHV
| `QEmu -> no_options (); `QEmu
+ | `JSON ->
+ if is_query then (
+ Output_json.print_output_options ();
+ exit 0
+ )
+ else (
+ let json_options =
+ Output_json.parse_output_options output_options in
+ `JSON json_options
+ )
+
| `Openstack ->
if is_query then (
Output_openstack.print_output_options ();
@@ -546,6 +558,23 @@ read the man page virt-v2v(1).
Output_libvirt.output_libvirt output_conn output_storage,
output_format...
2019 Mar 29
0
[PATCH v2 3/3] v2v: add -o json output mode
...read the man page virt-v2v(1).
| `RHV -> no_options (); `RHV
| `QEmu -> no_options (); `QEmu
+ | `JSON ->
+ if is_query then (
+ Output_json.print_output_options ();
+ exit 0
+ )
+ else (
+ let json_options =
+ Output_json.parse_output_options output_options in
+ `JSON json_options
+ )
+
| `Openstack ->
if is_query then (
Output_openstack.print_output_options ();
@@ -546,6 +558,23 @@ read the man page virt-v2v(1).
Output_libvirt.output_libvirt output_conn output_storage,
output_format...