|
|
0d20ef |
From 4ce3c8f8c9ce120dfe580402fe82663dc8d14f9a Mon Sep 17 00:00:00 2001
|
|
|
0d20ef |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
0d20ef |
Date: Tue, 18 Nov 2014 12:35:38 +0000
|
|
|
0d20ef |
Subject: [PATCH] v2v: -i ova: XML is case-sensitive, so replace 'InstanceId'
|
|
|
0d20ef |
with 'InstanceID'.
|
|
|
0d20ef |
|
|
|
0d20ef |
(cherry picked from commit 78f6d3aff59ab0a539b8f2a90b88a2b6f7c994f6)
|
|
|
0d20ef |
---
|
|
|
0d20ef |
v2v/input_ova.ml | 12 ++++++++----
|
|
|
0d20ef |
1 file changed, 8 insertions(+), 4 deletions(-)
|
|
|
0d20ef |
|
|
|
0d20ef |
diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
|
|
|
0d20ef |
index d9928de..836b24e 100644
|
|
|
0d20ef |
--- a/v2v/input_ova.ml
|
|
|
0d20ef |
+++ b/v2v/input_ova.ml
|
|
|
0d20ef |
@@ -171,9 +171,11 @@ object
|
|
|
0d20ef |
Xml.xpathctx_set_current_context xpathctx n;
|
|
|
0d20ef |
let address = xpath_to_int "rasd:AddressOnParent/text()" 0 in
|
|
|
0d20ef |
let parent_id = xpath_to_int "rasd:Parent/text()" 0 in
|
|
|
0d20ef |
- (* Probably the parent controller. *)
|
|
|
0d20ef |
- let expr = sprintf "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:InstanceId/text()=%d]/rasd:ResourceType/text()" parent_id in
|
|
|
0d20ef |
+
|
|
|
0d20ef |
+ (* Find the parent controller. *)
|
|
|
0d20ef |
+ let expr = sprintf "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:InstanceID/text()=%d]/rasd:ResourceType/text()" parent_id in
|
|
|
0d20ef |
let controller = xpath_to_int expr 0 in
|
|
|
0d20ef |
+
|
|
|
0d20ef |
(* 6: iscsi controller, 5: ide. assuming scsi or ide *)
|
|
|
0d20ef |
let target_dev =
|
|
|
0d20ef |
match controller with
|
|
|
0d20ef |
@@ -243,9 +245,11 @@ object
|
|
|
0d20ef |
assert (id = 14 || id = 15 || id = 16);
|
|
|
0d20ef |
let address = xpath_to_int "rasd:AddressOnParent/text()" 0 in
|
|
|
0d20ef |
let parent_id = xpath_to_int "rasd:Parent/text()" 0 in
|
|
|
0d20ef |
- (* Probably the parent controller. *)
|
|
|
0d20ef |
- let expr = sprintf "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:InstanceId/text()=%d]/rasd:ResourceType/text()" parent_id in
|
|
|
0d20ef |
+
|
|
|
0d20ef |
+ (* Find the parent controller. *)
|
|
|
0d20ef |
+ let expr = sprintf "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:InstanceID/text()=%d]/rasd:ResourceType/text()" parent_id in
|
|
|
0d20ef |
let controller = xpath_to_int expr 0 in
|
|
|
0d20ef |
+
|
|
|
0d20ef |
(* 6: iscsi controller, 5: ide. assuming scsi or ide *)
|
|
|
0d20ef |
let target_dev =
|
|
|
0d20ef |
match controller with
|
|
|
0d20ef |
--
|
|
|
0d20ef |
1.8.3.1
|
|
|
0d20ef |
|