Author: gs
Date: Tue May 31 12:23:11 2011
New Revision: 64164
URL: http://svn.opensuse.org/viewcvs/yast?rev=64164&view=rev
Log:
only start FCoE in installed system,
inst_fcoe-client.ycp and fcoe-client_finish.ycp added
Modified:
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/inst_fcoe-client.ycp
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/wizards.ycp
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=64164&r1=64163&r2=64164&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 Tue May 31 12:23:11 2011
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Tue May 31 12:21:30 CEST 2011 - gs@suse.de
+
+- Create VLAN interface and start FCoE during installation, only
+ start FCoE in installed system (if VLAN interface exists)
+- 'DCB capable' is last column in table of interfaces
+- inst_fcoe-client.ycp and fcoe-client_finish.ycp added (needed
+ for installation workflow)
+- V 2.17.2
+
+-------------------------------------------------------------------
Thu May 19 10:42:41 CEST 2011 - gs@suse.de
- Main parts of the FCoE configuration are available
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=64164&r1=64163&r2=64164&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 Tue May 31 12:23:11 2011
@@ -272,8 +272,11 @@
y2milestone( "Output: %1", output );
// read stdout (remove \n and white spaces)
vlan_device_name = deletechars( output["stdout"]:"", " \n\t" );
-
- y2milestone( "Returning: %1", vlan_device_name );
+
+ if ( vlan_device_name != "" )
+ {
+ y2milestone( "Returning: %1", vlan_device_name );
+ }
return vlan_device_name;
}
@@ -287,36 +290,30 @@
if ( vlan_device_name != "")
{
+ // fcoemon reads values from /etc/fcoe/cfg-<vlan-interface>
string file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name );
y2milestone( "VLAN channel %1 found, reading %2", vlan_device_name, file_name );
content = (string)SCR::Read(.target.string, file_name);
if ( content == "" || content == nil )
{
- // remove '-fcoe' and try again
- 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",
- create_file_name );
+ file_name );
string def_values = (string)SCR::Read( .target.string, "/etc/fcoe/cfg-ethx" );
if ( def_values != "" && def_values != nil )
{
- boolean ret = SCR::Write( .target.string, create_file_name, def_values );
+ boolean ret = SCR::Write( .target.string, 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 );
+ status_map = add( status_map, "Filename", file_name );
+ status_map = add( status_map, "Created", "yes" );
}
else
{
- y2error( "Cannot create %1", create_file_name );
+ y2error( "Cannot create %1", file_name );
}
}
else
@@ -331,7 +328,7 @@
}
list <string> lines = splitstring( content, "\n" );
- // TODO: better/more elegant way of reading values (use SysConfig agent?)
+
foreach( string line, (list<string>)lines, {
if ( regexpmatch( line, "^FCOE_ENABLE" ) )
{
@@ -427,13 +424,12 @@
boolean status = false;
status = Service::Enabled( "fcoe" );
- y2milestone( "Status of fcoe: %1", status );
+ y2milestone( "Start status of fcoe: %1", status );
service_start = add( service_start, "fcoe", status );
status = Service::Enabled( "lldpad" );
- y2milestone( "Status of lldpad: %1", status );
+ y2milestone( "Start status of lldpad: %1", status );
service_start = add( service_start, "lldpad", status );
-
}
global map GetStartStatus()
@@ -444,7 +440,7 @@
global boolean ServiceStatus()
{
// TODO - check whether loading any modules in Stage::initial() is required
- // (like in IsciClientLib.ycp, line 469 )
+ // (like in IsciClientLib.ycp, line 523 )
// probably NOT -> see /etc/init.d/fcoe, line 85 (modprobe fcoe > /dev/null 2>&1)
boolean ret = true;
@@ -491,12 +487,12 @@
}
//
-// dev_name device fcoe_vlan dcb_capable fcoe_enable dcb_required vlan_interface modified cfg_file
+// dev_name device fcoe_vlan fcoe_enable dcb_required dcb_capable 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
//
-boolean DetectNetworkCards()
+global boolean DetectNetworkCards()
{
string vlan_interface = "";
string fcoe_vlan_interface = "";
@@ -517,6 +513,9 @@
if ( vlan_interface == "" )
{
// FCoE isn't enabled on the switch - we can't do anything here
+ // TODO - check link map from .probe.network and distinguish between
+ // no cable attached and interface not up, Steffen: cannot be used, "no"
+ // can stand for 'noe cable' or 'not up'
fcoe_vlan_interface = NOT_AVAILABLE;
}
else
@@ -538,11 +537,11 @@
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, "dcb_capable", dcb_capable ); // DCB capable
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, "modified", status_map["Created"]:"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 );
@@ -576,7 +575,7 @@
//
// Read /etc/fcoe/config
//
-boolean ReadFcoeConfig()
+global boolean ReadFcoeConfig()
{
list <string> options = (list<string>) SCR::Dir(.fcoe);
y2milestone( "List of options: %1", options );
@@ -626,7 +625,7 @@
return redo_list;
}
-boolean WriteFcoeConfig()
+global boolean WriteFcoeConfig()
{
boolean ret = true;
@@ -644,7 +643,7 @@
return ret;
}
-boolean WriteCfgFiles()
+global boolean WriteCfgFiles()
{
list <map> netcards = GetNetworkCards();
boolean success = true;
@@ -689,10 +688,15 @@
return success;
}
-boolean RestartServiceFcoe()
+global boolean RestartServiceFcoe()
{
- y2milestone( "Restarting fcoe");
- return Service::Restart("fcoe");
+ boolean ret = true;
+ if ( FcoeClient::Modified() )
+ {
+ y2milestone( "Restarting fcoe");
+ ret = Service::Restart("fcoe");
+ }
+ return ret;
}
/**
@@ -772,11 +776,10 @@
if( !success ) Report::Warning(_("Cannot detect devices."));
sleep(sl);
- // read general FCoE settings
if(PollAbort()) return false;
Progress::NextStage();
- // check daemon fcoemon and lldpad
+ // read general FCoE settings
success = ReadFcoeConfig();
/* Error message */
@@ -827,6 +830,10 @@
],
""
);
+ // TODO things to do in case of Mode::autoinst()/autoupgrade() ???
+ // see IscsiClient.ycp, line 236, 241
+
+ // TODO is_running - used or obsolete ???
boolean is_running = Progress::IsRunning();
y2milestone( "**** Progress still running: %1", is_running );
@@ -858,10 +865,8 @@
// adjust start status of services lldpad and fcoe
AdjustStartStatus();
-
- /* Error message */
- /* TODO - SuSEConfig required ???? */
- if(false) Report::Error (Message::SuSEConfigFailed());
+
+ // TODO - add additional package ??? like in IscsiClient.ycp, line 257
sleep(sl);
if(PollAbort()) return false;
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=64164&r1=64163&r2=64164&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 Tue May 31 12:23:11 2011
@@ -37,19 +37,17 @@
import "Confirm";
import "FcoeClient";
import "Service";
-
+import "Stage";
+import "FileUtils";
include "fcoe-client/helps.ycp";
include "fcoe-client/dialogs.ycp";
/**
- * Return a modification status
- * @return true if data was modified
+ * Show a popup on abort if data are modified and
+ * check redo list/execute redo commands.
+ * @return true if users aborts installation
*/
-boolean Modified() {
- return FcoeClient::Modified();
-}
-
boolean ReallyAbort() {
if ( !FcoeClient::Modified() )
return true;
@@ -77,18 +75,13 @@
return abort;
}
-boolean PollAbort() {
- return UI::PollInput() == `abort;
-}
-
/**
* Read settings dialog
* @return `abort if aborted and `next otherwise
*/
symbol ReadDialog() {
Wizard::RestoreHelp(HELPS["read"]:"");
- // 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;
@@ -101,7 +94,7 @@
symbol WriteDialog() {
Wizard::RestoreHelp(HELPS["write"]:"");
y2milestone( "Writing configuration" );
- // FcoeClient::SetAbortFunction(PollAbort);
+
boolean ret = FcoeClient::Write();
return ret ? `next : `abort;
}
@@ -178,7 +171,7 @@
foreach ( map card, (list<map>)netcards, {
table_items = add( table_items,
`item(`id(row), card["dev_name"]:"", card["device"]:"", card["fcoe_vlan"]:"",
- card["dcb_capable"]:"", card["fcoe_enable"]:"", card["dcb_required"]:"" )
+ card["fcoe_enable"]:"", card["dcb_required"]:"", card["dcb_capable"]:"" )
);
row = row + 1;
});
@@ -240,93 +233,170 @@
symbol HandleInterfacesDialog( string id, map event )
{
- any action = event["ID"]:nil;
-
- y2milestone( "Event: %1", event );
+ any action = event["ID"]:nil;
+
+ y2milestone( "Event: %1", event );
- if ( action == `edit )
- {
- y2milestone( "Action: %1, returning %1", action);
- return `edit;
- }
- else if ( action == `interfaces )
- {
- FcoeClient::current_card = (integer)UI::QueryWidget( `id(`interfaces), `CurrentItem );
- AdjustButtons();
- }
- else if ( action == `create )
- {
- 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 FCoE network
+ if ( action == `edit )
+ {
+ y2milestone( "Action: %1, returning %1", action);
+ return `edit;
+ }
+ else if ( action == `interfaces )
+ {
+ FcoeClient::current_card = (integer)UI::QueryWidget( `id(`interfaces), `CurrentItem );
+ AdjustButtons();
+ }
+ else if ( action == `create )
+ {
+ map card = FcoeClient::GetCurrentNetworkCard();
+ string dev_name = card["dev_name"]:"";
+
+ string command = "";
+ map output = $[];
+ string vlan_interface = "";
+ string fcoe_vlan_interface = "";
+ map status_map = $[];
+ boolean create_ifcfg = false;
+ string ifcfg_file = "";
+
+ if ( Stage::initial() ) // first stage - create and start FCoE VLAN interface
+ {
+ // headline of a popup: creating and starting Fibre Channel over Ethernet
+ boolean ret = Popup::YesNoHeadline( _("Creating and starting FCoE on detected VLAN device"),
+ // question to the user: really create and start FCoE
+ 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 = "";
- string fcoe_vlan_interface = "";
- map status_map = $[];
- // create and start FCoE with 'fipvlan -c -s eth3'
- // revert this (in case of 'Abort') with 'vconfig rem eth3.200'
- string command = sformat( "fipvlan -c -s %1", dev_name );
- y2milestone( "Executing command: %1", command );
- map output = (map)SCR::Execute( .target.bash_output, command );
- y2milestone( "Output: %1", output );
-
- if ( output["exit"]:255 == 0 )
- {
- // Get new status and exchange list (table) entry
- vlan_interface = FcoeClient::GetVlanInterface( card["dev_name"]:"" );
- if ( vlan_interface == "" )
- {
- fcoe_vlan_interface = FcoeClient::NOT_AVAILABLE;
- }
- else
- {
- fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", vlan_interface );
-
- if ( fcoe_vlan_interface != "" )
- status_map = FcoeClient::GetFCoEStatus( fcoe_vlan_interface );
- else
- fcoe_vlan_interface = FcoeClient::NOT_CONFIGURED;
- }
- y2milestone( "FCoE VLAN interface: %1", fcoe_vlan_interface );
- // set new value in global map network_interfaces
- 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() );
-
- // replace value in table
- UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), fcoe_vlan_interface );
- UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), status_map["FCOE_ENABLE"]:"" );
- UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), status_map["DCB_REQUIRED"]:"" );
- AdjustButtons();
- if ( fcoe_vlan_interface != "" )
- {
- // store command to be able to redo the creation of FCoE VLAN interface
- // in case of abort
- FcoeClient::AddRedoCommand( sformat("vconfig rem %1", fcoe_vlan_interface ) );
- }
- }
- else
- {
- Popup::Error( sformat( _("Cannot create and start FCoE on %1"), dev_name ) );
- }
- }
- else
- {
- y2milestone( "Creating VLAN interface canceled" );
- }
- }
+ if ( ret == true )
+ {
+ // create and start FCoE e.g. with 'fipvlan -c -s eth3'
+ // revert this (in case of 'Abort') with 'vconfig rem eth3.200'
+ command = sformat( "fipvlan -c -s %1", dev_name );
+ y2milestone( "Executing command: %1", command );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
+
+ if ( output["exit"]:255 != 0 )
+ {
+ // text of an error popup
+ Popup::Error( sformat( _("Cannot create and start FCoE on %1"), dev_name ) );
+ return nil;
+ }
+ }
+ else
+ {
+ y2milestone( "Creating FCoE VLAN interface canceled" );
+ return nil;
+ }
+ }
+ else // installed system - if VLAN already exists only start FCoE
+ {
+ // headline of a popup: starting Fibre Channel over Ethernet
+ boolean ret = Popup::YesNoHeadline( _("Starting FCoE on detected VLAN device"),
+ // question to the user: really start FCoE
+ sformat( _("Do you really want to start FCoE initiator
+on discovered FCoE VLAN interface on %1?"), dev_name ) );
+ if ( ret == true )
+ {
+ ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1\.%2", dev_name, card["vlan_interface"]:"" );
+
+ // if /etc/sysconfig/network/ifcfg-<vlan-interface> already exists
+ // call 'ifup' for the interface (creates /proc/net/vlan/<vlan-interface>)
+ if ( FileUtils::Exists( ifcfg_file ) )
+ {
+ command = sformat( "ifup %1\.%2", dev_name, card["vlan_interface"]:"" );
+ y2milestone( "Executing command: %1", command );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
- return nil;
+ if ( output["exit"]:255 == 0 )
+ {
+ // start FCoE
+ command = sformat( "fipvlan -s %1", dev_name );
+ }
+ else
+ {
+ command = sformat( "fipvlan -c -s %1", dev_name ); // create and start FCoE
+ create_ifcfg = true;
+ }
+ }
+ else
+ {
+ command = sformat( "fipvlan -c -s %1", dev_name );
+ create_ifcfg = true;
+ }
+
+ y2milestone( "Executing command: %1", command );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
+ if ( output["exit"]:255 != 0 )
+ {
+ // text of an error popup: command failed on the network interface
+ Popup::Error( sformat( _("Command \"%1\" on %2 failed."), command, dev_name ) );
+ return nil;
+ }
+ }
+ else
+ {
+ y2milestone( "Starting FCoE canceled" );
+ return nil;
+ }
+ }
+
+ // Get new status and exchange list (table) entry
+ vlan_interface = FcoeClient::GetVlanInterface( card["dev_name"]:"" );
+ if ( vlan_interface == "" )
+ {
+ fcoe_vlan_interface = FcoeClient::NOT_AVAILABLE;
+ }
+ else
+ {
+ fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", vlan_interface );
+
+ if ( fcoe_vlan_interface != "" )
+ {
+ y2milestone( "FCoE VLAN interface %1 created/started", fcoe_vlan_interface );
+ status_map = FcoeClient::GetFCoEStatus( fcoe_vlan_interface );
+
+ // store command to be able to redo the creation of FCoE VLAN interface in case of abort
+ // TODO: is this also OK if only 'fipvlan -s <interface>' is called?
+ FcoeClient::AddRedoCommand( sformat("vconfig rem %1", fcoe_vlan_interface ) );
+ if ( create_ifcfg )
+ {
+ string config = sformat( "BOOTPROTO=\"static\"\nSTARTMODE=\"onboot\"
+ETHERDEVICE=\"%1\"\nUSERCONTROL=\"no\"\nINTERFACETYPE=\"vlan\"\n", dev_name );
+ ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1", fcoe_vlan_interface );
+ SCR::Write(.target.string, ifcfg_file, config);
+ y2milestone( "Writing config: %1 to %2", config, ifcfg_file );
+ FcoeClient::AddRedoCommand( sformat( "rm %1", ifcfg_file ) );
+ }
+ }
+ else
+ {
+ fcoe_vlan_interface = FcoeClient::NOT_CONFIGURED;
+ }
+ }
+
+ // set new values in global map network_interfaces
+ 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() );
+
+ // replace values in table
+ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), fcoe_vlan_interface );
+ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 3), status_map["FCOE_ENABLE"]:"" );
+ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), status_map["DCB_REQUIRED"]:"" );
+ AdjustButtons();
+ }
+
+ return nil;
}
symbol HandleConfigurationDialog( string id, map event )
@@ -373,12 +443,22 @@
void StoreConfigurationDialog (string id, map event)
{
y2milestone( "Store configuration dialog" );
+
+ map config = FcoeClient::GetFcoeConfig();
+
string debug_val = (string)UI::QueryWidget( `id("debug"), `Value );
+ if ( config["DEBUG"]:"" != debug_val)
+ {
+ FcoeClient::SetFcoeConfigValue( "DEBUG", debug_val );
+ FcoeClient::SetModified( true );
+ }
string syslog_val = (string)UI::QueryWidget( `id("syslog"), `Value );
- FcoeClient::SetFcoeConfigValue( "DEBUG", debug_val );
- FcoeClient::SetFcoeConfigValue( "USE_SYSLOG", syslog_val );
- FcoeClient::SetModified( true );
+ if ( config["USE_SYSLOG"]:"" != syslog_val )
+ {
+ FcoeClient::SetFcoeConfigValue( "USE_SYSLOG", syslog_val );
+ FcoeClient::SetModified( true );
+ }
}
void StoreEditDialog (string id, map event)
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=64164&r1=64163&r2=64164&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 Tue May 31 12:23:11 2011
@@ -119,8 +119,8 @@
return `MarginBox( mbox_x, mbox_y,
`VBox(
`Table(`id(`interfaces), `opt(`notify, `immediate, `keepSorting ),
- `header(_("Device Name"), _("Model"), _("FCoE VLAN Interface"), _("DCB capable"),
- _("FCoE Enable"), _("DCB Required")),
+ `header(_("Device Name"), _("Model"), _("FCoE VLAN Interface"),
+ _("FCoE Enable"), _("DCB Required"), _("DCB capable") ),
[]
),
`Left(`HBox( `PushButton(`id(`edit), _("Change &Settings") ),
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=64164&r1=64163&r2=64164&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 Tue May 31 12:23:11 2011
@@ -16,7 +16,7 @@
X-SuSE-YaST-SortKey=
X-SuSE-YaST-AutoInstResource=fcoe-client
-Icon=yast-fcoe-client
+Icon=fcoe
Exec=/sbin/yast2 fcoe-client
Name=FCoE Client Configuration
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/inst_fcoe-client.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/inst_fcoe-client.ycp?rev=64164&r1=64163&r2=64164&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/inst_fcoe-client.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/inst_fcoe-client.ycp Tue May 31 12:23:11 2011
@@ -27,30 +27,74 @@
import "Packages";
import "Installation";
import "String";
+import "FcoeClient";
+import "NetworkService";
+
include "fcoe-client/wizards.ycp";
/* main ui function */
any ret = nil;
+boolean success = false;
y2milestone("fcoe-client module started during installation");
-// TODO: check what is needed here
-// - create directories (included in open-fcoe?)
-// - load any modules ?
-// - start fcoemon (started in FcoeClient::ServiceStatus())
+// create /etc/fcoe
+SCR::Execute(.target.bash, "mkdir -p /etc/fcoe" );
+
-//SCR::Execute(.target.bash, "mkdir -p /etc/iscsi; touch /etc/iscsi/initiatorname.iscsi; ln -s /etc/iscsi/initiatorname.iscsi /etc/initiatorname.iscsi");
-// ModuleLoading::Load("iscsi_tcp", "", "", "", false, true);
-// start iscsid daemon
-// IscsiClientLib::startIScsid();
-// IscsiClientLib::autoLogOn();
+// TODO: check what is additional needed
+// - load any modules ?
+//
+// FcoeClient::CheckInstalledPackages() not needed in inst-sys
+// FcoeClient::DetectStartStatus() doesn't make sense in inst-sys
+
+// TODO: check for running network - makes sense here ???
+if( !NetworkService::RunningNetworkPopup() )
+{
+ y2error( "Network NOT set up" );
+ return nil;
+}
+
+// start services fcoe and lldpad
+success = FcoeClient::ServiceStatus();
+if ( !success )
+{
+ y2error( "Starting of services FAILED" );
+ return nil;
+}
+
+// detect netcards
+success = FcoeClient::DetectNetworkCards();
+if ( !success )
+{
+ y2error( "Detecting netcards FAILED" );
+ return nil;
+}
+
+// read general FCoE settings
+success = FcoeClient::ReadFcoeConfig();
+if ( !success )
+{
+ y2error( "Reading /etc/fcoe/config FAILED" );
+ return nil;
+}
// run dialog
ret = MainSequence();
-y2debug("MainSequence ret=%1", ret);
-// add package open-iscsi to installed system
+y2milestone("MainSequence ret=%1", ret);
+
+// add package open-fcoe to installed system
Packages::addAdditionalPackage("open-fcoe");
+// workflow not aborted
+if ( ret == `next )
+{
+ // write changes to config files
+ FcoeClient::WriteFcoeConfig();
+ FcoeClient::WriteCfgFiles();
+ FcoeClient::RestartServiceFcoe();
+}
+
/* Finish */
y2milestone("fcoe-client module finished");
y2milestone("----------------------------------------");
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=64164&r1=64163&r2=64164&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 Tue May 31 12:23:11 2011
@@ -194,7 +194,7 @@
Wizard::CreateDialog();
any ret = Sequencer::Run(aliases, sequence);
-
+ y2milestone( "**** RETURN of MainSequence ****: %1", ret );
UI::CloseDialog();
return ret;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org