search for: xpath_int_default

Displaying 20 results from an estimated 28 matches for "xpath_int_default".

2015 Oct 08
0
[PATCH] v2v: Add xpath_int64 functions, and use them to read memory values.
...v/input_libvirtxml.ml index 976848f..d8c6215 100644 --- a/v2v/input_libvirtxml.ml +++ b/v2v/input_libvirtxml.ml @@ -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 &quo...
2017 Mar 16
2
[PATCH v2] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...arse_libvirt_xml.ml index 6032c31..2dee274 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -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/me...
2017 Oct 08
0
[PATCH v2 4/4] common/mltools: xpath_helpers: Get rid of xpath_*_default functions.
Instead of using ‘xpath_(string|int|int64)_default’ we can write the equivalent code using ‘Option.default’. This is not quite so concise, but may be easier to understand. eg: xpath_int_default xctx "xpath_expr" 10 -> Option.default 10 (xpath_int xctx "xpath_expr") --- common/mltools/xpath_helpers.ml | 12 ------------ common/mltools/xpath_helpers.mli | 6 ------ v2v/copy_to_local.ml | 6 +++--- v2v/parse_libvirt_xml.ml | 9 ++++----- v2v/...
2017 Mar 17
0
Re: [PATCH v2] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...2dee274 100644 > --- a/v2v/parse_libvirt_xml.ml > +++ b/v2v/parse_libvirt_xml.ml > @@ -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 = x...
2017 Mar 16
2
[PATCH] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...arse_libvirt_xml.ml index 6032c31..fb895e4 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -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/me...
2017 Apr 04
1
Re: [PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
...lib/xpath_helpers.ml b/mllib/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 &gt...
2015 Aug 28
7
v2v: -i libvirtxml: Map empty network or bridge name to a default (RHBZ#1257895).
When importing from VMware via the libvirt driver, the libvirt driver can add an empty source bridge name: <interface type='bridge'> <mac address='00:01:02:03:04:05:06'/> <source bridge=''/> </interface> Replicate what we do on the -i ova path, and map these to "eth0", "eth1" etc. This also includes a bunch
2017 Mar 23
0
[PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
...insertions(+) diff --git a/mllib/xpath_helpers.ml b/mllib/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...
2017 Sep 12
0
[PATCH v8 6/7] mllib: add XPath helper xpath_get_nodes()
...insertions(+) diff --git a/mllib/xpath_helpers.ml b/mllib/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...
2017 Sep 18
0
[PATCH v9 5/7] mllib: add XPath helper xpath_get_nodes()
...insertions(+) diff --git a/mllib/xpath_helpers.ml b/mllib/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...
2017 Sep 20
0
[PATCH v10 5/6] mllib: add XPath helper xpath_get_nodes()
...insertions(+) diff --git a/mllib/xpath_helpers.ml b/mllib/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...
2017 Oct 05
0
[PATCH v11 5/6] mllib: add XPath helper xpath_get_nodes()
...ltools/xpath_helpers.ml b/common/mltools/xpath_helpers.ml 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...
2017 Mar 13
0
[PATCH 2/2] v2v: -i ova: Factor out the OVF parsing into a separate module.
...ath_register_ns xpathctx - "vssd" "http://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 &qu...
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 ?conn xml = debug "libvirt xml is:\n%s" 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,...
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 16
0
[PATCH 4/4] v2v: Pass CPU vendor, model and topology from source to target.
...= function | BusSlotEmpty -> () diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index edffd20..6032c31 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -67,6 +67,12 @@ let parse_libvirt_xml ?conn xml = let memory = memory *^ 1024L in let vcpu = xpath_int_default "/domain/vcpu/text()" 1 in + let cpu_vendor = xpath_string "/domain/cpu/vendor/text()" in + let cpu_model = xpath_string "/domain/cpu/model/text()" in + let cpu_sockets = xpath_int "/domain/cpu/topology/@sockets" in + let cpu_cores = xpath_int "/do...
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
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 Mar 16
7
[PATCH 0/4] Pass CPU vendor, model and topology from source to target.
This is tangentially related to: https://bugzilla.redhat.com/show_bug.cgi?id=1372668 The problem in that bug is that we didn't pass the source CPU model (Sandybridge in that case) through to the target RHV hypervisor. So when the Windows guest booted on the target it gives an error about CPU hardware being disconnected (although it otherwise boots and works fine). This patch series