Displaying 20 results from an estimated 27 matches for "bool_of_str".
2014 Jan 21
0
[PATCH] builder: proper consider subkeys in index files
...quot;, None) fields) with Not_found -> None in
let notes =
- try Some (List.assoc "notes" fields) with Not_found -> None in
+ try Some (List.assoc ("notes", None) fields) with Not_found -> None in
let hidden =
- try bool_of_string (List.assoc "hidden" fields)
+ try bool_of_string (List.assoc ("hidden", None) fields)
with
| Not_found -> false
| Failure "bool_of_string" ->
--
1.8.3.1
2014 Jan 21
2
Re: [PATCH] builder: proper consider subkeys in index files
On Tuesday 21 January 2014 16:37:20 Richard W.M. Jones wrote:
> On Tue, Jan 21, 2014 at 05:18:27PM +0100, Pino Toscano wrote:
> > + sv = caml_copy_string (fields->subkey ? fields->subkey : "");
> >
> > Store_field (v, 1, sv);
>
> Heh, sure would be nice if this was an option type :-)
>
> I believe the following should work:
>
>
2020 Jan 29
1
Re: [PATCH v2v v2 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...utput_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-disk-uuid", v ->
>+ if not (is_nonnil_uuid v) then
>+ error (f_"-o rhv-upload: invalid UUID for -oo rhv-disk-uuid");
> rhv_disk_uuids := Some (v :: (Option.default [] !rhv_disk_uuids))
> | k, _ ->
> error...
2014 Jan 21
3
[PATCH] builder: proper consider subkeys in index files
...t;" fields) with Not_found -> None in
let notes =
- try Some (List.assoc "notes" fields) with Not_found -> None in
+ try Some (find_elem "notes" "" fields) with Not_found -> None in
let hidden =
- try bool_of_string (List.assoc "hidden" fields)
+ try bool_of_string (find_elem "hidden" "" fields)
with
| Not_found -> false
| Failure "bool_of_string" ->
--
1.8.3.1
2016 Dec 08
3
[PATCH 1/2] Remove most instances of OCaml warning 52.
...t;int_of_string" ->
+ | Failure _ ->
eprintf (f_"%s: cannot parse 'compressed_size' field for '%s'\n")
prog n;
corrupt_file () in
@@ -157,7 +157,7 @@ let get_index ~downloader ~sigchecker
try bool_of_string (List.assoc ("hidden", None) fields)
with
| Not_found -> false
- | Failure "bool_of_string" ->
+ | Failure _ ->
eprintf (f_"%s: cannot parse 'hidden' field for '%s'\n")...
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:
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
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: add -oo rhv-disk-uuid option
...utput_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 =
| "rhv-direct", v -> rhv_direct := bool_of_string v
| "rhv-verifypeer", "" -> rhv_verifypeer := true
| "rhv-verifypeer", v -> rhv_verifypeer := bool_of_string v
+ | "rhv-disk-uuid", v ->
+ rhv_disk_uuids := Some (v :: (Option.default [] !rhv_disk_uuids))
| k, _ ->...
2018 Aug 10
2
[PATCH] Change wording from "twice" to "more than once" in error messages
...error (f_"-o rhv-upload: -oo rhv-cluster set twice");
+ error (f_"-o rhv-upload: -oo rhv-cluster set more than once");
rhv_cluster := Some v
| "rhv-direct", "" -> rhv_direct := true
| "rhv-direct", v -> rhv_direct := bool_of_string v
diff --git a/v2v/output_vdsm.ml b/v2v/output_vdsm.ml
index 95eb1eaf7..dc107cf2f 100644
--- a/v2v/output_vdsm.ml
+++ b/v2v/output_vdsm.ml
@@ -69,11 +69,11 @@ let parse_output_options options =
error (f_"-o vdsm: unknown vdsm-compat level ‘%s’") v
| "vdsm-vm-uuid"...
2020 Jan 23
0
[v2v PATCH 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...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-disk-uuid", v ->
+ if not (is_nonnil_uuid v) then
+ error (f_"-o rhv-upload: invalid UUID for -oo rhv-disk-uuid");
rhv_disk_uuids := Some (v :: (Option.default [] !rhv_disk_uuids))
| k, _ ->
error (f_"-o rhv-upload:...
2020 Jan 29
0
[PATCH v2v v2 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...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-disk-uuid", v ->
+ if not (is_nonnil_uuid v) then
+ error (f_"-o rhv-upload: invalid UUID for -oo rhv-disk-uuid");
rhv_disk_uuids := Some (v :: (Option.default [] !rhv_disk_uuids))
| k, _ ->
error (f_"-o rhv-upload:...
2020 Mar 11
0
[PATCH v2v v3 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...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-disk-uuid", v ->
+ if not (is_nonnil_uuid v) then
+ error (f_"-o rhv-upload: invalid UUID for -oo rhv-disk-uuid");
rhv_disk_uuids := Some (v :: (Option.default [] !rhv_disk_uuids))
| k, _ ->
error (f_"-o rhv-upload:...
2018 Nov 19
1
[PATCH] v2v: -o openstack: Option to add --insecure flag to openstack command.
...st.iter (
@@ -105,6 +111,10 @@ let parse_output_options options =
server_id := Some v
| "dev-disk-by-id", v ->
dev_disk_by_id := Some v
+ | "insecure", "" ->
+ insecure := true
+ | "insecure", v ->
+ insecure := bool_of_string v
| "guest-id", v ->
guest_id := Some v
| k, v ->
@@ -117,9 +127,10 @@ let parse_output_options options =
) options;
let server_id = !server_id in
let authentication = List.rev !authentication in
+ let insecure = !insecure in
let guest_id = !guest_i...
2018 Nov 20
0
[PATCH v2] v2v: -o openstack: -oo verify-server-certificate=(true|false) (RHBZ#1651432).
...server_id := Some v
| "dev-disk-by-id", v ->
dev_disk_by_id := Some v
+ | "verify-server-certificate", "" ->
+ verify_server_certificate := true
+ | "verify-server-certificate", v ->
+ verify_server_certificate := bool_of_string v
| "guest-id", v ->
guest_id := Some v
| k, v ->
@@ -120,9 +130,11 @@ let parse_output_options options =
) options;
let server_id = !server_id in
let authentication = List.rev !authentication in
+ let verify_server_certificate = !verify_server_certifi...
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.
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)
2014 Jan 22
2
[PATCH] builder: read all the available notes from the index
...+ | Some v -> v in
+ (subkey, value) :: loop xs
+ | _ :: xs -> loop xs in
+ List.sort (
+ fun (k1, _) (k2, _) ->
+ String.compare k1 k2
+ ) (loop fields) in
let hidden =
try bool_of_string (List.assoc ("hidden", None) fields)
with
diff --git a/builder/index_parser.mli b/builder/index_parser.mli
index 54f1807..3c679b3 100644
--- a/builder/index_parser.mli
+++ b/builder/index_parser.mli
@@ -29,7 +29,7 @@ and entry = {
compressed_size : int64 option;
expa...
2018 Mar 22
0
[PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...uot;rhv-cluster", v ->
+ if !rhv_cluster <> None then
+ error (f_"-o rhv-upload: -oo rhv-cluster set twice");
+ rhv_cluster := Some v
+ | "rhv-direct", "" -> rhv_direct := true
+ | "rhv-direct", v -> rhv_direct := bool_of_string v
+ | "rhv-verifypeer", "" -> rhv_verifypeer := true
+ | "rhv-verifypeer", v -> rhv_verifypeer := bool_of_string v
+ | k, _ ->
+ error (f_"-o rhv-upload: unknown output option ‘-oo %s’") k
+ ) options;
+
+ let rhv_cafile =
+ ma...
2018 Apr 05
2
[PATCH v8] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
v7 was here:
https://www.redhat.com/archives/libguestfs/2018-March/msg00143.html
Since then:
- Earlier patches are now upstream.
- The to-do list is moved from the commit message to the TODO file.
- This version forces -of raw + -oa sparse and gives an error in
any other mode. We intend to lift these restrictions later.
- Tested against latest imageio which supports longer timeouts,
2018 Apr 05
0
[PATCH v8] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...uot;rhv-cluster", v ->
+ if !rhv_cluster <> None then
+ error (f_"-o rhv-upload: -oo rhv-cluster set twice");
+ rhv_cluster := Some v
+ | "rhv-direct", "" -> rhv_direct := true
+ | "rhv-direct", v -> rhv_direct := bool_of_string v
+ | "rhv-verifypeer", "" -> rhv_verifypeer := true
+ | "rhv-verifypeer", v -> rhv_verifypeer := bool_of_string v
+ | k, _ ->
+ error (f_"-o rhv-upload: unknown output option ‘-oo %s’") k
+ ) options;
+
+ let rhv_cafile =
+ ma...