Author: gs Date: Thu Jun 30 13:27:26 2011 New Revision: 64648 URL: http://svn.opensuse.org/viewcvs/yast?rev=64648&view=rev Log: fill summary, add service_start to Import/Export map Modified: trunk/fcoe-client/src/FcoeClient.ycp Modified: trunk/fcoe-client/src/FcoeClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/FcoeClient.ycp?re... ============================================================================== --- trunk/fcoe-client/src/FcoeClient.ycp (original) +++ trunk/fcoe-client/src/FcoeClient.ycp Thu Jun 30 13:27:26 2011 @@ -207,8 +207,8 @@ } // map containing information about start of services at boot -map <string, boolean> service_start = $[ "fcoe":false, - "lldpad":false ]; +map <string, boolean> service_start = $[ "fcoe":true, + "lldpad":true ]; // map containing information about networks cards and VLAN, FCoE and DCB status list <map> network_interfaces = []; @@ -901,9 +901,10 @@ global boolean Import (map settings) { // fill variables - fcoe_general_config = (map <string, string>)settings["fcoe_cfg"]:$[ "DEBUG":"no", "USE_SYSLOG":"yes" ]; + fcoe_general_config = (map <string, string>)settings["fcoe_cfg"]:$[ ]; network_interfaces = (list <map>)settings["interfaces"]:[]; - + service_start = (map <string, boolean>)settings["service_start"]:$[ ]; + SetModified( true ); y2milestone ("Configuration has been imported"); @@ -920,7 +921,8 @@ // return map containing current settings return $[ "fcoe_cfg" : fcoe_general_config, - "interfaces" : network_interfaces + "interfaces" : network_interfaces, + "service_start" : service_start ]; } @@ -930,9 +932,33 @@ */ global list Summary() { - // TODO FIXME: your code here... + string summary = ""; + map fcoe_config = $[]; + list <map> netcards = []; + map service_start = $[]; + /* Configuration summary text for autoyast */ - return [ _("Configuration summary..."), [] ]; + summary = Summary::AddLine( summary, _("<b>General FCoE configuration</b>") ); + fcoe_config = FcoeClient::GetFcoeConfig(); + summary = Summary::AddLine( summary, sformat( "DEBUG: %1", fcoe_config["DEBUG"]:"" ) ); + summary = Summary::AddLine( summary, sformat( "USE SYSLOG: %1", fcoe_config["USE_SYSLOG"]:"" ) ); + summary = Summary::AddLine( summary, _("<b>Interfaces</b>") ); + netcards = FcoeClient::GetNetworkCards(); + foreach ( map card, netcards, { + summary = Summary::AddLine( summary, sformat( "%1: %2 %3: %4", + // network card, e.g. eth0 + _("<i>Netcard</i>:"), card["dev_name"]:"", + // nothing to translate here + "<i>FcoE VLAN</i>", card["fcoe_vlan"]:"") ); + + } ); + service_start = FcoeClient::GetStartStatus(); + summary = Summary::AddLine( summary, _("<b>Starting of services</b>") ); + summary = Summary::AddLine( summary, sformat( "fcoe: %1", (service_start["fcoe"]:false)?"true":"false" ) ); + summary = Summary::AddLine( summary, sformat( "lldpad: %1", (service_start["lldpad"]:false)?"true":"false" ) ); + + + return [ summary, [] ]; } /** -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org