search for: xpath_to_int

Displaying 9 results from an estimated 9 matches for "xpath_to_int".

2014 Nov 24
3
[PATCH] v2v: -i ova: Remove incorrect warning for disks that have no parent controller (RHBZ#1167302).
...v/input_ova.ml b/v2v/input_ova.ml index 95af2e5..9a9c10a 100644 --- a/v2v/input_ova.ml +++ b/v2v/input_ova.ml @@ -187,14 +187,17 @@ object for i = 0 to nr_nodes-1 do let n = Xml.xpathobj_node doc obj i in Xml.xpathctx_set_current_context xpathctx n; - let parent_id = xpath_to_int "rasd:Parent/text()" 0 in (* XXX We assume the OVF lists these in order. let address = xpath_to_int "rasd:AddressOnParent/text()" 0 in *) (* Find the parent controller. *) - let controller = parent_controller parent_id in + l...
2014 Nov 24
0
Re: [PATCH] v2v: -i ova: Remove incorrect warning for disks that have no parent controller (RHBZ#1167302).
...ndex 95af2e5..9a9c10a 100644 > --- a/v2v/input_ova.ml > +++ b/v2v/input_ova.ml > @@ -187,14 +187,17 @@ object > for i = 0 to nr_nodes-1 do > let n = Xml.xpathobj_node doc obj i in > Xml.xpathctx_set_current_context xpathctx n; > - let parent_id = xpath_to_int "rasd:Parent/text()" 0 in > > (* XXX We assume the OVF lists these in order. > let address = xpath_to_int "rasd:AddressOnParent/text()" 0 in > *) > > (* Find the parent controller. *) > - let controller = parent...
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
2016 Sep 06
2
[PATCH] virt-v2v: Support for ova exported from AWS
...ovf:Name/text()" "" in - if name = "" then - error (f_"could not parse ovf:Name from OVF document"); + xpath_to_string "/ovf:Envelope/ovf:VirtualSystem/ovf:Name/text()" "default" in (* Search for memory. *) let memory = xpath_to_int "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:ResourceType/text()=4]/rasd:VirtualQuantity/text()" (1024 * 1024) in @@ -263,10 +261,10 @@ object Xml.xpathctx_set_current_context xpathctx n; let file_id = xpath_to_string "rasd:HostResourc...
2015 Jun 25
0
[PATCH v2] v2v: Free XML objects in the correct order.
...@@ let parse_libvirt_xml ?conn xml = let obj = Xml.xpath_eval_expression xpathctx expr in if Xml.xpathobj_nr_nodes obj < 1 then default else ( - let node = Xml.xpathobj_node doc obj 0 in + let node = Xml.xpathobj_node obj 0 in Xml.node_as_string node ) and xpath_to_int expr default = let obj = Xml.xpath_eval_expression xpathctx expr in if Xml.xpathobj_nr_nodes obj < 1 then default else ( - let node = Xml.xpathobj_node doc obj 0 in + let node = Xml.xpathobj_node obj 0 in let str = Xml.node_as_string node in try int_of_stri...
2015 Jun 25
0
[PATCH] v2v: Free XML objects in the correct order.
...@@ let parse_libvirt_xml ?conn xml = let obj = Xml.xpath_eval_expression xpathctx expr in if Xml.xpathobj_nr_nodes obj < 1 then default else ( - let node = Xml.xpathobj_node doc obj 0 in + let node = Xml.xpathobj_node obj 0 in Xml.node_as_string node ) and xpath_to_int expr default = let obj = Xml.xpath_eval_expression xpathctx expr in if Xml.xpathobj_nr_nodes obj < 1 then default else ( - let node = Xml.xpathobj_node doc obj 0 in + let node = Xml.xpathobj_node obj 0 in let str = Xml.node_as_string node in try int_of_stri...
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.
2016 Sep 06
0
Re: [PATCH] virt-v2v: Support for ova exported from AWS
..." in > - if name = "" then > - error (f_"could not parse ovf:Name from OVF document"); > + xpath_to_string "/ovf:Envelope/ovf:VirtualSystem/ovf:Name/text()" "default" in > > (* Search for memory. *) > let memory = xpath_to_int "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:ResourceType/text()=4]/rasd:VirtualQuantity/text()" (1024 * 1024) in > @@ -263,10 +261,10 @@ object > > Xml.xpathctx_set_current_context xpathctx n; > let file_id = xpath_to_string &q...
2015 Jul 01
12
[PATCH 1/9] v2v: Stable bus and slot numbers for removable drives (RHBZ#1238053).
This patch series adds stable bus and slot numbers for removable drives (CDs and floppies) when the guest is converted using virt-v2v or virt-p2v. Previously we were a bit random about this. After this patch series, the bus and slot numbers and preserved if at all possible. BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1238053 Rich.