Author: mzugec Date: Thu Apr 2 23:08:32 2009 New Revision: 56603 URL: http://svn.opensuse.org/viewcvs/yast?rev=56603&view=rev Log: fixed additional addresses with bonding (bnc#420074) Modified: branches/tmp/SLE-11-SP1-Stash/network/VERSION branches/tmp/SLE-11-SP1-Stash/network/package/yast2-network.changes branches/tmp/SLE-11-SP1-Stash/network/src/lan/address.ycp Modified: branches/tmp/SLE-11-SP1-Stash/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/network/V... ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/network/VERSION (original) +++ branches/tmp/SLE-11-SP1-Stash/network/VERSION Thu Apr 2 23:08:32 2009 @@ -1 +1 @@ -2.17.87 +2.17.88 Modified: branches/tmp/SLE-11-SP1-Stash/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/network/p... ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/network/package/yast2-network.changes (original) +++ branches/tmp/SLE-11-SP1-Stash/network/package/yast2-network.changes Thu Apr 2 23:08:32 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Apr 2 23:07:49 CEST 2009 - mzugec@suse.de + +- fixed additional addresses with bonding (bnc#420074) +- 2.17.88 + +------------------------------------------------------------------- Thu Mar 26 12:37:55 CET 2009 - mzugec@suse.cz - tun/tap device - don't remove default gw (bnc#483233) Modified: branches/tmp/SLE-11-SP1-Stash/network/src/lan/address.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/network/s... ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/network/src/lan/address.ycp (original) +++ branches/tmp/SLE-11-SP1-Stash/network/src/lan/address.ycp Thu Apr 2 23:08:32 2009 @@ -153,7 +153,11 @@ */ void InitSlave(string key) { -// UI::ChangeWidget(`id(key), `SelectedItems, settings["SLAVES"]:[]); + settings["SLAVES"] = LanItems::bond_slaves; + UI::ChangeWidget(`id("BONDSLAVE"), `SelectedItems, settings["SLAVES"]:[]); + + settings["BONDOPTION"] = LanItems::bond_option; + list items = createUnconfigured(settings["SLAVES"]:[]); map <string, any> configurations = NetworkInterfaces::FilterDevices("netcard"); foreach(string devtype, splitstring(NetworkInterfaces::CardRegex["netcard"]:"", "|"), { @@ -177,6 +181,9 @@ void StoreSlave(string key, map event) { settings["SLAVES"] = (list<string>)UI::QueryWidget (`id(key), `SelectedItems); + settings["BONDOPTION"] = UI::QueryWidget (`id("BONDOPTION"), `Value); + LanItems::bond_slaves = settings["SLAVES"]:[]; + LanItems::bond_option = settings["BONDOPTION"]:""; } @@ -601,6 +608,17 @@ "store": StoreVLANSlave, "help": help["etherdevice"]:"", ], +/* + "BONDSLAVES": $[ + "widget": `multi_selection_box, + "label": _("Bond &Slaves"), + "opt": [`shrinkable], + "items" : [ ], + "init": InitSlave, + "store": StoreSlave, + "help": help["bondslave"]:"", + ], +*/ "BONDSLAVE": $[ "widget": `multi_selection_box, "label": _("Bond &Slaves"), @@ -617,8 +635,8 @@ "label": _("&Bond Driver Options"), "opt": [`hstretch, `editable], "help": _("<p>Select the bond driver options, and edit it if necessary. </p>"), - "items": [["mode=balance-rr"], ["mode=active-backup"], ["mode=balance-xor"], - ["mode=broadcast"], ["mode=802.3ad"], ["mode=balance-tlb"], ["mode=balance-alb"]], + "items" : [["mode=balance-rr"], ["mode=active-backup"], ["mode=balance-xor"], + ["mode=broadcast"], ["mode=802.3ad"], ["mode=balance-tlb"], ["mode=balance-alb"]] ], "BOOTPROTO": $[ @@ -884,29 +902,7 @@ "AD_ADDRESSES", frame2 ); - - if (LanItems::type == "bond") - { - settings["SLAVES"] = LanItems::bond_slaves; - settings["BONDOPTION"] = LanItems::bond_option; - - //fill up the drop list and make the default value first - - wd["BONDOPTION", "items"] = filter(list<string> v, wd["BONDOPTION", "items"]:[], - { - return v[0]:"" != LanItems::bond_option; - }); - wd["BONDOPTION", "items"] = prepend(wd["BONDOPTION", "items"]:[], [LanItems::bond_option]); - - - address_contents = `VBox( - `Left(label), - just_address_contents, - `MarginBox(1, 0, `Frame( "", `VBox("BONDSLAVE", "BONDOPTION"))), - frame2 - ); - } - else if (LanItems::type == "br") + if (LanItems::type == "br") { address_contents = `VBox( `Left(label), @@ -975,6 +971,10 @@ "header" : _("&Hardware"), "contents" : `VBox( "HWDIALOG" ) ], + "bond_slaves" : $[ + "header" : _("&Bond Slaves"), + "contents" : `VBox( "BONDSLAVE", "BONDOPTION" ) + ], "t3" : $[ "header" : _("&Wireless"), "contents" : `Empty (), @@ -988,7 +988,7 @@ ]; if (contains(["vlan", "br"], LanItems::type)) wd_content["tab_order"]= ["t_general", "t_addr"]; if (contains(["tun", "tap"], LanItems::type)) wd_content["tab_order"]= ["t_addr"]; - + if (LanItems::type == "bond") wd_content["tab_order"]=add(wd_content["tab_order"]:[], "bond_slaves"); hw_standalone=false; wd = (map<string, map<string,any> >) union (wd, $[ @@ -1077,11 +1077,7 @@ } } - if (LanItems::type == "bond") - { - LanItems::bond_option = settings["BONDOPTION"]:""; - LanItems::bond_slaves = (list<string>)settings["SLAVES"]:[]; - } else if (LanItems::type == "vlan"){ + if (LanItems::type == "vlan"){ LanItems::vlan_etherdevice = settings["ETHERDEVICE"]:""; } else if (LanItems::type == "br"){ LanItems::bridge_ports = settings["BRIDGE_PORTS"]:""; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org