search for: doc_to_chan

Displaying 20 results from an estimated 27 matches for "doc_to_chan".

Did you mean: dev_to_chan
2018 Jun 27
1
[PATCH] v2v: -o local: print libvirt XML
...ut_local.ml b/v2v/output_local.ml index 4e1088afc..c70428134 100644 --- a/v2v/output_local.ml +++ b/v2v/output_local.ml @@ -68,7 +68,13 @@ class output_local dir = object let name = source.s_name in let file = dir // name ^ ".xml" in - with_open_out file (fun chan -> DOM.doc_to_chan chan doc) + with_open_out file (fun chan -> DOM.doc_to_chan chan doc); + + if verbose () then ( + eprintf "resulting local libvirt XML:\n%!"; + DOM.doc_to_chan stderr doc; + eprintf "\n%!"; + ) end let output_local = new output_local -- 2.17.1
2015 Oct 22
1
[PATCH] v2v: -o libvirt: dump XML for libvirt if verbose
...efined. --- v2v/output_libvirt.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v2v/output_libvirt.ml b/v2v/output_libvirt.ml index abdd410..f86f336 100644 --- a/v2v/output_libvirt.ml +++ b/v2v/output_libvirt.ml @@ -407,6 +407,12 @@ class output_libvirt oc output_pool = object DOM.doc_to_chan chan doc; close_out chan; + if verbose () then ( + printf "resulting XML for libvirt:\n%!"; + DOM.doc_to_chan stdout doc; + printf "\n%!"; + ); + (* Define the domain in libvirt. *) let cmd = match oc with -- 2.1.0
2018 Feb 22
0
[PATCH 1/5] v2v: DOM: Add doc_to_string function.
...do Buffer.add_char buf ' ' done + (* Quote XML <element attr='...'> content. Note you must use single * quotes around the attribute. *) @@ -99,10 +104,20 @@ and xml_quote_pcdata str = let str = String.replace str ">" "&gt;" in str -let doc_to_chan chan (Doc doc) = - fprintf chan "<?xml version='1.0' encoding='utf-8'?>\n"; - element_to_chan chan doc; - fprintf chan "\n" +let doc_to_buf buf (Doc doc) = + bprintf buf "<?xml version='1.0' encoding='utf-8'?>\n"; + elem...
2017 Nov 05
3
[PATCH 1/2] common/mlstdutils: Add with_open_in and with_open_out functions.
...utput_local.ml b/v2v/output_local.ml index 93d643f03..97ad8dddd 100644 --- a/v2v/output_local.ml +++ b/v2v/output_local.ml @@ -67,9 +67,7 @@ class output_local dir = object let name = source.s_name in let file = dir // name ^ ".xml" in - let chan = open_out file in - DOM.doc_to_chan chan doc; - close_out chan + with_open_out file (fun chan -> DOM.doc_to_chan chan doc) end let output_local = new output_local diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml index 5304329ae..f61d698d6 100644 --- a/v2v/output_qemu.ml +++ b/v2v/output_qemu.ml @@ -229,23 +229,24 @@...
2014 Dec 23
2
[PATCH] v2v: adding --vdsm-ovf-output option
...ID>/ @@ -146,7 +144,7 @@ object vdsm_params.vm_uuid in (* Write it to the metadata file. *) - let file = ovf_dir // vdsm_params.vm_uuid ^ ".ovf" in + let file = vdsm_params.ovf_output // vdsm_params.vm_uuid ^ ".ovf" in let chan = open_out file in doc_to_chan chan ovf; close_out chan diff --git a/v2v/output_vdsm.mli b/v2v/output_vdsm.mli index 56ddf55..3f63191 100644 --- a/v2v/output_vdsm.mli +++ b/v2v/output_vdsm.mli @@ -22,6 +22,7 @@ type vdsm_params = { image_uuid : string; (* --vdsm-image-uuid *) vol_uuids : string list;...
2014 Dec 23
2
[PATCH] v2v: adding --vdsm-ovf-output option
...images/ @@ -164,7 +162,7 @@ object vdsm_params.vm_uuid in (* Write it to the metadata file. *) - let file = ovf_dir // vdsm_params.vm_uuid ^ ".ovf" in + let file = vdsm_params.ovf_output // vdsm_params.vm_uuid ^ ".ovf" in let chan = open_out file in doc_to_chan chan ovf; close_out chan diff --git a/v2v/output_vdsm.mli b/v2v/output_vdsm.mli index 3ee5425..26ac15d 100644 --- a/v2v/output_vdsm.mli +++ b/v2v/output_vdsm.mli @@ -22,6 +22,7 @@ type vdsm_params = { image_uuids : string list; (* --vdsm-image-uuid (multiple) *) vol_uuids : stri...
2014 Dec 23
3
[PATCH] v2v: adding --vdsm-ovf-output option
...ID>/ @@ -146,7 +144,7 @@ object vdsm_params.vm_uuid in (* Write it to the metadata file. *) - let file = ovf_dir // vdsm_params.vm_uuid ^ ".ovf" in + let file = vdsm_params.ovf_output // vdsm_params.vm_uuid ^ ".ovf" in let chan = open_out file in doc_to_chan chan ovf; close_out chan diff --git a/v2v/output_vdsm.mli b/v2v/output_vdsm.mli index 56ddf55..3f63191 100644 --- a/v2v/output_vdsm.mli +++ b/v2v/output_vdsm.mli @@ -22,6 +22,7 @@ type vdsm_params = { image_uuid : string; (* --vdsm-image-uuid *) vol_uuids : string list;...
2018 Nov 23
2
[PATCH] v2v: Add support for libosinfo metadata
...ml ~pool:pool_name source targets target_buses - guestcaps target_features target_firmware in + guestcaps target_features target_firmware inspect in let tmpfile, chan = Filename.open_temp_file "v2vlibvirt" ".xml" in DOM.doc_to_chan chan doc; diff --git a/v2v/output_local.ml b/v2v/output_local.ml index 2f4b4e6c9cfd..3a00ed58a72d 100644 --- a/v2v/output_local.ml +++ b/v2v/output_local.ml @@ -49,7 +49,7 @@ class output_local dir = object error_unless_uefi_firmware guestcaps.gcaps_arch method create_metadata source t...
2014 Dec 25
0
[PATCH] v2v: adding --vdsm-ovf-output option
...images/ @@ -164,7 +162,7 @@ object vdsm_params.vm_uuid in (* Write it to the metadata file. *) - let file = ovf_dir // vdsm_params.vm_uuid ^ ".ovf" in + let file = vdsm_params.ovf_output // vdsm_params.vm_uuid ^ ".ovf" in let chan = open_out file in doc_to_chan chan ovf; close_out chan diff --git a/v2v/output_vdsm.mli b/v2v/output_vdsm.mli index 3ee5425..26ac15d 100644 --- a/v2v/output_vdsm.mli +++ b/v2v/output_vdsm.mli @@ -22,6 +22,7 @@ type vdsm_params = { image_uuids : string list; (* --vdsm-image-uuid (multiple) *) vol_uuids : stri...
2014 Dec 23
0
[PATCH] v2v: adding --vdsm-ovf-output option
...ID>/ @@ -146,7 +144,7 @@ object vdsm_params.vm_uuid in (* Write it to the metadata file. *) - let file = ovf_dir // vdsm_params.vm_uuid ^ ".ovf" in + let file = vdsm_params.ovf_output // vdsm_params.vm_uuid ^ ".ovf" in let chan = open_out file in doc_to_chan chan ovf; close_out chan diff --git a/v2v/output_vdsm.mli b/v2v/output_vdsm.mli index 56ddf55..3f63191 100644 --- a/v2v/output_vdsm.mli +++ b/v2v/output_vdsm.mli @@ -22,6 +22,7 @@ type vdsm_params = { image_uuid : string; (* --vdsm-image-uuid *) vol_uuids : string list;...
2018 Nov 23
0
Re: [PATCH] v2v: Add support for libosinfo metadata
...targets target_buses > - guestcaps target_features target_firmware in > + guestcaps target_features target_firmware inspect in > > let tmpfile, chan = Filename.open_temp_file "v2vlibvirt" ".xml" in > DOM.doc_to_chan chan doc; > diff --git a/v2v/output_local.ml b/v2v/output_local.ml > index 2f4b4e6c9cfd..3a00ed58a72d 100644 > --- a/v2v/output_local.ml > +++ b/v2v/output_local.ml > @@ -49,7 +49,7 @@ class output_local dir = object > error_unless_uefi_firmware guestcaps.gcaps_arch >...
2017 Apr 05
2
[PATCH] v2v: Rename OVF module to Create_ovf.
This is just a bit of preparatory refactoring ... Rich.
2014 Oct 31
0
[PATCH] v2v: -o libvirt: Get the <features/> right in the output XML (RHBZ#1159258).
.... *) - let doc = create_libvirt_xml ~pool:output_pool source targets guestcaps in + let doc = + create_libvirt_xml ~pool:output_pool source targets + guestcaps target_features in let tmpfile, chan = Filename.open_temp_file "v2vlibvirt" ".xml" in DOM.doc_to_chan chan doc; diff --git a/v2v/output_libvirt.mli b/v2v/output_libvirt.mli index 25d4690..da41956 100644 --- a/v2v/output_libvirt.mli +++ b/v2v/output_libvirt.mli @@ -23,5 +23,5 @@ val output_libvirt : bool -> string option -> string -> Types.output {!Types.output} object specialized for...
2018 Nov 23
1
[PATCH v2] v2v: Add support for libosinfo metadata
...ml ~pool:pool_name source targets target_buses - guestcaps target_features target_firmware in + guestcaps target_features target_firmware inspect in let tmpfile, chan = Filename.open_temp_file "v2vlibvirt" ".xml" in DOM.doc_to_chan chan doc; diff --git a/v2v/output_local.ml b/v2v/output_local.ml index 2f4b4e6c9cfd..3a00ed58a72d 100644 --- a/v2v/output_local.ml +++ b/v2v/output_local.ml @@ -49,7 +49,7 @@ class output_local dir = object error_unless_uefi_firmware guestcaps.gcaps_arch method create_metadata source t...
2016 Jul 07
12
[PATCH v3 0/8] v2v: Move Curl wrapper to mllib and more.
v2 -> v3: - Changes to the Curl API suggested by Pino.
2016 Jul 07
9
[PATCH v2 0/8] v2v: Move Curl wrapper to mllib and use it for virt-builder (and more).
v1 -> v2: - Fixed the bug with precedence of if / @. - Add some imperative list operators inspired by Perl, and use those for constructing the Curl arguments, and more. Rich.
2018 Feb 22
11
[PATCH 0/5] v2v: Add -o rhv-upload output mode.
The first four patches are straightforward. The final patch adds the -o rhv-upload output mode. It is still spooling into a temporary file because I've had some trouble getting streaming conversions working. There are other problems as outlined in the commit message, so this patch is not ready for upstream but is good for discussion. Also I hit this, which I'm assuming for now will be
2020 Apr 06
0
[v2v PATCH 2/2] Consolidate handling of temporary files/dirs
...guestcaps target_features target_firmware inspect in + (* Do not store the temporary file inside our [tmpdir], as we preserve it + * for the user in case Domain.define_xml fails. + *) let tmpfile, chan = Filename.open_temp_file "v2vlibvirt" ".xml" in DOM.doc_to_chan chan doc; close_out chan; diff --git a/v2v/output_null.ml b/v2v/output_null.ml index 3528da50..493c9f0e 100644 --- a/v2v/output_null.ml +++ b/v2v/output_null.ml @@ -50,7 +50,7 @@ let can_use_qemu_null_co_device () = (* We actually attempt to convert a raw file to the null-co device * us...
2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...if Sys.command cmd <> 0 then warning (f_"could not refresh libvirt pool %s") output_pool; @@ -412,9 +412,9 @@ class output_libvirt oc output_pool = object close_out chan; if verbose () then ( - printf "resulting XML for libvirt:\n%!"; - DOM.doc_to_chan stdout doc; - printf "\n%!"; + eprintf "resulting XML for libvirt:\n%!"; + DOM.doc_to_chan stderr doc; + eprintf "\n%!"; ); (* Define the domain in libvirt. *) diff --git a/v2v/output_rhev.ml b/v2v/output_rhev.ml index b1c6850..6301d9a 1...
2016 May 22
4
ocaml tools: Use a common debug function.
Add a Common_utils.debug function for printing messages only when in verbose mode. Rich.