search for: json_parser_tree_parse_fil

Displaying 10 results from an estimated 10 matches for "json_parser_tree_parse_fil".

2018 Aug 23
2
[PATCH 1/2] mltools: JSON: add json_parser_tree_parse_file
.../common/mltools/JSON_parser-c.c b/common/mltools/JSON_parser-c.c index e10a2b69d..be1f011d1 100644 --- a/common/mltools/JSON_parser-c.c +++ b/common/mltools/JSON_parser-c.c @@ -37,6 +37,7 @@ #define JSON_DICT_TAG 5 value virt_builder_json_parser_tree_parse (value stringv); +value virt_builder_json_parser_tree_parse_file (value stringv); static value convert_json_t (json_t *val, int level) @@ -142,3 +143,27 @@ virt_builder_json_parser_tree_parse (value stringv) CAMLreturn (rv); } + +value +virt_builder_json_parser_tree_parse_file (value filev) +{ + CAMLparam1 (filev); + CAMLlocal1 (rv); + json_t *tree...
2018 Aug 23
0
[PATCH 2/2] builder: use the new json_parser_tree_parse_file
...dff67..407eb11fb 100644 --- a/builder/simplestreams_parser.ml +++ b/builder/simplestreams_parser.ml @@ -44,7 +44,7 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } = | Some f -> f ) else tmpfile in - json_parser_tree_parse (read_whole_file file) in + json_parser_tree_parse_file file in let downloads = let uri_index = -- 2.17.1
2019 Jan 08
1
[PATCH] v2v: -o openstack: Don't echo full commands (RHBZ#1664310).
...un_command ~stdout_fd:fd cmd <> 0 then + (* Note that Tools_utils.run_command closes fd. + * Don't echo the command because it can contain passwords. + *) + if Tools_utils.run_command ~echo_cmd:false ~stdout_fd:fd cmd <> 0 then None else ( let json = json_parser_tree_parse_file json in -- 2.19.2
2019 Sep 16
0
[PATCH 3/8] v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
...val mutable rhv_storagedomain_uuid = None + (* The cluster UUID. *) + val mutable rhv_cluster_uuid = None + method precheck () = Python_script.error_unless_python_interpreter_found (); error_unless_ovirtsdk4_module_available (); @@ -237,6 +242,10 @@ object let json = JSON_parser.json_parser_tree_parse_file precheck_fn in debug "precheck output parsed as: %s" (JSON.string_of_doc ~fmt:JSON.Indented ["", json]); + rhv_storagedomain_uuid <- + Some (JSON_parser.object_get_string "rhv_storagedomain_uuid" json); + rhv_cluster_uuid <- + S...
2018 Aug 24
0
[PATCH v6] v2v: Add --print-estimate option to print copy size estimate.
...le "v2vmeasure" ".json" in + unlink_on_exit json; + let fd = Unix.descr_of_out_channel chan in + if run_command ~stdout_fd:fd !cmd <> 0 then + error (f_"qemu-img measure failed, see earlier errors"); + (* Note that run_command closes fd. *) + + let json = json_parser_tree_parse_file json in + debug "qemu-img measure output parsed as: %s" + (JSON.string_of_doc ~fmt:JSON.Indented ["", json]); + + (* We're expecting the tree to contain nodes: + * Dict [ "required", Int number; "fully-allocated", Int number ] + * Of course...
2018 Aug 24
2
[PATCH v6] v2v: Add --print-estimate option to print copy size estimate.
v6: - Make the text output a bit nicer. - Changes as suggested to Measure_disk module temp file & json parsing. - Use jq to test JSON output. - Retest.
2018 Aug 23
2
[PATCH v5] v2v: Add --print-estimate option to print copy size estimate.
v5: - Normal output modified approx as suggested in previous email. - Machine readable output uses JSON.
2019 Sep 16
16
[PATCH 0/8] v2v: various fixed for -o rhv-upload
This patch series fixes various issues in the rhv-upload output mode: - properly find and use RHV resources - cleanup orphan disks, and possibly the current disk transfer on failure In reality, the first 4 patches deal with resources, and the other 4 with cleanups. The latter block can be theoretically sent alone -- I just happened to start working on it as part of my "let's fix
2018 Aug 29
2
[PATCH 0/2] v2v: Add -o openstack target.
This patch implements output to OpenStack Cinder volumes using OpenStack APIs. It has only been lightly tested, but appears to work. There are some important things to understand about how this works: (1) You must run virt-v2v in a conversion appliance running on top of OpenStack. And you must supply the name or UUID of this appliance to virt-v2v using the ‘-oo server-id=NAME|UUID’ parameter.
2018 Aug 30
3
[PATCH v2 0/2] v2v: Add -o openstack target.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-August/thread.html#00287 v2: - The -oa option now gives an error; apparently Cinder cannot generally control sparse/preallocated behaviour, although certain Cinder backends can. - The -os option maps to Cinder volume type; suggested by Matt Booth. - Add a simple test.