Mailinglist Archive: yast-commit (288 mails)

< Previous Next >
[yast-commit] r64047 - in /branches/SuSE-Code-11-SP2-Branch/fcoe-client: VERSION package/yast2-fcoe-client.changes src/FcoeClient.ycp src/complex.ycp src/dialogs.ycp src/fcoe-client.desktop src/wizards.ycp
Author: gs
Date: Thu May 19 10:43:27 2011
New Revision: 64047

URL: http://svn.opensuse.org/viewcvs/yast?rev=64047&view=rev
Log:
Main parts of the FCoE configuration available
V 2.17.1

Modified:
branches/SuSE-Code-11-SP2-Branch/fcoe-client/VERSION

branches/SuSE-Code-11-SP2-Branch/fcoe-client/package/yast2-fcoe-client.changes
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/dialogs.ycp
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client.desktop
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/wizards.ycp

Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/VERSION?rev=64047&r1=64046&r2=64047&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/VERSION (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/VERSION Thu May 19 10:43:27
2011
@@ -1 +1 @@
-2.17.0
+2.17.1

Modified:
branches/SuSE-Code-11-SP2-Branch/fcoe-client/package/yast2-fcoe-client.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/package/yast2-fcoe-client.changes?rev=64047&r1=64046&r2=64047&view=diff
==============================================================================
---
branches/SuSE-Code-11-SP2-Branch/fcoe-client/package/yast2-fcoe-client.changes
(original)
+++
branches/SuSE-Code-11-SP2-Branch/fcoe-client/package/yast2-fcoe-client.changes
Thu May 19 10:43:27 2011
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu May 19 10:42:41 CEST 2011 - gs@xxxxxxx
+
+- Main parts of the FCoE configuration available
+ (implementation of feature #311802)
+- V 2.17.1
+
+-------------------------------------------------------------------
Thu May 12 11:27:02 CEST 2011 - gs@xxxxxxx

- initial version

Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp?rev=64047&r1=64046&r2=64047&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp Thu May 19
10:43:27 2011
@@ -125,6 +125,23 @@
AbortFunction = function;
}

+/**
+ * Checks whether an Abort button has been pressed.
+ * If so, calls function to confirm the abort call.
+ *
+ * @return boolean true if abort confirmed
+ */
+global boolean PollAbort() {
+ // Do not check UI when running in CommandLine mode
+ if (Mode::commandline())
+ return false;
+
+ if (UI::PollInput() == `abort)
+ return Abort();
+
+ return false;
+}
+
/*
from IscsiClientLib.ycp (line 53) - reading output

@@ -149,7 +166,7 @@
global string NOT_AVAILABLE = "not available";

// map containing information about networks cards and VLAN, FCoE and DCB
status
-map <integer, list> network_interfaces = $[];
+list <map> network_interfaces = [];

// map containing information about values in /etc/fcoe/config
map <string, string> fcoe_general_config = $[ "DEBUG":"no",
@@ -277,26 +294,29 @@
if ( content == "" || content == nil )
{
// remove '-fcoe' and try again
- y2milestone( "Reading %1", substring( file_name, 0,
size(file_name)-5 ) );
- content = (string)SCR::Read(.target.string, substring( file_name,
0, size(file_name)-5 ) );
+ file_name = substring( file_name, 0, size(file_name)-5 );
+ y2milestone( "Reading %1", file_name );
+ content = (string)SCR::Read(.target.string, file_name );
}
if ( content == "" || content == nil )
{
+ string create_file_name = sformat( "/etc/fcoe/cfg-%1",
vlan_device_name );
y2milestone( "Cannot read cfg-file creating %1 with default values
from /etc/fcoe/cfg-ethx",
- file_name );
+ create_file_name );
string def_values = (string)SCR::Read( .target.string,
"/etc/fcoe/cfg-ethx" );

- if ( def_values != "" )
+ if ( def_values != "" && def_values != nil )
{
- boolean ret = SCR::Write( .target.string, file_name, def_values
);
+ boolean ret = SCR::Write( .target.string, create_file_name,
def_values );
if ( ret == true )
{
status_map = add( status_map, "FCOE_ENABLE", "yes");
status_map = add( status_map, "DCB_REQUIRED", "yes");
+ status_map = add( status_map, "Filename", create_file_name
);
}
else
{
- y2error( "Cannot create %1", file_name );
+ y2error( "Cannot create %1", create_file_name );
}
}
else
@@ -322,6 +342,7 @@
status_map = add( status_map, "DCB_REQUIRED", deletechars(
substring( line, 13 ),"\"") );
}
});
+ status_map = add( status_map, "Filename", file_name );
}
else
{
@@ -424,6 +445,7 @@
{
// TODO - check whether loading any modules in Stage::initial() is required
// (like in IsciClientLib.ycp, line 469 )
+ // probably NOT -> see /etc/init.d/fcoe, line 85 (modprobe fcoe >
/dev/null 2>&1)
boolean ret = true;

if ( Service::Status( "fcoe" ) != 0 )
@@ -469,13 +491,12 @@
}

//
-// dev_name device FCoE VLAN DCB capable FCoE enable DCB
required VLAN data modified
-// eth3 Ethernet card ... eth3.200 yes/no yes/no yes/no
200 yes/no
-// 0 1 2 3 4 5
6 7
+// dev_name device fcoe_vlan dcb_capable fcoe_enable
dcb_required vlan_interface modified cfg_file
+// eth3 Ethernet card ... eth3.200 yes/no yes/no yes/no
200 yes/no /etc/fcoe/cfg-eth3.200
//
// Detect network interface cards (hardware probe) and get status
//
-void DetectNetworkCards()
+boolean DetectNetworkCards()
{
string vlan_interface = "";
string fcoe_vlan_interface = "";
@@ -483,10 +504,12 @@

list <map> netcards = (list<map>)SCR::Read(.probe.netcard);
y2milestone( "Detected netcards: %1", netcards );
- integer row = 0;
+
+ if ( netcards == [] || netcards == nil )
+ return false;

foreach ( map card, netcards, {
- list info_list = [];
+ map info_map = $[];
map <string, string> status_map = $[];

vlan_interface = GetVlanInterface( card["dev_name"]:"" );
@@ -510,37 +533,42 @@
fcoe_vlan_interface = NOT_CONFIGURED;
}
}
-
dcb_capable = DCBCapable( card["dev_name"]:"" );

- info_list = add( info_list, card["dev_name"]:""); // network
card, e.g. eth3
- info_list = add( info_list, card["device"]:""); // description
- info_list = add( info_list, fcoe_vlan_interface ); // FCoE VLAN
interface, e.g. eth3.200
- info_list = add( info_list, dcb_capable ); // DCB capable
- info_list = add( info_list, status_map["FCOE_ENABLE"]:"");
- info_list = add( info_list, status_map["DCB_REQUIRED"]:"");
- info_list = add( info_list, vlan_interface ); // VLAN
interface, e.g. 200
- info_list = add( info_list, "no" ); // data not modified
- network_interfaces = add( network_interfaces, row, info_list );
- row = row + 1;
+ info_map = add( info_map, "dev_name", card["dev_name"]:"");
// network card, e.g. eth3
+ info_map = add( info_map, "device", card["device"]:"");
// description
+ info_map = add( info_map, "fcoe_vlan", fcoe_vlan_interface );
// FCoE VLAN interface, e.g. eth3.200
+ info_map = add( info_map, "dcb_capable", dcb_capable );
// DCB capable
+ info_map = add( info_map, "fcoe_enable",
status_map["FCOE_ENABLE"]:""); // FCOE_ENABLE
+ info_map = add( info_map, "dcb_required",
status_map["DCB_REQUIRED"]:""); // DCB_REQUIRED
+ info_map = add( info_map, "vlan_interface", vlan_interface );
// VLAN interface, e.g. 200
+ info_map = add( info_map, "modified", "no" );
// data not modified
+ info_map = add( info_map, "cfg_file", status_map["Filename"]:"" );
// cfg file name, e.g. /etc/fcoe/cfg-eth3.200
+
+ network_interfaces = add( network_interfaces, info_map );
} );
+ // sort the list of interfaces (eth0, eth1, eth2...)
+ network_interfaces = sort( map a, map b, network_interfaces, {
+ return ( a["dev_name"]:"" < b["dev_name"]:"" );
+ } );
+ return true;
}

//
// Returns the map containing all detected interfaces including
// configuration status of VLAN, FCoE and DCB
//
-global map <integer, list> GetNetworkCards()
+global list <map> GetNetworkCards()
{
return network_interfaces;
}

-global list <string> GetCurrentNetworkCard()
+global map GetCurrentNetworkCard()
{
- return (list <string>)network_interfaces[ current_card ]:[];
+ return network_interfaces[current_card]:$[];
}

-global void SetNetworkCardsValue( integer row, list card )
+global void SetNetworkCardsValue( integer row, map card )
{
network_interfaces[row] = card;
}
@@ -548,23 +576,21 @@
//
// Read /etc/fcoe/config
//
-void ReadFcoeConfig()
+boolean ReadFcoeConfig()
{
list <string> options = (list<string>) SCR::Dir(.fcoe);
y2milestone( "List of options: %1", options );
- // TODO take values from list
- if ( options != [] )
- {
- string debug_val = (string)SCR::Read(add(.fcoe, "DEBUG"));
- fcoe_general_config = add( fcoe_general_config, "DEBUG", debug_val );
+
+ if ( options == [] || options == nil )
+ return false;
+
+ string debug_val = (string)SCR::Read(add(.fcoe, "DEBUG"));
+ fcoe_general_config = add( fcoe_general_config, "DEBUG", debug_val );

- string syslog_val = (string)SCR::Read(add(.fcoe, "USE_SYSLOG"));
- fcoe_general_config = add( fcoe_general_config, "USE_SYSLOG",
syslog_val );
- }
- else
- {
- y2error( "Cannot read /etc/fcoe/config" );
- }
+ string syslog_val = (string)SCR::Read(add(.fcoe, "USE_SYSLOG"));
+ fcoe_general_config = add( fcoe_general_config, "USE_SYSLOG", syslog_val );
+
+ return true;
}

//
@@ -618,6 +644,57 @@
return ret;
}

+boolean WriteCfgFiles()
+{
+ list <map> netcards = GetNetworkCards();
+ boolean success = true;
+
+ foreach ( map card, (list<map>)netcards, {
+ if ( card["modified"]:"no" == "yes" ) // data modified
+ {
+ string content = (string)SCR::Read( .target.string,
card["cfg_file"]:"" );
+ y2milestone( "Original content: %1", content );
+
+ list <string> lines = (list<string>)splitstring( content, "\n"
);
+ lines = maplist( string line, lines, {
+ if ( regexpmatch( line, "^FCOE_ENABLE" ) )
+ {
+ return sformat( "FCOE_ENABLE=\"%1\"",
card["fcoe_enable"]:"no" );
+ }
+ else if ( regexpmatch( line, "^DCB_REQUIRED" ) )
+ {
+ return sformat( "DCB_REQUIRED=\"%1\"",
card["dcb_required"]:"no" );
+ }
+ else
+ {
+ return line;
+ }
+ });
+ content = mergestring( lines, "\n" );
+ y2milestone( "Modified content: %1", content );
+
+ boolean ret = SCR::Write( .target.string, card["cfg_file"]:"",
content );
+ if ( !ret )
+ {
+ success = ret;
+ y2error( "Cannot write %1", card["cfg_file"]:"" );
+ }
+ else
+ {
+ y2milestone( "%1 written", card["cfg_file"]:"" );
+ }
+ }
+ } );
+
+ return success;
+}
+
+boolean RestartServiceFcoe()
+{
+ y2milestone( "Restarting fcoe");
+ return Service::Restart("fcoe");
+}
+
/**
* Read all fcoe-client settings
* @return true on success
@@ -662,7 +739,7 @@
// TODO - is this check needed here (like in IsciClient.ycp)
// if(!NetworkService::RunningNetworkPopup()) return false;

- if(Abort()) return false;
+ if(PollAbort()) return false;
Progress::NextStage();

// checking whether open-fcoe is installed (requires lldpad, ...)
@@ -673,7 +750,7 @@
sleep(sl);

// read current settings
- if(Abort()) return false;
+ if(PollAbort()) return false;
Progress::NextStage();

// check whether auto start of daemon fcoemon and lldpad is enabled or not
@@ -682,33 +759,33 @@
boolean start_status = ServiceStatus();

/* Error message */
- if(!start_status) Report::Error(_("Starting of services failed"));
+ if(!start_status) Report::Error(_("Starting of services failed."));
sleep(sl);

- if(Abort()) return false;
+ if(PollAbort()) return false;
Progress::NextStage();

- // detect netcards - TODO return value
- DetectNetworkCards();
+ // detect netcards
+ boolean success = DetectNetworkCards();

/* Error message */
- if(false) Report::Warning(_("Cannot detect devices."));
+ if( !success ) Report::Warning(_("Cannot detect devices."));
sleep(sl);

// read general FCoE settings
- if(Abort()) return false;
+ if(PollAbort()) return false;
Progress::NextStage();

// check daemon fcoemon and lldpad
- ReadFcoeConfig();
+ success = ReadFcoeConfig();

/* Error message */
- if(false) Report::Error(_("Checking for services failed"));
+ if( !success ) Report::Error(_("Cannot read /etc/fcoe/config."));
sleep(sl);

Progress::Finish();

- if(Abort()) return false;
+ if(PollAbort()) return false;
modified = false;

return true;
@@ -726,7 +803,7 @@
y2milestone( "Saving fcoe-client Configuration" );

// Set the number of stages
- integer steps = 2;
+ integer steps = 3;

integer sl = 500;

@@ -734,12 +811,16 @@
Progress::New(caption, " ", steps, [
/* Progress stage 1/2 */
_("Write the settings"),
- /* Progress stage 2/2 */
+ /* Progress stage 2/3 */
+ _("Restart FCoE service"),
+ /* Progress stage 3/3 */
_("Adjust start of services")
], [
/* Progress step 1/2 */
_("Writing the settings..."),
- /* Progress step 2/2 */
+ /* Progress step 2/3 */
+ _("Restarting FCoE service..."),
+ /* Progress sstep 3/3 */
_("Adjusting start of services..."),
/* Progress finished */
_("Finished")
@@ -750,26 +831,40 @@
y2milestone( "**** Progress still running: %1", is_running );

// write settings
- if(Abort()) return false;
+ if(PollAbort()) return false;
Progress::NextStage();

boolean success = WriteFcoeConfig();
-
/* Error message */
if( !success ) Report::Error (_("Cannot write settings to
/etc/fcoe/config."));
sleep(sl);

- // run SuSEconfig
- if(Abort()) return false;
+ success = WriteCfgFiles();
+ if( !success ) Report::Error (_("Cannot write settings for FCoE interfaces.
+For details see /var/log/YaST2/y2log") );
+
+ // restart fcoe to enable changes
+ if(PollAbort()) return false;
+ Progress::NextStage();
+
+ success = RestartServiceFcoe();
+ /* Error message */
+ if( !success ) Report::Error (_("/etc/init.d/fcoe restart failed."));
+ sleep(sl);
+
+ // adjust service start of lldpad and fcoe
+ if(PollAbort()) return false;
Progress::NextStage ();

+ // adjust start status of services lldpad and fcoe
AdjustStartStatus();

/* Error message */
+ /* TODO - SuSEConfig required ???? */
if(false) Report::Error (Message::SuSEConfigFailed());
sleep(sl);

- if(Abort()) return false;
+ if(PollAbort()) return false;

return true;
}

Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp?rev=64047&r1=64046&r2=64047&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp Thu May 19
10:43:27 2011
@@ -51,7 +51,30 @@
}

boolean ReallyAbort() {
- return !FcoeClient::Modified() || Popup::ReallyAbort(true);
+ if ( !FcoeClient::Modified() )
+ return true;
+
+ boolean abort = Popup::ReallyAbort(true);
+
+ if ( abort )
+ {
+ // check redo list
+ list redo_list = FcoeClient::GetRedoCommands();
+ if ( redo_list == [] )
+ {
+ y2milestone( "Nothing to redo");
+ }
+ else
+ {
+ foreach ( string command, (list<string>)redo_list, {
+ y2milestone( "Calling %1", command );
+ map output = (map)SCR::Execute( .target.bash_output,
command );
+ y2milestone( "Output: %1", output );
+
+ } );
+ }
+ }
+ return abort;
}

boolean PollAbort() {
@@ -64,7 +87,8 @@
*/
symbol ReadDialog() {
Wizard::RestoreHelp(HELPS["read"]:"");
- // FcoeClient::SetAbortFunction(PollAbort);
+ // TODO - check this - doesn't help to set it here but call PollAbort in
FcoeClient directly ???
+ //FcoeClient::SetAbortFunction(PollAbort);
if (!Confirm::MustBeRoot()) return `abort;
boolean ret = FcoeClient::Read();
return ret ? `next : `abort;
@@ -116,34 +140,19 @@
}

//
-// Get current network interface (netcard)
-//
-list GetCurrentNetcard()
-{
- list card = [];
-
- map <integer, list> netcards = FcoeClient::GetNetworkCards();
- integer row = (integer)UI::QueryWidget( `id(`interfaces), `CurrentItem );
- card = netcards[row]:[];
- y2milestone( "Current row: %1 card: %2", row, card );
-
- return card;
-}
-
-//
// Adjust buttons, means set 'Change Settings' and 'Create VLAN' sensitive or
insensitive
//
void AdjustButtons()
{
- list card = GetCurrentNetcard();
+ map card = FcoeClient::GetCurrentNetworkCard();

// check VLAN status
- if ( card[2]:"" == FcoeClient::NOT_CONFIGURED )
+ if ( card["fcoe_vlan"]:"" == FcoeClient::NOT_CONFIGURED )
{
UI::ChangeWidget( `id(`edit), `Enabled, false );
UI::ChangeWidget( `id(`create), `Enabled, true );
}
- else if ( card[2]:"" == FcoeClient::NOT_AVAILABLE )
+ else if ( card["fcoe_vlan"]:"" == FcoeClient::NOT_AVAILABLE )
{
UI::ChangeWidget( `id(`edit), `Enabled, false );
UI::ChangeWidget( `id(`create), `Enabled, false );
@@ -159,20 +168,23 @@
void InitInterfacesDialog (string id) {
y2milestone( "Init interfaces dialog" );
string vlan_interface = "";
+ integer row = 0;

- map <integer, list> netcards = FcoeClient::GetNetworkCards();
+ list <map> netcards = FcoeClient::GetNetworkCards();
y2milestone( "Got netcards: %1", netcards );

list <term> table_items = [];

- foreach ( integer row, list card, netcards, {
+ foreach ( map card, (list<map>)netcards, {
table_items = add( table_items,
- `item(`id(row), card[0]:"", card[1]:"",
card[2]:"",
- card[3]:"", card[4]:"", card[5]:"" )
+ `item(`id(row), card["dev_name"]:"",
card["device"]:"", card["fcoe_vlan"]:"",
+ card["dcb_capable"]:"",
card["fcoe_enable"]:"", card["dcb_required"]:"" )
);
+ row = row + 1;
});

UI::ChangeWidget( `id(`interfaces), `Items, table_items );
+ // set current item
UI::ChangeWidget( `id(`interfaces), `CurrentItem, `id(0) );
FcoeClient::current_card = 0;

@@ -208,12 +220,13 @@
void InitEditDialog( string id )
{
y2milestone( "Init edit dialog" );
- map <integer, list> cards = FcoeClient::GetNetworkCards();
- list card = cards[ FcoeClient::current_card ]:[];
+ list <map> cards = FcoeClient::GetNetworkCards();
+ map card = cards[FcoeClient::current_card]:$[];

// set values for 'FCoE Enabled' and 'DCB Required'
- UI::ChangeWidget( `id(`fcoe), `Value, card[4]:"" );
- UI::ChangeWidget( `id(`dcb), `Value, card[5]:"" );
+ UI::ChangeWidget( `id(`fcoe), `Value, card["fcoe_enable"]:"" );
+ UI::ChangeWidget( `id(`dcb), `Value, card["dcb_required"]:"" );
+ UI::ChangeWidget( `id(`heading), `Value, sformat( _("Configuration of
Interface %1"), card["fcoe_vlan"]:"" ) );
}

/**
@@ -243,12 +256,12 @@
}
else if ( action == `create )
{
- list card = (list)GetCurrentNetcard();
- string dev_name = card[0]:"";
+ map card = FcoeClient::GetCurrentNetworkCard();
+ string dev_name = card["dev_name"]:"";
boolean ret = Popup::YesNoHeadline( _("Creating and starting FCoE on
detected VLAN device"),
- sformat( _("Do you really want to
create a network
-interface on %1 for discovered FCoE VLAN interface
-and start the FCoE initiator?"), dev_name ) );
+ sformat( _("Do you really want to
create a FCoE network
+interface for discovered FCoE VLAN interface
+on %1 and start the FCoE initiator?"), dev_name ) );
if ( ret == true )
{
string vlan_interface = "";
@@ -264,14 +277,14 @@
if ( output["exit"]:255 == 0 )
{
// Get new status and exchange list (table) entry
- vlan_interface = FcoeClient::GetVlanInterface( card[0]:"" );
+ vlan_interface = FcoeClient::GetVlanInterface(
card["dev_name"]:"" );
if ( vlan_interface == "" )
{
fcoe_vlan_interface = FcoeClient::NOT_AVAILABLE;
}
else
{
- fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface(
card[0]:"", vlan_interface );
+ fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface(
card["dev_name"]:"", vlan_interface );

if ( fcoe_vlan_interface != "" )
status_map = FcoeClient::GetFCoEStatus(
fcoe_vlan_interface );
@@ -280,9 +293,13 @@
}
y2milestone( "FCoE VLAN interface: %1", fcoe_vlan_interface );

// set new value in global map network_interfaces
- card[2] = fcoe_vlan_interface;
- card[4] = status_map["FCOE_ENABLE"]:"";
- card[5] = status_map["DCB_REQUIRED"]:"";
+ card["fcoe_vlan"] = fcoe_vlan_interface;
+ card["fcoe_enable"] = status_map["FCOE_ENABLE"]:"";
+ card["dcb_required"] = status_map["DCB_REQUIRED"]:"";
+ card["cfg_file"] = status_map["Filename"]:"";
+ card["modified"] = "yes";
+ FcoeClient::SetModified( true );
+
FcoeClient::SetNetworkCardsValue( FcoeClient::current_card,
card );
y2milestone( "Current network interfaces: %1",
FcoeClient::GetNetworkCards() );

@@ -339,7 +356,7 @@
y2milestone( "Setting auto start of FCoE to true");
}

- boolean lldpad_auto = (boolean)UI::QueryWidget( `id
("llpad_startup_auto"), `Value );
+ boolean lldpad_auto = (boolean)UI::QueryWidget( `id
("lldpad_startup_auto"), `Value );

if ( lldpad_auto )
{
@@ -360,27 +377,32 @@
string syslog_val = (string)UI::QueryWidget( `id("syslog"), `Value );
FcoeClient::SetFcoeConfigValue( "DEBUG", debug_val );
FcoeClient::SetFcoeConfigValue( "USE_SYSLOG", syslog_val );
+
+ FcoeClient::SetModified( true );
}

void StoreEditDialog (string id, map event)
{
y2milestone( "Store edit dialog" );
- string modified = "no";

- list <string> card = FcoeClient::GetCurrentNetworkCard();
+ map card = FcoeClient::GetCurrentNetworkCard();
+
string fcoe_enabled = (string)UI::QueryWidget( `id(`fcoe), `Value );
- if ( card[4]:"" != fcoe_enabled )
+ if ( card["fcoe_enable"]:"" != fcoe_enabled )
{
- card[4] = fcoe_enabled;
- modified = "yes";
+ card["fcoe_enable"] = fcoe_enabled;
+ card["modified"] = "yes"; // set modified to "yes"
+ FcoeClient::SetModified( true );
}
+
string dcb_required = (string)UI::QueryWidget( `id(`dcb), `Value );
- if ( card[5]:"" != dcb_required )
+ if ( card["dcb_required"]:"" != dcb_required )
{
- card[5] = dcb_required;
- modified = "yes";
+ card["dcb_required"] = dcb_required;
+ card["modified"] = "yes"; // set modified to "yes"
+ FcoeClient::SetModified( true );
}
- card[7] = modified;
+
FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card );

y2milestone( "Current data: %1", FcoeClient::GetNetworkCards() );

Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/dialogs.ycp?rev=64047&r1=64046&r2=64047&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/dialogs.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/dialogs.ycp Thu May 19
10:43:27 2011
@@ -63,24 +63,27 @@
{
return `VBox(
`VStretch(),
- `HBox(
- `HStretch(),
- `HSpacing (1),
- `VBox(
- `ComboBox( `id(`fcoe), _("FCoE Enable"),
- [`item(`id("yes"), "yes" ),
- `item(`id("no"), "no", true ) ]
- ),
- `VSpacing (2),
- `ComboBox( `id(`dcb), _("DCB Required"),
- [`item(`id("yes"), "yes" ),
- `item(`id("no"), "no", true ) ]
- ),
- `VSpacing (2)
- ),
- `HSpacing (1),
- `HStretch()
- ),
+ // heading is replaced later (InitEditDialog)
+ `Label( `id(`heading), ("Configuration of Interface
...................") ),
+ `HBox (
+ `HStretch(),
+ `Frame( (""),
+ `VBox(
+ `VSpacing(2),
+ `ComboBox( `id(`fcoe), _("FCoE Enable"),
+ [`item(`id("yes"), "yes" ),
+ `item(`id("no"), "no", true )
]
+ ),
+ `VSpacing (2),
+ `ComboBox( `id(`dcb), _("DCB Required"),
+ [`item(`id("yes"), "yes" ),
+ `item(`id("no"), "no", true )
]
+ ),
+ `VSpacing (2)
+ )
+ ),
+ `HStretch()
+ ),
`VStretch()
);
}
@@ -101,7 +104,7 @@
),
`VStretch(),
`Frame (_("Lldpad Service Start"),
- `VBox (`RadioButtonGroup (`id
("lldpadservice_startup"), items_lldpad))
+ `VBox (`RadioButtonGroup (`id
("lldpad_service_startup"), items_lldpad))
),
`VStretch()
)
@@ -115,7 +118,7 @@
term InterfacesDialogContent () {
return `MarginBox( mbox_x, mbox_y,
`VBox(
- `Table(`id(`interfaces), `opt(`notify, `immediate
),
+ `Table(`id(`interfaces), `opt(`notify, `immediate,
`keepSorting ),
`header(_("Device Name"), _("Model"),
_("FCoE VLAN Interface"), _("DCB capable"),
_("FCoE Enable"), _("DCB
Required")),
[]

Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client.desktop
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client.desktop?rev=64047&r1=64046&r2=64047&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client.desktop
(original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client.desktop Thu
May 19 10:43:27 2011
@@ -8,7 +8,7 @@
X-KDE-Library=yast2
X-SuSE-YaST-Call=fcoe-client

-X-SuSE-YaST-Group=Misc
+X-SuSE-YaST-Group=Net_advanced
X-SuSE-YaST-Argument=
X-SuSE-YaST-RootOnly=true
X-SuSE-YaST-AutoInst=
@@ -19,7 +19,7 @@
Icon=yast-fcoe-client
Exec=/sbin/yast2 fcoe-client

-Name=FcoeClient
-GenericName=fcoe-client
+Name=FCoE Client Configuration
+GenericName=Fibre Channel over Ethernet Configuration
X-KDE-SubstituteUID=true
StartupNotify=true

Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/wizards.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/wizards.ycp?rev=64047&r1=64046&r2=64047&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/wizards.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/wizards.ycp Thu May 19
10:43:27 2011
@@ -132,8 +132,8 @@
Label::FinishButton()
);
Wizard::DisableBackButton ();
- // TODO: provide icon
- // Wizard::SetTitleIcon("yast-fcoe-client");
+ // TODO: rename icon to yast2-fcoe-client (yast2-theme package)
+ Wizard::SetTitleIcon("fcoe");

return CWM::Run (w, $[`abort : ReallyAbort]);
}

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages