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

[PATCH 4/6] Add DCB option to GUI FCoE setup (#513011)



---
 iw/autopart_type.py  |    6 ++++--
 ui/fcoe-config.glade |   38 ++++++++++++++++++++++++--------------
 2 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index bdf7e6f..fc0e4be 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -342,9 +342,10 @@ class PartitionTypeWindow(InstallWindow):
     def addFcoeDrive(self):
         (dxml, dialog) = gui.getGladeWidget("fcoe-config.glade",
                                             "fcoeDialog")
+        combo = dxml.get_widget("fcoeNicCombo")
+        dcb_cb = dxml.get_widget("dcbCheckbutton")
 
         # Populate the combo
-        combo = dxml.get_widget("fcoeNicCombo")
         cell = gtk.CellRendererText()
         combo.pack_start(cell, True)
         combo.set_attributes(cell, text = 0)
@@ -405,7 +406,8 @@ class PartitionTypeWindow(InstallWindow):
 
             try:
                 self.storage.fcoe.addSan(nic=store.get_value(iter, 1),
-                                         dcb=False, intf=self.intf)
+                                         dcb=dcb_cb.get_active(),
+                                         intf=self.intf)
             except IOError, e:
                 self.intf.messageWindow(_("Error"), str(e),
                                         custom_icon="error")
diff --git a/ui/fcoe-config.glade b/ui/fcoe-config.glade
index 7034064..6d7f017 100644
--- a/ui/fcoe-config.glade
+++ b/ui/fcoe-config.glade
@@ -9,10 +9,12 @@
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <child>
           <widget class="GtkVBox" id="vbox1">
             <property name="visible">True</property>
             <property name="border_width">12</property>
+            <property name="orientation">vertical</property>
             <property name="spacing">12</property>
             <child>
               <widget class="GtkLabel" id="label3">
@@ -28,37 +30,46 @@ your FCoE switch.</property>
               </packing>
             </child>
             <child>
-              <placeholder/>
-            </child>
-            <child>
-              <widget class="GtkTable" id="fcoeTable">
+              <widget class="GtkHBox" id="hbox2">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
-                <property name="n_columns">2</property>
-                <property name="column_spacing">6</property>
-                <property name="row_spacing">6</property>
                 <child>
                   <widget class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes">NIC</property>
+                    <property name="label" translatable="yes">NIC:</property>
                   </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
                 </child>
                 <child>
                   <widget class="GtkComboBox" id="fcoeNicCombo">
                     <property name="visible">True</property>
                   </widget>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
               </widget>
               <packing>
-                <property name="position">2</property>
+                <property name="expand">False</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
-              <placeholder/>
+              <widget class="GtkCheckButton" id="dcbCheckbutton">
+                <property name="label" translatable="yes">Use DCB</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">2</property>
+              </packing>
             </child>
           </widget>
           <packing>
@@ -105,7 +116,6 @@ your FCoE switch.</property>
                           <widget class="GtkImage" id="image1">
                             <property name="visible">True</property>
                             <property name="stock">gtk-add</property>
-                            <property name="icon-size">4</property>
                           </widget>
                           <packing>
                             <property name="expand">False</property>
-- 
1.6.5.2


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