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

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