[PATCH 3/3 rhel7-branch] fcoe gui: repopulate device tree only if device was actually added (#1039223)

Radek Vykydal rvykydal at redhat.com
Fri Dec 13 12:26:23 UTC 2013


Also give error message in case of fail.

Related: rhbz#1039223
---
 anaconda.spec.in                            | 2 +-
 pyanaconda/kickstart.py                     | 4 +++-
 pyanaconda/ui/gui/spokes/advstorage/fcoe.py | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/anaconda.spec.in b/anaconda.spec.in
index b177df6..68f6809 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -80,7 +80,7 @@ BuildRequires: s390utils-devel
 %endif
 
 Requires: anaconda-widgets = %{version}-%{release}
-Requires: python-blivet >= 0.18.10
+Requires: python-blivet >= 0.18.11
 Requires: gnome-icon-theme-symbolic
 Requires: python-meh >= %{mehver}
 Requires: libreport-anaconda >= 2.0.21-1
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index d615208..4d87259 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -525,7 +525,9 @@ class Fcoe(commands.fcoe.F13_Fcoe):
         if fc.nic not in nm.nm_devices():
             raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specified nonexistent nic %s in fcoe command" % fc.nic)
 
-        blivet.fcoe.fcoe().addSan(nic=fc.nic, dcb=fc.dcb, auto_vlan=True)
+        msg = blivet.fcoe.fcoe().addSan(nic=fc.nic, dcb=fc.dcb, auto_vlan=True) or "Succeeded."
+
+        log.info("adding FCoE SAN on %s: %s", (fc.nic, msg))
 
         return fc
 
diff --git a/pyanaconda/ui/gui/spokes/advstorage/fcoe.py b/pyanaconda/ui/gui/spokes/advstorage/fcoe.py
index 9ac765e..cde8969 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/fcoe.py
+++ b/pyanaconda/ui/gui/spokes/advstorage/fcoe.py
@@ -85,7 +85,7 @@ class FCoEDialog(GUIObject):
 
     def _add(self):
         try:
-            self.fcoe.addSan(self.nic, self.use_dcb, self.use_auto_vlan)
+            self._addError = self.fcoe.addSan(self.nic, self.use_dcb, self.use_auto_vlan)
         except Exception as e:
             self._addError = str(e)
 
-- 
1.7.11.7



More information about the anaconda-patches mailing list