Blame SOURCES/0066-v2v-i-ova-parse-MAC-address-from-rasd-Address-RHBZ-1.patch

151578
From 0ce5239605cf455e4891224b6594f33f24b7bd9a Mon Sep 17 00:00:00 2001
151578
From: Pino Toscano <ptoscano@redhat.com>
151578
Date: Thu, 2 Nov 2017 11:13:42 +0100
151578
Subject: [PATCH] v2v: -i ova: parse MAC address from <rasd:Address>
151578
 (RHBZ#1506572)
151578
151578
Read the MAC address of the network interfaces from the <rasd:Address>
151578
tag of the OVF.  This seems to be one of the possible ways used in OVFs.
151578
151578
(cherry picked from commit a1b008e2d138a90cbf2147d69d5d2d4d745b03cd)
151578
---
151578
 v2v/parse_ovf_from_ova.ml | 3 ++-
151578
 1 file changed, 2 insertions(+), 1 deletion(-)
151578
151578
diff --git a/v2v/parse_ovf_from_ova.ml b/v2v/parse_ovf_from_ova.ml
151578
index 989483e2e..dba0ce585 100644
151578
--- a/v2v/parse_ovf_from_ova.ml
151578
+++ b/v2v/parse_ovf_from_ova.ml
151578
@@ -211,8 +211,9 @@ let parse_ovf_from_ova ovf_filename =
151578
       Xml.xpathctx_set_current_context xpathctx n;
151578
       let vnet =
151578
         xpath_string_default "rasd:ElementName/text()" (sprintf"eth%d" i) in
151578
+      let mac = xpath_string "rasd:Address/text()" in
151578
       let nic = {
151578
-        s_mac = None;
151578
+        s_mac = mac;
151578
         s_nic_model = None;
151578
         s_vnet = vnet;
151578
         s_vnet_orig = vnet;
151578
-- 
151578
2.14.3
151578