Author: mzugec
Date: Thu Dec 23 00:46:00 2010
New Revision: 63027
URL: http://svn.opensuse.org/viewcvs/yast?rev=63027&view=rev
Log:
ifcfg-ethX.Y style config files for VLAN(fate#309240)
Modified:
branches/SuSE-Code-11-SP1-Branch/network/VERSION
branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes
branches/SuSE-Code-11-SP1-Branch/network/src/lan/address.ycp
branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/VERSION?rev=63027&r1=63026&r2=63027&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/VERSION (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/VERSION Thu Dec 23 00:46:00 2010
@@ -1 +1 @@
-2.17.151
+2.17.152
Modified: branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes?rev=63027&r1=63026&r2=63027&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes Thu Dec 23 00:46:00 2010
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Dec 23 00:44:01 CET 2010 - mzugec@suse.de
+
+- ifcfg-ethX.Y style config files for VLAN(fate#309240)
+- 2.17.152
+
+-------------------------------------------------------------------
Fri Dec 17 10:05:06 CET 2010 - mzugec@suse.de
- L3: don't propose bridge for vbox (bnc#648044)
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/lan/address.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/lan/address.ycp?rev=63027&r1=63026&r2=63027&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/lan/address.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/lan/address.ycp Thu Dec 23 00:46:00 2010
@@ -124,6 +124,7 @@
void InitVLANSlave(string key)
{
settings["ETHERDEVICE"] = NetworkInterfaces::Current["ETHERDEVICE"]:"";
+ settings["VLAN_ID"] = tointeger(NetworkInterfaces::Current["VLAN_ID"]:"0");
list items = [];
map configurations = NetworkInterfaces::FilterDevices("netcard");
@@ -143,7 +144,8 @@
*/
void StoreVLANSlave(string key, map event)
{
- settings["ETHERDEVICE"] = (string)UI::QueryWidget (`id(key), `Value);
+ settings["ETHERDEVICE"] = (string)UI::QueryWidget (`id(`vlan_eth), `Value);
+ settings["VLAN_ID"] = UI::QueryWidget (`id(`vlan_id), `Value);
}
@@ -634,11 +636,15 @@
"help": help["bridge_ports"]:"",
],
"ETHERDEVICE": $[
- "widget": `combobox,
- "label": _("Real Interface for &VLAN"),
- "items" : [ ],
+ "widget": `custom,
+ "custom_widget":
+ `HBox(
+ `ComboBox(`id(`vlan_eth), `opt(`notify), _("Real Interface for &VLAN"), []),
+ `IntField(`id(`vlan_id), `opt(`notify), _("VLAN id"), 0, 9999, 0)
+ ),
"opt": [`hstretch],
"init": InitVLANSlave,
+ "handle": HandleVLANSlave,
"store": StoreVLANSlave,
"help": help["etherdevice"]:"",
],
@@ -877,7 +883,7 @@
// interface types. It will work in some cases, like
// overriding eth to wlan but not in others where we would
// need to change the contents of the dialog. #30890.
- "IFCFGTYPE",
+ LanItems::type!="vlan" ? "IFCFGTYPE" : `Empty(),
`HSpacing(1.5),
`MinWidth(30, "IFCFGID"),
`HSpacing(0.5),
@@ -1120,6 +1126,9 @@
if (LanItems::type == "vlan"){
LanItems::vlan_etherdevice = settings["ETHERDEVICE"]:"";
+y2internal("%1, %2", LanItems::vlan_id, (integer)settings["VLAN_ID"]:0);
+ LanItems::vlan_id = tostring((integer)settings["VLAN_ID"]:0);
+y2internal("%1", LanItems::vlan_id);
} else if (LanItems::type == "br"){
LanItems::bridge_ports = settings["BRIDGE_PORTS"]:"";
} else if (contains(["tun", "tap"], LanItems::type)){
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp?rev=63027&r1=63026&r2=63027&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp Thu Dec 23 00:46:00 2010
@@ -84,6 +84,7 @@
// VLAN option
global string vlan_etherdevice="";
+global string vlan_id="";
// interfaces attached to bridge (list delimited by ' ')
global string bridge_ports="";
@@ -828,6 +829,7 @@
usercontrol = GetDeviceVar (devmap, defaults, "USERCONTROL") == "yes";
description = GetDeviceVar (devmap, defaults, "NAME");
bond_option = GetDeviceVar(devmap, defaults, "BONDING_MODULE_OPTS");
+ vlan_id = GetDeviceVar(devmap, defaults, "VLAN_ID");
bond_slaves=[];
foreach(any key, any value, devmap,
@@ -1138,6 +1140,7 @@
if (type=="vlan"){
newdev["ETHERDEVICE"]=vlan_etherdevice;
+ newdev["VLAN_ID"]=vlan_id;
}
if (type=="br"){
newdev["BRIDGE_PORTS"]=bridge_ports;
@@ -1211,6 +1214,7 @@
}
NetworkInterfaces::Name = Items[current, "ifcfg"]:"";
NetworkInterfaces::Current = newdev;
+y2internal("%1", newdev);
if (!NetworkInterfaces::Commit()) Items[current, "ifcfg"]="";
}
else {
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org