search for: xpath_register_n

Displaying 20 results from an estimated 20 matches for "xpath_register_n".

Did you mean: xpath_register_ns
2014 Aug 26
3
Segmentation fault when trying to add binding
......, Following is the patch: =================================================================================== diff --git a/v2v/xml-c.c b/v2v/xml-c.c index 4c9bc77..a917c24 100644 --- a/v2v/xml-c.c +++ b/v2v/xml-c.c @@ -141,6 +141,16 @@ v2v_xml_xpath_new_context (value docv) } value +v2v_xml_xpath_register_ns (value prefix, value uri, value xpathctx) +{ + CAMLparam3 (prefix, uri, xpathctx); + CAMLlocal1 (retval); + retval = xmlXPathRegisterNs (BAD_CAST String_val (prefix), BAD_CAST String_val (uri), xpathctx); + + CAMLreturn (retval); +} + +value v2v_xml_xpath_eval_expression (value xpathctxv, val...
2017 Mar 13
0
[PATCH 2/2] v2v: -i ova: Factor out the OVF parsing into a separate module.
..._of_file -> ()); close_in chan ) mf; - (* Parse the ovf file. *) let ovf_folder = Filename.dirname ovf in - let xml = read_whole_file ovf in - let doc = Xml.parse_memory xml in - - (* Handle namespaces. *) - let xpathctx = Xml.xpath_new_context doc in - Xml.xpath_register_ns xpathctx - "ovf" "http://schemas.dmtf.org/ovf/envelope/1"; - Xml.xpath_register_ns xpathctx - "rasd" "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"; - Xml.xpath_register_ns xpathctx - "vmw&quot...
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.
2015 Jun 25
0
[PATCH v2] v2v: Free XML objects in the correct order.
...thctx_custom_operations, + xpathctxv = caml_alloc_custom (&xpathctx_ptr_custom_operations, sizeof (xmlXPathContextPtr), 0, 1); - Xpathctx_val (xpathctxv) = xpathctx; + Xpathctx_ptr_val (xpathctxv) = xpathctx; CAMLreturn (xpathctxv); } value -v2v_xml_xpath_register_ns (value xpathctxv, value prefix, value uri) +v2v_xml_xpathctx_ptr_register_ns (value xpathctxv, value prefix, value uri) { CAMLparam3 (xpathctxv, prefix, uri); xmlXPathContextPtr xpathctx; int r; - xpathctx = Xpathctx_val (xpathctxv); + xpathctx = Xpathctx_ptr_val (xpathctxv); r =...
2015 Jun 25
0
[PATCH] v2v: Free XML objects in the correct order.
...thctx_custom_operations, + xpathctxv = caml_alloc_custom (&xpathctx_ptr_custom_operations, sizeof (xmlXPathContextPtr), 0, 1); - Xpathctx_val (xpathctxv) = xpathctx; + Xpathctx_ptr_val (xpathctxv) = xpathctx; CAMLreturn (xpathctxv); } value -v2v_xml_xpath_register_ns (value xpathctxv, value prefix, value uri) +v2v_xml_xpathctx_ptr_register_ns (value xpathctxv, value prefix, value uri) { CAMLparam3 (xpathctxv, prefix, uri); xmlXPathContextPtr xpathctx; int r; - xpathctx = Xpathctx_val (xpathctxv); + xpathctx = Xpathctx_ptr_val (xpathctxv); r =...
2015 Jun 25
2
[PATCH v2] v2v: Free XML objects in the correct order.
In version 2: - No substantial change, I just tidied up the code a bit. - Removed one case where whitespace changes had crept in. Rich.
2017 Oct 08
0
[PATCH v2 4/4] common/mltools: xpath_helpers: Get rid of xpath_*_default functions.
...esn't match, return the default. *) diff --git a/v2v/copy_to_local.ml b/v2v/copy_to_local.ml index d2471a546..8a64f3a58 100644 --- a/v2v/copy_to_local.ml +++ b/v2v/copy_to_local.ml @@ -243,14 +243,14 @@ and parse_libvirt_xml guest_name xml = let xpathctx = Xml.xpath_new_context doc in Xml.xpath_register_ns xpathctx "vmware" "http://libvirt.org/schemas/domain/vmware/1.0"; - let xpath_string = xpath_string xpathctx - and xpath_string_default = xpath_string_default xpathctx in + let xpath_string = xpath_string xpathctx in (* Get the dcpath, only pres...
2017 Oct 13
0
[PATCH 1/5] v2v: Remove --dcpath parameter and related functionality.
...ed in libvirt >= 1.2.20. + (* Find the <vmware:datacenterpath> element from the XML. This + * was added in libvirt >= 1.2.20. *) - let xml_dcPath = + dcPath <- ( let doc = Xml.parse_memory xml in let xpathctx = Xml.xpath_new_context doc in Xml.xpath_register_ns xpathctx "vmware" "http://libvirt.org/schemas/domain/vmware/1.0"; - let xpath_string = xpath_string xpathctx in - xpath_string "/domain/vmware:datacenterpath" in - - (* Calculate the dcPath we're going to use. *) - dcPath <- ( - ma...
2017 Feb 07
0
[PATCH v2 2/7] Move xml and xpath_helpers OCAML code to mllib
...thctxptr = _xpath_new_context docptr in Gc.finalise free_xpathctxptr xpathctxptr; docptr, xpathctxptr external xpathctxptr_register_ns : xpathctxptr -> string -> string -> unit - = "v2v_xml_xpathctxptr_register_ns" + = "mllib_xml_xpathctxptr_register_ns" let xpath_register_ns (_, xpathctxptr) prefix uri = xpathctxptr_register_ns xpathctxptr prefix uri external xpathctxptr_eval_expression : xpathctxptr -> string -> xpathobjptr - = "v2v_xml_xpathctxptr_eval_expression" + = "mllib_xml_xpathctxptr_eval_expression" let xpath_eval_expressio...
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
2015 Oct 09
4
[PATCH 0/4] v2v: Use libvirt-supplied <vmware:datacenterpath> if available.
See earlier thread on libvir-list: https://www.redhat.com/archives/libvir-list/2015-September/thread.html#00201 Libvirt >= 1.2.20 supplies the correct dcPath parameter. If it is available in the libvirt XML, use it, otherwise fall back to the old method of trying to guess it from the vpx:// path. Patches 1, 2 and 4 are just refactoring around this change. Rich.
2015 Nov 19
4
[PATCH 0/4] v2v: Add a new tool virt-v2v-copy-to-local to handle Xen and ESXi
It turns out that RHEL 5 Xen conversions don't work if the source disk is located on a block device. See patch 1/4 for the gory details. This patch series proposes a new tool called virt-v2v-copy-to-local which essentially is a way to make new virt-v2v work like the old virt-v2v, ie. copy first, convert after. Of course this is very slow and would only be used as a last resort, but I
2017 Oct 13
7
[PATCH 0/5] v2v: Handle disks with snapshots (RHBZ#1172425).
The first commit removes the --dcpath parameter, which just makes the following stuff simpler. Since libvirt has supported getting datacenterpath from VMware since Oct 2015, it's time to drop this hairy parameter. The rest is quite a complicated series of refactorings, followed by a very simple change to add handling of snapshots taken from old virt-v2v. Rich.
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
.../v2v/xml-c.c @@ -191,7 +191,7 @@ v2v_xml_xpathctx_ptr_register_ns (value xpathctxv, value prefix, value uri) xpathctx = Xpathctx_ptr_val (xpathctxv); r = xmlXPathRegisterNs (xpathctx, BAD_CAST String_val (prefix), BAD_CAST String_val (uri)); if (r == -1) - caml_invalid_argument ("xpath_register_ns: unable to register namespace"); + caml_invalid_argument ("xpath_register_ns: unable to register namespace"); CAMLreturn (Val_unit); } -- 2.5.0
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2018 Apr 25
9
[PATCH v2 0/9] v2v: -i ova: Handle OVAs containing snapshots.
https://bugzilla.redhat.com/show_bug.cgi?id=1570407 This turned into quite an in-depth refactoring of how we handle OVAs. It also fixes a potential security issue. Rich.
2017 Feb 07
11
[PATCH v2 0/7] Introducing virt-builder-repository
Hi all, Here is a new version of the virt-builder-repository series taking care of Pino's comments. It has also been rebased on recent master. Cédric Bosdonnat (7): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: expose libosinfo DB reading functions in mllib builder: rename docs test script builder: add
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 Feb 10
15
[PATCH v3 00/10] Introducing virt-builder-repository
Hi guys, Here is a v3 of the series, including changes to answer Richard's comments. Cédric Bosdonnat (10): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: add Xml.parse_file helper lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo