search for: xpath_int64_default

Displaying 20 results from an estimated 25 matches for "xpath_int64_default".

2015 Oct 08
0
[PATCH] v2v: Add xpath_int64 functions, and use them to read memory values.
...@@ -54,7 +54,8 @@ let parse_libvirt_xml ?conn xml = let xpathctx = Xml.xpath_new_context doc in let xpath_string = xpath_string xpathctx and xpath_int = xpath_int xpathctx - and xpath_int_default = xpath_int_default xpathctx in + and xpath_int_default = xpath_int_default xpathctx + and xpath_int64_default = xpath_int64_default xpathctx in let hypervisor = match xpath_string "/domain/@type" with @@ -66,8 +67,8 @@ let parse_libvirt_xml ?conn xml = | None | Some "" -> error (f_"in the libvirt XML metadata, <name> is missing or empty") |...
2017 Mar 16
2
[PATCH v2] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...@@ -50,7 +50,7 @@ let parse_libvirt_xml ?conn xml = let xpathctx = Xml.xpath_new_context doc in let xpath_string = xpath_string xpathctx and xpath_int = xpath_int xpathctx - and xpath_int_default = xpath_int_default xpathctx + (*and xpath_int_default = xpath_int_default xpathctx*) and xpath_int64_default = xpath_int64_default xpathctx in let hypervisor = @@ -65,7 +65,6 @@ let parse_libvirt_xml ?conn xml = | Some s -> s in let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in let memory = memory *^ 1024L in - let vcpu = xpath_int_default "/do...
2017 Oct 08
0
[PATCH v2 4/4] common/mltools: xpath_helpers: Get rid of xpath_*_default functions.
...#39;t match, return the default. - *) -let xpath_eval_default parsefn xpath expr default = - match xpath_eval parsefn xpath expr with - | None -> default - | Some s -> s - -let xpath_string_default = xpath_eval_default identity -let xpath_int_default = xpath_eval_default int_of_string -let xpath_int64_default = xpath_eval_default Int64.of_string diff --git a/common/mltools/xpath_helpers.mli b/common/mltools/xpath_helpers.mli index 7434ba645..3a8190b05 100644 --- a/common/mltools/xpath_helpers.mli +++ b/common/mltools/xpath_helpers.mli @@ -25,9 +25,3 @@ val xpath_int : Xml.xpathctx -> string -> int...
2017 Apr 04
1
Re: [PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
...6a4..f12156f45 100644 > --- a/mllib/xpath_helpers.ml > +++ b/mllib/xpath_helpers.ml > @@ -53,3 +53,12 @@ let xpath_eval_default parsefn xpath expr default = > let xpath_string_default = xpath_eval_default identity > let xpath_int_default = xpath_eval_default int_of_string > let xpath_int64_default = xpath_eval_default Int64.of_string > + > +let xpath_get_nodes xpathctx expr = > + let obj = Xml.xpath_eval_expression xpathctx expr in > + let nodes = ref [] in > + for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do > + let node = Xml.xpathobj_node obj i in > + nodes := L...
2017 Mar 17
0
Re: [PATCH v2] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...bvirt_xml ?conn xml = > let xpathctx = Xml.xpath_new_context doc in > let xpath_string = xpath_string xpathctx > and xpath_int = xpath_int xpathctx > - and xpath_int_default = xpath_int_default xpathctx > + (*and xpath_int_default = xpath_int_default xpathctx*) > and xpath_int64_default = xpath_int64_default xpathctx in > > let hypervisor = > @@ -65,7 +65,6 @@ let parse_libvirt_xml ?conn xml = > | Some s -> s in > let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in > let memory = memory *^ 1024L in > - let...
2017 Mar 16
2
[PATCH] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...@@ -50,7 +50,7 @@ let parse_libvirt_xml ?conn xml = let xpathctx = Xml.xpath_new_context doc in let xpath_string = xpath_string xpathctx and xpath_int = xpath_int xpathctx - and xpath_int_default = xpath_int_default xpathctx + (*and xpath_int_default = xpath_int_default xpathctx*) and xpath_int64_default = xpath_int64_default xpathctx in let hypervisor = @@ -65,7 +65,6 @@ let parse_libvirt_xml ?conn xml = | Some s -> s in let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in let memory = memory *^ 1024L in - let vcpu = xpath_int_default "/do...
2017 Mar 23
0
[PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
.../xpath_helpers.ml index 8648596a4..f12156f45 100644 --- a/mllib/xpath_helpers.ml +++ b/mllib/xpath_helpers.ml @@ -53,3 +53,12 @@ let xpath_eval_default parsefn xpath expr default = let xpath_string_default = xpath_eval_default identity let xpath_int_default = xpath_eval_default int_of_string let xpath_int64_default = xpath_eval_default Int64.of_string + +let xpath_get_nodes xpathctx expr = + let obj = Xml.xpath_eval_expression xpathctx expr in + let nodes = ref [] in + for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do + let node = Xml.xpathobj_node obj i in + nodes := List.append !nodes [node] + done; +...
2017 Sep 12
0
[PATCH v8 6/7] mllib: add XPath helper xpath_get_nodes()
.../xpath_helpers.ml index e6185bf3d..eb655e1fe 100644 --- a/mllib/xpath_helpers.ml +++ b/mllib/xpath_helpers.ml @@ -52,3 +52,12 @@ let xpath_eval_default parsefn xpath expr default = let xpath_string_default = xpath_eval_default identity let xpath_int_default = xpath_eval_default int_of_string let xpath_int64_default = xpath_eval_default Int64.of_string + +let xpath_get_nodes xpathctx expr = + let obj = Xml.xpath_eval_expression xpathctx expr in + let nodes = ref [] in + for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do + let node = Xml.xpathobj_node obj i in + push_back nodes node + done; + !nodes diff...
2017 Sep 18
0
[PATCH v9 5/7] mllib: add XPath helper xpath_get_nodes()
.../xpath_helpers.ml index e6185bf3d..eb655e1fe 100644 --- a/mllib/xpath_helpers.ml +++ b/mllib/xpath_helpers.ml @@ -52,3 +52,12 @@ let xpath_eval_default parsefn xpath expr default = let xpath_string_default = xpath_eval_default identity let xpath_int_default = xpath_eval_default int_of_string let xpath_int64_default = xpath_eval_default Int64.of_string + +let xpath_get_nodes xpathctx expr = + let obj = Xml.xpath_eval_expression xpathctx expr in + let nodes = ref [] in + for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do + let node = Xml.xpathobj_node obj i in + push_back nodes node + done; + !nodes diff...
2017 Sep 20
0
[PATCH v10 5/6] mllib: add XPath helper xpath_get_nodes()
.../xpath_helpers.ml index e6185bf3d..eb655e1fe 100644 --- a/mllib/xpath_helpers.ml +++ b/mllib/xpath_helpers.ml @@ -52,3 +52,12 @@ let xpath_eval_default parsefn xpath expr default = let xpath_string_default = xpath_eval_default identity let xpath_int_default = xpath_eval_default int_of_string let xpath_int64_default = xpath_eval_default Int64.of_string + +let xpath_get_nodes xpathctx expr = + let obj = Xml.xpath_eval_expression xpathctx expr in + let nodes = ref [] in + for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do + let node = Xml.xpathobj_node obj i in + push_back nodes node + done; + !nodes diff...
2017 Oct 05
0
[PATCH v11 5/6] mllib: add XPath helper xpath_get_nodes()
...index 05fad89a4..a79733486 100644 --- a/common/mltools/xpath_helpers.ml +++ b/common/mltools/xpath_helpers.ml @@ -52,3 +52,12 @@ let xpath_eval_default parsefn xpath expr default = let xpath_string_default = xpath_eval_default identity let xpath_int_default = xpath_eval_default int_of_string let xpath_int64_default = xpath_eval_default Int64.of_string + +let xpath_get_nodes xpathctx expr = + let obj = Xml.xpath_eval_expression xpathctx expr in + let nodes = ref [] in + for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do + let node = Xml.xpathobj_node obj i in + push_back nodes node + done; + !nodes diff...
2017 Mar 13
0
[PATCH 2/2] v2v: -i ova: Factor out the OVF parsing into a separate module.
...ttp://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"; - let xpath_string = xpath_string xpathctx - and xpath_int = xpath_int xpathctx - and xpath_string_default = xpath_string_default xpathctx - and xpath_int_default = xpath_int_default xpathctx - and xpath_int64_default = xpath_int64_default xpathctx in + (* Parse the ovf file. *) + let name, memory, vcpu, firmware, disks, removables, nics = + parse_ovf_from_ova ovf in - (* Search for vm name. *) let name = - match xpath_string "/ovf:Envelope/ovf:VirtualSystem/ovf:Name/text()" w...
2017 Mar 13
4
[PATCH 0/2] v2v: -i ova: A couple of cleanup patches.
A couple of patches cleaning up the -i ova code. These are both just refactoring (or should be at any rate). The second patch is best viewed with 'git show -w' to exclude whitespace changes. Rich.
2017 Jun 29
0
[PATCH] v2v: Allow -i libvirtxml to open network disks over http or https.
...; xml; let doc = Xml.parse_memory xml in let xpathctx = Xml.xpath_new_context doc in let xpath_string = xpath_string xpathctx + and xpath_string_default = xpath_string_default xpathctx and xpath_int = xpath_int xpathctx (*and xpath_int_default = xpath_int_default xpathctx*) and xpath_int64_default = xpath_int64_default xpathctx in @@ -273,21 +300,27 @@ let parse_libvirt_xml ?conn xml = | None -> () ); | Some "network" -> - (* We only handle <source protocol="nbd"> here, and that is - * intended only for virt-p2v. -...
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it a little further by extending List and adding a new Option submodule. All basically simple refactoring. Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
2017 Mar 17
7
[PATCH v2 0/6] v2v: Pass CPU vendor, model and topology from source to target.
v1 -> v2: - Support for passing topology through -o glance. - Support for passing topology through -o rhv. - Use bool for acpi/apic/pae struct fields in virt-p2v. - Write the xpath expression in error messages instead of file/line. - Fix more memory leaks in virt-p2v cpuid.c. - Passes make check & check-valgrind. There may be some other minor changes. I believe that everything
2017 Mar 23
13
[PATCH v5 00/10] Introducing virt-builder-repository
Hi all, Here is the v5 of my patches series applying the latest comments from Pino. Cédric Bosdonnat (10): lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function dib: move do_cp to
2017 Sep 20
6
[PATCH v10 0/6] virt-builder-repository
Hi all, Diff to v9 includes the changes requested by Pino. Cédric Bosdonnat (5): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() New tool: virt-builder-repository Pino Toscano (1): builder: add simple OCaml osinfo-db reader .gitignore
2017 Sep 18
11
[PATCH v9 0/7] virt-builder-repository
Hi there, Diffs to v8: * Remove the regex to increment the revision: Index_parser.get_entry() only handles integers * Fix Pino's comments Cédric Bosdonnat (6): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() builder: remove useless fish dependency New tool: