Author: mzugec
Date: Mon Aug 17 11:52:21 2009
New Revision: 58360
URL: http://svn.opensuse.org/viewcvs/yast?rev=58360&view=rev
Log:
L3: proposed bridge over bonding (bnc#528076)
Modified:
trunk/network/VERSION
trunk/network/package/yast2-network.changes
trunk/network/src/modules/Lan.ycp
Modified: trunk/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=58360&r1=58359&r2=58360&view=diff
==============================================================================
--- trunk/network/VERSION (original)
+++ trunk/network/VERSION Mon Aug 17 11:52:21 2009
@@ -1 +1 @@
-2.18.40
+2.18.41
Modified: trunk/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.changes?rev=58360&r1=58359&r2=58360&view=diff
==============================================================================
--- trunk/network/package/yast2-network.changes (original)
+++ trunk/network/package/yast2-network.changes Mon Aug 17 11:52:21 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Aug 17 11:51:35 CEST 2009 - mzugec@suse.de
+
+- L3: proposed bridge over bonding (bnc#528076)
+- 2.18.41
+
+-------------------------------------------------------------------
Fri Aug 14 17:48:25 CEST 2009 - kmachalkova@suse.cz
- Simple 'network' configuration in 1st stage of installation
Modified: trunk/network/src/modules/Lan.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/Lan.ycp?rev=58360&r1=58359&r2=58360&view=diff
==============================================================================
--- trunk/network/src/modules/Lan.ycp (original)
+++ trunk/network/src/modules/Lan.ycp Mon Aug 17 11:52:21 2009
@@ -775,12 +775,39 @@
}
});
+ // collect all interfaces that will be skipped from bridged proposal
+ list<string> skipped = [];
+ foreach(integer current, any config, LanItems::Items, {
+ string ifcfg = LanItems::Items[current, "ifcfg"]:"";
+ if (NetworkInterfaces::GetType(ifcfg)=="br"){
+ NetworkInterfaces::Edit(ifcfg);
+ y2milestone("Bridge %1 with ports (%2) found", ifcfg, NetworkInterfaces::Current["BRIDGE_PORTS"]:"");
+ skipped=add(skipped, ifcfg);
+ foreach(string port, (list<string>) splitstring(NetworkInterfaces::Current["BRIDGE_PORTS"]:"", " "), {
+ skipped=add(skipped, port);
+ });
+ }
+ if (NetworkInterfaces::GetType(ifcfg)=="bond"){
+ NetworkInterfaces::Edit(ifcfg);
+ foreach(string i, (list<string>)splitstring("0,1,2,3,4,5,6,7,8,9", ","), {
+ string slave = NetworkInterfaces::Current[sformat("BONDING_SLAVE%1", i)]:"";
+ y2milestone("For interface %1 found slave %2", ifcfg, slave);
+ if(size(slave)>0) skipped=add(skipped, slave);
+ });
+ }
+ });
+ y2milestone("Skipped interfaces : %1", skipped);
+
// then each configuration (except bridges) move to the bridge
// and add old device name into bridge_ports
foreach(integer current, any config, LanItems::Items, {
string ifcfg = LanItems::Items[current, "ifcfg"]:"";
+ if (contains(skipped, ifcfg)){
+ y2milestone("Skipping interface %1", ifcfg);
+ continue;
+ }
if (size(ifcfg)>0){
- if (! (NetworkInterfaces::GetType(ifcfg)=="br")){
+ if (! (NetworkInterfaces::GetType(ifcfg)=="bond")){
NetworkInterfaces::Edit(ifcfg);
string new_ifcfg = sformat("br%1", NetworkInterfaces::GetFreeDevice("br"));
y2milestone("old configuration %1, bridge %2", ifcfg, new_ifcfg);
@@ -800,11 +827,48 @@
LanItems::Items[current, "ifcfg"] = new_ifcfg;
LanItems::modified=true;
LanItems::force_restart=true;
- y2internal("List %1", NetworkInterfaces::List(""));
+ y2debug("List %1", NetworkInterfaces::List(""));
// re-read configuration to see new items in UI
LanItems::Read();
} else y2error("error while proposing bridge device for %1", ifcfg);
- } else y2internal("skipping bridge ...");
+ } else {
+ NetworkInterfaces::Edit(ifcfg);
+ map