[PATCH rhel7-alpha2-branch 05/16] iscsi: display iface in Discovered Nodes dialog (#500273)

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

 



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

diff --git a/pyanaconda/iw/advanced_storage.py b/pyanaconda/iw/advanced_storage.py
index 9cd53f9..c83a541 100644
--- a/pyanaconda/iw/advanced_storage.py
+++ b/pyanaconda/iw/advanced_storage.py
@@ -172,6 +172,7 @@ class iSCSILoginDialog(iSCSICredentialsDialog):
 
 class iSCSIGuiWizard(pih.iSCSIWizard):
     NODE_NAME_COL = DeviceSelector.IMMUTABLE_COL + 1
+    NODE_INTERFACE_COL = DeviceSelector.IMMUTABLE_COL + 2
 
     def __init__(self):
         self.login_dialog = None
@@ -222,7 +223,7 @@ class iSCSIGuiWizard(pih.iSCSIWizard):
 
         return self._run_dialog(self.login_dialog.dialog)
 
-    def display_nodes_dialog(self, found_nodes):
+    def display_nodes_dialog(self, found_nodes, ifaces):
         def _login_button_disabler(device_selector, login_button, checked, item):
             login_button.set_sensitive(len(device_selector.getSelected()) > 0)
 
@@ -232,14 +233,16 @@ class iSCSIGuiWizard(pih.iSCSIWizard):
             gobject.TYPE_BOOLEAN,  # visible
             gobject.TYPE_BOOLEAN,  # active (checked)
             gobject.TYPE_BOOLEAN,  # immutable
-            gobject.TYPE_STRING    # node name
+            gobject.TYPE_STRING,   # node name
+            gobject.TYPE_STRING    # node interface
             )
         map(lambda node : store.append(None, (
                     node,        # the object
                     True,        # visible
                     True,        # active
                     False,       # not immutable
-                    node.name)),  # node's name
+                    node.name,   # node's name
+                    ifaces.get(node.iface, node.iface))), # node's interface
             found_nodes)
 
         # create and setup the device selector
@@ -253,7 +256,7 @@ class iSCSIGuiWizard(pih.iSCSIWizard):
                                      ds,
                                      xml.get_widget("button_login"))
         ds.createSelectionCol(toggledCB=callback)
-        ds.addColumn(_("Node Name"), self.NODE_NAME_COL)
+        ds.addColumn(_("Interface"), self.NODE_INTERFACE_COL)
         # attach the treeview to the dialog
         sw = xml.get_widget("nodes_scrolled_window")
         sw.add(view)
diff --git a/pyanaconda/partIntfHelpers.py b/pyanaconda/partIntfHelpers.py
index 30de3c1..d4036d5 100644
--- a/pyanaconda/partIntfHelpers.py
+++ b/pyanaconda/partIntfHelpers.py
@@ -408,7 +408,7 @@ class iSCSIWizard():
         pass
 
     @abstractmethod
-    def display_nodes_dialog(self, found_nodes):
+    def display_nodes_dialog(self, found_nodes, ifaces):
         pass
 
     @abstractmethod
@@ -470,7 +470,8 @@ def drive_iscsi_addition(anaconda, wizard):
                     anaconda.intf.messageWindow(_("iSCSI Nodes"), 
                                                 _("No iSCSI nodes to log in"))
                     break
-                (rc, selected_nodes) = wizard.display_nodes_dialog(found_nodes)
+                (rc, selected_nodes) = wizard.display_nodes_dialog(found_nodes,
+                                                                  anaconda.id.storage.iscsi.ifaces)
                 if not rc or len(selected_nodes) == 0:
                     break
                 step = STEP_LOGIN
diff --git a/pyanaconda/textw/add_drive_text.py b/pyanaconda/textw/add_drive_text.py
index 72f9b46..0efaa7b 100644
--- a/pyanaconda/textw/add_drive_text.py
+++ b/pyanaconda/textw/add_drive_text.py
@@ -187,7 +187,7 @@ class iSCSITextWizard(pih.iSCSIWizard):
         # should never stop us:
         return True
 
-    def display_nodes_dialog(self, found_nodes):
+    def display_nodes_dialog(self, found_nodes, iscsi_ifaces):
         grid_height = 4
         basic_grid = None
         if self.listbox_login.current() not in \
-- 
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