[PATCH rhel7-alpha2-branch 06/16] iscsi: Display iface in login success dialog (#500273)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resolves: rhbz#500273
---
 pyanaconda/iw/advanced_storage.py  |    7 ++++---
 pyanaconda/partIntfHelpers.py      |    6 ++++--
 pyanaconda/textw/add_drive_text.py |    3 ++-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/iw/advanced_storage.py b/pyanaconda/iw/advanced_storage.py
index c83a541..ebaf0e9 100644
--- a/pyanaconda/iw/advanced_storage.py
+++ b/pyanaconda/iw/advanced_storage.py
@@ -269,7 +269,8 @@ class iSCSIGuiWizard(pih.iSCSIWizard):
         dialog.destroy()
         return (rc, selected_nodes)
 
-    def display_success_dialog(self, success_nodes, fail_nodes, fail_reason):
+    def display_success_dialog(self, success_nodes, fail_nodes, fail_reason,
+                               ifaces):
         (xml, dialog) = gui.getGladeWidget("iscsi-dialogs.glade", "success_dialog")
         w_success = xml.get_widget("label_success")
         w_success_win = xml.get_widget("scroll_window_success")
@@ -283,14 +284,14 @@ class iSCSIGuiWizard(pih.iSCSIWizard):
         w_separator = xml.get_widget("separator")
 
         if success_nodes:
-            markup = "\n".join(map(lambda n: n.name, success_nodes))
+            markup = "\n".join(map(lambda n: "%s via %s" % (n.name, ifaces.get(n.iface, n.iface)), success_nodes))
             buf = gtk.TextBuffer()
             buf.set_text(markup)
             w_success.show()
             w_success_val.set_buffer(buf)
             w_success_win.show()
         if fail_nodes:
-            markup = "\n".join(map(lambda n: n.name, fail_nodes))
+            markup = "\n".join(map(lambda n: "%s via %s" % (n.name, ifaces.get(n.iface, n.iface)), fail_nodes))
             buf = gtk.TextBuffer()
             buf.set_text(markup)
             w_fail.show()
diff --git a/pyanaconda/partIntfHelpers.py b/pyanaconda/partIntfHelpers.py
index d4036d5..e26f9b7 100644
--- a/pyanaconda/partIntfHelpers.py
+++ b/pyanaconda/partIntfHelpers.py
@@ -412,7 +412,8 @@ class iSCSIWizard():
         pass
 
     @abstractmethod
-    def display_success_dialog(self, success_nodes, fail_nodes, fail_reason):
+    def display_success_dialog(self, success_nodes, fail_nodes, fail_reason,
+                               ifaces):
         pass
 
     @abstractmethod
@@ -497,7 +498,8 @@ def drive_iscsi_addition(anaconda, wizard):
             elif step == STEP_SUMMARY:
                 rc = wizard.display_success_dialog(login_ok_nodes, 
                                                    login_fail_nodes,
-                                                   login_fail_msg)
+                                                   login_fail_msg,
+                                                   anaconda.id.storage.iscsi.ifaces)
                 if rc:
                     step = STEP_STABILIZE
                 else:
diff --git a/pyanaconda/textw/add_drive_text.py b/pyanaconda/textw/add_drive_text.py
index 0efaa7b..dbc54bc 100644
--- a/pyanaconda/textw/add_drive_text.py
+++ b/pyanaconda/textw/add_drive_text.py
@@ -229,7 +229,8 @@ class iSCSITextWizard(pih.iSCSIWizard):
                           if i in listbox.getSelection()]
         return (rc, selected_nodes)
 
-    def display_success_dialog(self, success_nodes, fail_nodes, fail_reason):
+    def display_success_dialog(self, success_nodes, fail_nodes, fail_reason,
+                               ifaces):
         buttons = [TEXT_OK_BUTTON]
         msg = _("Successfully logged into all the selected nodes.")
         msg_reason = _("Reason:")
-- 
1.7.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux