similar to: [PATCH] v2v: parse_libvirt_xml: Simplify code by using xpath_get_nodes utility fn.

Displaying 20 results from an estimated 1000 matches similar to: "[PATCH] v2v: parse_libvirt_xml: Simplify code by using xpath_get_nodes utility fn."

2017 Oct 27
0
[PATCH v11 7/8] mllib: add XPath helper xpath_get_nodes
This function will allow more OCaml-ish processing of XPath queries with multiple results. --- common/mltools/xpath_helpers.ml | 9 +++++++ common/mltools/xpath_helpers.mli | 4 +++ v2v/output_libvirt.ml | 11 ++------ v2v/test-harness/v2v_test_harness.ml | 51 +++++++++++------------------------- 4 files changed, 30 insertions(+), 45 deletions(-) diff --git
2017 Oct 08
1
Re: [PATCH v11 5/6] mllib: add XPath helper xpath_get_nodes()
The subject says ‘xpath_get_nodes()‘, but this function doesn't actually take a unit parameter, so it's better to drop ‘()’. On Thu, Oct 05, 2017 at 04:58:29PM +0200, Cédric Bosdonnat wrote: > + > +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 > +
2015 Jun 25
0
[PATCH v2] v2v: Free XML objects in the correct order.
If you free an xmlDocPtr before any xmlXPathObjectPtrs that reference the doc, you'll get valgrind errors like this: ==7390== Invalid read of size 4 ==7390== at 0x4EB8BC6: xmlXPathFreeNodeSet (xpath.c:4185) ==7390== by 0x4EB8CC5: xmlXPathFreeObject (xpath.c:5492) ==7390== by 0x400A56: main (in /tmp/test) ==7390== Address 0x60c0928 is 8 bytes inside a block of size 120
2015 Jun 25
0
[PATCH] v2v: Free XML objects in the correct order.
If you free an xmlDocPtr before any xmlXPathObjectPtr 's that reference the doc, you'll get valgrind errors like this: ==7390== Invalid read of size 4 ==7390== at 0x4EB8BC6: xmlXPathFreeNodeSet (xpath.c:4185) ==7390== by 0x4EB8CC5: xmlXPathFreeObject (xpath.c:5492) ==7390== by 0x400A56: main (in /tmp/test) ==7390== Address 0x60c0928 is 8 bytes inside a block of size
2017 Mar 23
0
[PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
This function will allow more OCAML-ish processing of xpath queries with multiple results. --- mllib/xpath_helpers.ml | 9 +++++++++ mllib/xpath_helpers.mli | 4 ++++ 2 files changed, 13 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
2017 Sep 12
0
[PATCH v8 6/7] mllib: add XPath helper xpath_get_nodes()
This function will allow more OCaml-ish processing of XPath queries with multiple results. --- mllib/xpath_helpers.ml | 9 +++++++++ mllib/xpath_helpers.mli | 4 ++++ 2 files changed, 13 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
2017 Sep 18
0
[PATCH v9 5/7] mllib: add XPath helper xpath_get_nodes()
This function will allow more OCaml-ish processing of XPath queries with multiple results. --- mllib/xpath_helpers.ml | 9 +++++++++ mllib/xpath_helpers.mli | 4 ++++ 2 files changed, 13 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
2017 Sep 20
0
[PATCH v10 5/6] mllib: add XPath helper xpath_get_nodes()
This function will allow more OCaml-ish processing of XPath queries with multiple results. --- mllib/xpath_helpers.ml | 9 +++++++++ mllib/xpath_helpers.mli | 4 ++++ 2 files changed, 13 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
2017 Oct 05
0
[PATCH v11 5/6] mllib: add XPath helper xpath_get_nodes()
This function will allow more OCaml-ish processing of XPath queries with multiple results. --- common/mltools/xpath_helpers.ml | 9 +++++++++ common/mltools/xpath_helpers.mli | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/common/mltools/xpath_helpers.ml b/common/mltools/xpath_helpers.ml index 05fad89a4..a79733486 100644 --- a/common/mltools/xpath_helpers.ml +++
2017 Apr 04
1
Re: [PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
On Thursday, 23 March 2017 10:02:47 CEST Cédric Bosdonnat wrote: > This function will allow more OCAML-ish processing of xpath queries > with multiple results. s/OCAML/OCaml/ s/xpath/XPath/ > --- > mllib/xpath_helpers.ml | 9 +++++++++ > mllib/xpath_helpers.mli | 4 ++++ > 2 files changed, 13 insertions(+) > > diff --git a/mllib/xpath_helpers.ml
2015 Oct 08
0
[PATCH] v2v: Add xpath_int64 functions, and use them to read memory values.
On 32 bit platforms, reading the memory values can cause some numbers to be read as negative numbers. Fix this by treating memory values as 64 bit integers throughout the parsing and calculation. --- v2v/input_libvirtxml.ml | 7 ++++--- v2v/input_ova.ml | 7 ++++--- v2v/utils.ml | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git
2017 Mar 13
0
[PATCH 2/2] v2v: -i ova: Factor out the OVF parsing into a separate module.
Mixing the XML parsing with the other functions of this module made it very hard to understand. Splitting the XML parsing into another module simplifies the flow considerably. This is just code refactoring and should not affect the semantics. --- v2v/Makefile.am | 2 + v2v/input_ova.ml | 323 +++++++++++---------------------------------- v2v/parse_ovf_from_ova.ml | 226
2014 Oct 31
0
[PATCH] v2v: -o libvirt: Get the <features/> right in the output XML (RHBZ#1159258).
Implement what old virt-v2v did (from lib/Sys/VirtConvert/Connection/LibVirtTarget.pm) Thanks: Tingting Zheng, Matthew Booth --- v2v/output_libvirt.ml | 118 ++++++++++++++++++++++++++++++++++++++++++++++--- v2v/output_libvirt.mli | 2 +- v2v/output_local.ml | 13 +++++- v2v/test-v2v-i-ova.xml | 5 ++- 4 files changed, 128 insertions(+), 10 deletions(-) diff --git
2016 Feb 09
0
[PATCH 1/4] v2v: collect source network and video adapter types
Those will be useful when making decisions about what configuration to set on output. The data is also included in --print-source so the tests are adjusted accordingly. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- test-data/phony-guests/guests.xml.in | 8 ++++++++ v2v/input_disk.ml | 2 ++ v2v/input_libvirtxml.ml | 32
2016 Mar 18
0
[PATCH v4 1/5] v2v: collect source network and video adapter types
Those will be useful when making decisions about what configuration to set on output. The data is also included in --print-source so the tests are adjusted accordingly. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- test-data/phony-guests/guests.xml.in | 8 ++++++++ v2v/input_disk.ml | 2 ++ v2v/input_libvirtxml.ml | 27
2016 Feb 20
0
[PATCH v2 1/4] v2v: collect source network and video adapter types
Those will be useful when making decisions about what configuration to set on output. The data is also included in --print-source so the tests are adjusted accordingly. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- Notes: v2: - add catch-all string-valued variants for source network and video adapter models test-data/phony-guests/guests.xml.in | 8 ++++++++
2017 Aug 30
1
[PATCH] v2v: warn when the guest has hostdev devices (RHBZ#1472719)
virt-v2v obviously cannot convert this kind of devices, since they are specific to the host of the hypervisor. Thus, emit a warning about the presence of passthrough host devices, so at least this can be noticed when converting a guest. --- v2v/parse_libvirt_xml.ml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index
2019 Apr 12
1
[PATCH] v2v: warn when the guest has direct network interfaces (RHBZ#1518539)
virt-v2v obviously cannot convert this kind of devices, since they are specific to the host of the hypervisor. Thus, emit a warning about the presence of direct network interfaces, so at least this can be noticed when converting a guest. --- v2v/parse_libvirt_xml.ml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index
2017 Mar 16
2
[PATCH] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
--- v2v/parse_libvirt_xml.ml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_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
2017 Mar 16
2
[PATCH v2] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
--- v2v/parse_libvirt_xml.ml | 18 ++++++++++++++++-- v2v/test-v2v-print-source.expected | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_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 =