Displaying 11 results from an estimated 11 matches for "xpath_int64".
Did you mean:
xpath_int
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 Oct 08
0
[PATCH v2 4/4] common/mltools: xpath_helpers: Get rid of xpath_*_default functions.
...helpers.ml b/common/mltools/xpath_helpers.ml
index 05fad89a4..3afee8b21 100644
--- a/common/mltools/xpath_helpers.ml
+++ b/common/mltools/xpath_helpers.ml
@@ -40,15 +40,3 @@ let xpath_eval parsefn xpathctx expr =
let xpath_string = xpath_eval identity
let xpath_int = xpath_eval int_of_string
let xpath_int64 = xpath_eval Int64.of_string
-
-(* Parse an xpath expression and return a string/int; if the expression
- * doesn'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...
2017 Oct 27
0
[PATCH v11 7/8] mllib: add XPath helper xpath_get_nodes
...helpers.ml b/common/mltools/xpath_helpers.ml
index 3afee8b21..d2bfd3fb9 100644
--- a/common/mltools/xpath_helpers.ml
+++ b/common/mltools/xpath_helpers.ml
@@ -40,3 +40,12 @@ let xpath_eval parsefn xpathctx expr =
let xpath_string = xpath_eval identity
let xpath_int = xpath_eval int_of_string
let xpath_int64 = xpath_eval 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_front node nodes
+ done;
+ List.rev !nodes
dif...
2017 Apr 12
1
[PATCH] mllib: Bind %identity C primitive to Common_utils.identity.
...4
--- a/mllib/xpath_helpers.ml
+++ b/mllib/xpath_helpers.ml
@@ -36,8 +36,6 @@ let xpath_eval parsefn xpathctx expr =
expr str
)
-external identity : 'a -> 'a = "%identity"
-
let xpath_string = xpath_eval identity
let xpath_int = xpath_eval int_of_string
let xpath_int64 = xpath_eval Int64.of_string
diff --git a/v2v/input_vmx.ml b/v2v/input_vmx.ml
index b72161a82..c48a0155a 100644
--- a/v2v/input_vmx.ml
+++ b/v2v/input_vmx.ml
@@ -26,8 +26,6 @@ open Types
open Utils
open Name_from_disk
-external identity : 'a -> 'a = "%identity"
-
let rec f...
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 ...
2018 Jul 05
4
[PATCH] v2v: Preserve VM Generation ID (RHBZ#1598350).
...t;in the libvirt XML metadata, <name> is missing or empty")
| Some s -> s in
+ let genid =
+ match xpath_string "/domain/genid/text()" with
+ | None | Some "" -> None
+ | Some _ as s -> s in
let memory =
Option.default (1024L *^ 1024L) (xpath_int64 "/domain/memory/text()") in
let memory = memory *^ 1024L in
@@ -481,6 +485,7 @@ let parse_libvirt_xml ?conn xml =
({
s_hypervisor = hypervisor;
s_name = name; s_orig_name = name;
+ s_genid = genid;
s_memory = memory;
s_vcpu = vcpu;
s_cpu_vendor = cpu_vend...
2018 Jul 05
0
Re: [PATCH] v2v: Preserve VM Generation ID (RHBZ#1598350).
...name> is missing or empty")
> | Some s -> s in
> + let genid =
> + match xpath_string "/domain/genid/text()" with
> + | None | Some "" -> None
> + | Some _ as s -> s in
> let memory =
> Option.default (1024L *^ 1024L) (xpath_int64 "/domain/memory/text()")
> in
> let memory = memory *^ 1024L in
> @@ -481,6 +485,7 @@ let parse_libvirt_xml ?conn xml =
> ({
> s_hypervisor = hypervisor;
> s_name = name; s_orig_name = name;
> + s_genid = genid;
> s_memory = memory;
>...
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 Oct 27
15
[PATCH v11 0/8] virt-builder-repository
Hi all,
Here is the latest version of the series.
Diffs to v10:
* Make Index.arch a (string, string option) maybe and use it
to guess arch at parse time
* Compute the image size at parse time when the template flag
is set and the value is missing.
* Add virt-repository_main slow test
* Other fixes from Richard's comments
Cédric Bosdonnat (7):
Ignore builder/*.out and *.img
2015 Oct 29
7
[PATCH 0/7] v2v: Miscellaneous refactorings.
Just refactoring.
Rich.