search for: doc_to_str

Displaying 20 results from an estimated 34 matches for "doc_to_str".

Did you mean: doc_to_s
2018 Feb 22
0
[PATCH 1/5] v2v: DOM: Add doc_to_string function.
...'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"; + element_to_buf buf doc; + bprintf buf "\n" + +let doc_to_string doc = + let buf = Buffer.create 4096 in + doc_to_buf buf doc; + Buffer.contents buf + +let doc_to_chan chan doc = + let buf = Buffer.create 4096 in + doc_to_buf buf doc; + Buffer.output_buffer chan buf let path_to_nodes (Doc doc) path = match path with diff --git a/v2v/DOM.mli b/v2v/...
2019 Apr 08
0
[PATCH v4 5/7] v2v: -o libvirt: switch away from virsh
...Unix.unlink tmpfile with _ -> () - ) else ( - warning (f_"could not define libvirt domain. The libvirt XML is still available in ‘%s’. Try running ‘virsh define %s’ yourself instead.") - tmpfile tmpfile + (try + ignore (Libvirt.Domain.define_xml self#conn (DOM.doc_to_string doc)); + (try Unix.unlink tmpfile with _ -> ()) + with + Libvirt.Virterror { message } -> + warning (f_"could not define libvirt domain: %s.\nThe libvirt XML is still available in ‘%s’. Try running ‘virsh -c %s define %s’ yourself instead.") + (Optio...
2019 Sep 16
0
[PATCH 6/8] v2v: -o rhv-upload: collect disks UUIDs right after copy
...te_ovf.create_ovf source targets guestcaps inspect target_firmware output_alloc - sd_uuid image_uuids vol_uuids vm_uuid + sd_uuid disks_uuids vol_uuids vm_uuid OVirt in let ovf = DOM.doc_to_string ovf in -- 2.21.0
2019 Sep 16
0
[PATCH 3/8] v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
...| Some uuid -> uuid in (* The volume and VM UUIDs are made up. *) let vol_uuids = List.map (fun _ -> uuidgen ()) targets @@ -401,6 +410,11 @@ If the messages above are not sufficient to diagnose the problem then add the OVirt in let ovf = DOM.doc_to_string ovf in + let json_params = + match rhv_cluster_uuid with + | None -> assert false + | Some uuid -> ("rhv_cluster_uuid", JSON.String uuid) :: json_params in + let ovf_file = tmpdir // "vm.ovf" in with_open_out ovf_file (fun chan -> output...
2018 Jul 19
5
[PATCH] v2v: ovf: add firmware and machine type element
...let ovf = Create_ovf.create_ovf source targets guestcaps inspect - output_alloc + target_firmware output_alloc sd_uuid image_uuids vol_uuids vm_uuid OVirt in let ovf = DOM.doc_to_string ovf in diff --git a/v2v/output_vdsm.ml b/v2v/output_vdsm.ml index 9a1b748bc..f32acedae 100644 --- a/v2v/output_vdsm.ml +++ b/v2v/output_vdsm.ml @@ -123,7 +123,7 @@ object | flav -> sprintf "-oo vdsm-ovf-flavour=%s" (Create_ovf.ovf_flavour_to_string...
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
2018 Oct 10
4
[PATCH v2 0/2] v2v: machine type for oVirt
changes in v2: - split patch in two - changed as per suggestions Tomáš Golembiovský (2): v2v: ovf: add firmware and machine type element v2v: enable UEFI for oVirt/RHV outputs v2v/create_ovf.ml | 12 +++++++++++- v2v/create_ovf.mli | 2 +- v2v/output_rhv.ml | 6 ++---- v2v/output_rhv_upload.ml | 4 ++--
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
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: add -oo rhv-disk-uuid option
...te_ovf.create_ovf source targets guestcaps inspect target_firmware output_alloc - sd_uuid disks_uuids vol_uuids vm_uuid + sd_uuid image_uuids vol_uuids vm_uuid OVirt in let ovf = DOM.doc_to_string ovf in diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 685680213..896c17942 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -135,6 +135,8 @@ def open(readonly): disk_format = types.DiskFormat.COW disk = disks_service.add( di...
2018 Feb 22
0
[PATCH 5/5] v2v: Add -o rhv-upload output mode.
...%s), + initialization=types.Initialization( + configuration = types.Configuration( + type = types.ConfigurationType.OVA, + data = %s + ) + ) + ) +) +" (py_quote "Default" (* XXX target cluster *)) + (py_quote (DOM.doc_to_string ovf)) + +(* Find the Python 3 binary. *) +let find_python3 () = + let rec loop = function + | [] -> + error "could not locate Python 3 binary on the $PATH. You may have to install Python 3. If Python 3 is already installed then you may need to create a directory containing a...
2018 Feb 27
0
[PATCH v2 3/3] v2v: Add -o rhv-upload output mode.
...%s), + initialization=types.Initialization( + configuration = types.Configuration( + type = types.ConfigurationType.OVA, + data = %s + ) + ) + ) +) +" (py_quote "Default" (* XXX target cluster *)) + (py_quote (DOM.doc_to_string ovf)) + +(* Find the Python 3 binary. *) +let find_python3 () = + let rec loop = function + | [] -> + error "could not locate Python 3 binary on the $PATH. You may have to install Python 3. If Python 3 is already installed then you may need to create a directory containing a...
2018 Feb 27
5
[PATCH v2 0/3] v2v: Add -o rhv-upload output mode.
This patch set is still for discussion only. See 3/3 for the current list of problems. However this will upload an image to an oVirt or RHV server, although you must have absolutely the latest snapshot version of 4.2 for it to work. Rich.
2018 Feb 22
2
Re: [PATCH 5/5] v2v: Add -o rhv-upload output mode.
...ation( > + configuration = types.Configuration( > + type = types.ConfigurationType.OVA, > + data = %s > + ) > + ) > + ) > +) > +" (py_quote "Default" (* XXX target cluster *)) > + (py_quote (DOM.doc_to_string ovf)) > + > +(* Find the Python 3 binary. *) > +let find_python3 () = > + let rec loop = function > + | [] -> > + error "could not locate Python 3 binary on the $PATH. You may have to install Python 3. If Python 3 is already installed then you may need to cr...
2018 Mar 01
7
[PATCH v3 0/6] v2v: Add -o rhv-upload output mode.
v2 -> v3: - Lots of code cleanups. - Documentation. However this is still spooling the file into a temporary before the upload. It turns out that fixing this is going to require a small change to qemu. Rich.
2018 Mar 08
6
[PATCH v5 0/4] v2v: Add -o rhv-upload output mode.
Mainly minor fixes and code cleanups over the v4 patch. There are still several problems with this patch, but it is in a reviewable state, especially the Python code. Rich.
2018 Mar 08
0
[PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...m_uuid = uuidgen () in + + (* Create the metadata. *) + let ovf = + Create_ovf.create_ovf source targets guestcaps inspect + output_alloc + sd_uuid image_uuids vol_uuids vm_uuid + OVirt in + let ovf = DOM.doc_to_string ovf in + + let json_param_file = tmpdir // "params.json" in + with_open_out + json_param_file + (fun chan -> output_string chan (JSON.string_of_doc json_params)); + + let ovf_file = tmpdir // "vm.ovf" in + with_open_out ovf_file (fun chan -> output...
2018 Mar 08
2
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...(* Create the metadata. *) > + let ovf = > + Create_ovf.create_ovf source targets guestcaps inspect > + output_alloc > + sd_uuid image_uuids vol_uuids vm_uuid > + OVirt in > + let ovf = DOM.doc_to_string ovf in > + > + let json_param_file = tmpdir // "params.json" in > + with_open_out > + json_param_file > + (fun chan -> output_string chan (JSON.string_of_doc json_params)); > + > + let ovf_file = tmpdir // "vm.ovf" in > + with_...
2018 Mar 11
2
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...(* Create the metadata. *) > + let ovf = > + Create_ovf.create_ovf source targets guestcaps inspect > + output_alloc > + sd_uuid image_uuids vol_uuids vm_uuid > + OVirt in > + let ovf = DOM.doc_to_string ovf in > + > + let json_param_file = tmpdir // "params.json" in > + with_open_out > + json_param_file > + (fun chan -> output_string chan (JSON.string_of_doc json_params)); > + > + let ovf_file = tmpdir // "vm.ovf" in > + with_...
2018 Mar 09
1
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...*) > +    let ovf = > +      Create_ovf.create_ovf source targets guestcaps inspect > +                            output_alloc > +                            sd_uuid image_uuids vol_uuids vm_uuid > +                            OVirt in > +    let ovf = DOM.doc_to_string ovf in > + > +    let json_param_file = tmpdir // "params.json" in > +    with_open_out > +      json_param_file > +      (fun chan -> output_string chan (JSON.string_of_doc > json_params)); > + > +    let ovf_file = tmpdir //...
2018 Mar 21
2
[PATCH v6] v2v: Add -o rhv-upload output mode.
v5 was here: https://www.redhat.com/archives/libguestfs/2018-March/msg00032.html There is only a single patch in this version because the other patches went upstream. This patch adds the virt-v2v -o rhv-upload mode (https://bugzilla.redhat.com/show_bug.cgi?id=1557273). Compared to v5, this adds the ability to make zero, trim and flush requests to the oVirt imageio server