[PATCH rhel7-branch 2/6] network: support for adding bridge devices (#1075195)

Radek Vykydal rvykydal at redhat.com
Thu Sep 25 11:30:31 UTC 2014


Resolves: rhbz#1075195
---
 pyanaconda/ui/gui/spokes/network.glade |  4 ++++
 pyanaconda/ui/gui/spokes/network.py    | 10 ++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/network.glade b/pyanaconda/ui/gui/spokes/network.glade
index 6fa3d25..05f51fe 100644
--- a/pyanaconda/ui/gui/spokes/network.glade
+++ b/pyanaconda/ui/gui/spokes/network.glade
@@ -118,6 +118,10 @@
         <col id="1">bond</col>
       </row>
       <row>
+        <col id="0" translatable="yes">Bridge</col>
+        <col id="1" translatable="yes">bridge</col>
+      </row>
+      <row>
         <col id="0" translatable="yes">Team</col>
         <col id="1">team</col>
       </row>
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 355756f..6acaa7a 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -216,6 +216,7 @@ class DeviceConfiguration(object):
         'vlan': NetworkManager.DeviceType.VLAN,
         'bond': NetworkManager.DeviceType.BOND,
         'team': NetworkManager.DeviceType.TEAM,
+        'bridge': NetworkManager.DeviceType.BRIDGE,
         }
 
     def __init__(self, device=None, con_uuid=None):
@@ -278,6 +279,7 @@ class NetworkControlBox(GObject.GObject):
         NetworkManager.DeviceType.TEAM,
         NetworkManager.DeviceType.BOND,
         NetworkManager.DeviceType.VLAN,
+        NetworkManager.DeviceType.BRIDGE,
     ]
 
     wired_ui_device_types = [
@@ -285,6 +287,7 @@ class NetworkControlBox(GObject.GObject):
         NetworkManager.DeviceType.TEAM,
         NetworkManager.DeviceType.BOND,
         NetworkManager.DeviceType.VLAN,
+        NetworkManager.DeviceType.BRIDGE,
     ]
 
     device_type_sort_value = {
@@ -299,6 +302,7 @@ class NetworkControlBox(GObject.GObject):
         NetworkManager.DeviceType.BOND: N_("Bond"),
         NetworkManager.DeviceType.VLAN: N_("VLAN"),
         NetworkManager.DeviceType.TEAM: N_("Team"),
+        NetworkManager.DeviceType.BRIDGE: N_("Bridge"),
     }
 
     def __init__(self, builder, spoke=None):
@@ -857,7 +861,8 @@ class NetworkControlBox(GObject.GObject):
 
     def _refresh_slaves(self, dev_cfg):
         if dev_cfg.device_type in [NetworkManager.DeviceType.BOND,
-                                   NetworkManager.DeviceType.TEAM]:
+                                   NetworkManager.DeviceType.TEAM,
+                                   NetworkManager.DeviceType.BRIDGE]:
             slaves = ""
             if dev_cfg.device:
                 slaves = ",".join(s.get_iface() for s in dev_cfg.device.get_slaves())
@@ -913,7 +918,8 @@ class NetworkControlBox(GObject.GObject):
             self.builder.get_object("label_wired_parent").hide()
             self.builder.get_object("remove_toolbutton").set_sensitive(False)
         elif dev_type in [NetworkManager.DeviceType.BOND,
-                          NetworkManager.DeviceType.TEAM]:
+                          NetworkManager.DeviceType.TEAM,
+                          NetworkManager.DeviceType.BRIDGE]:
             notebook.set_current_page(0)
             self.builder.get_object("heading_wired_slaves").show()
             self.builder.get_object("label_wired_slaves").show()
-- 
1.9.3



More information about the anaconda-patches mailing list