[yast-commit] r63900 - in /trunk/fcoe-client/src: FcoeClient.ycp complex.ycp dialogs.ycp
Author: gs Date: Wed May 4 13:43:22 2011 New Revision: 63900 URL: http://svn.opensuse.org/viewcvs/yast?rev=63900&view=rev Log: ReadFcoeConfig added Modified: trunk/fcoe-client/src/FcoeClient.ycp trunk/fcoe-client/src/complex.ycp trunk/fcoe-client/src/dialogs.ycp Modified: trunk/fcoe-client/src/FcoeClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/FcoeClient.ycp?rev=63900&r1=63899&r2=63900&view=diff ============================================================================== --- trunk/fcoe-client/src/FcoeClient.ycp (original) +++ trunk/fcoe-client/src/FcoeClient.ycp Wed May 4 13:43:22 2011 @@ -147,7 +147,7 @@ { boolean ret = false; - // don't check interactively for packages (bnc#367300) + // don't check interactively for packages (bnc#367300) -> comment from iscsi-client // skip it during initial and second stage or when create AY profile if(Stage::cont() || Stage::initial() || Mode::config()) return true; y2milestone("Check if open-fcoe package installed"); @@ -266,6 +266,14 @@ } // +// +// +void CheckServices() +{ + +} + +// // Detect network interface cards (hardware probe) and get status // void DetectNetworkCards() @@ -311,6 +319,28 @@ } // +// Read /etc/fcoe/config +// +void 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 ); + + 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" ); + } +} + +// // Returns the map containing general FCoE configuration // global map <string, string> GetFcoeConfig() @@ -339,9 +369,11 @@ /* Progress stage 1/3 */ _("Check installed packages"), /* Progress stage 2/3 */ - _("Detect network cards"), + _("Check services"), /* Progress stage 3/3 */ - _("Check services") + _("Detect network cards"), + /* Progress stage 4/4 */ + _("Read /etc/fcoe/config" ) ], [ /* Progress step 1/3 */ _("Checking for installed packages..."), @@ -349,16 +381,18 @@ _("Detecting network cards..."), /* Progress step 3/3 */ _("Checking for services..."), + /* Progress step 4/4 */ + _("Reading /etc/fcoe/config" ), /* Progress finished */ _("Finished") ], "" ); - // read database if(Abort()) return false; Progress::NextStage(); + // checking whether open-fcoe is installed (requires lldpad, ...) boolean installed = CheckInstalledPackages(); /* Error message */ @@ -369,19 +403,34 @@ if(Abort()) return false; Progress::NextStage(); - DetectNetworkCards(); - + // check daemon fcoemon and lldpad + CheckServices(); + /* Error message */ - if(false) Report::Error(_("Cannot get information about netcards")); + if(false) Report::Error(_("Checking for services failed")); sleep(sl); - // detect devices if(Abort()) return false; Progress::NextStage(); + + // detect netcards - TODO return value + DetectNetworkCards(); + /* Error message */ if(false) Report::Warning(_("Cannot detect devices.")); sleep(sl); + // read general FCoE settings + if(Abort()) return false; + Progress::NextStage(); + + // check daemon fcoemon and lldpad + ReadFcoeConfig(); + + /* Error message */ + if(false) Report::Error(_("Checking for services failed")); + sleep(sl); + Progress::Finish(); if(Abort()) return false; Modified: trunk/fcoe-client/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/complex.ycp?rev=63900&r1=63899&r2=63900&view=diff ============================================================================== --- trunk/fcoe-client/src/complex.ycp (original) +++ trunk/fcoe-client/src/complex.ycp Wed May 4 13:43:22 2011 @@ -153,28 +153,21 @@ void InitConfigurationDialog (string id) { y2milestone( "Init configuration dialog" ); - list <string> options = (list<string>) SCR::Dir(.fcoe); - y2milestone( "List of options: %1", options ); + map <string, string> fcoe_config = FcoeClient::GetFcoeConfig(); + y2milestone( "Fcoe configuration %1", fcoe_config ); - if ( options != [] ) + if ( fcoe_config!= $[] ) { - string debug_val = (string)SCR::Read(add(.fcoe, "DEBUG")); - string syslog_val = (string)SCR::Read(add(.fcoe, "SYSLOG")); - - if ( debug_val == "yes" ) + if ( fcoe_config["DEBUG"]:"" == "yes" ) UI::ChangeWidget(`id("debug"), `Value, "yes" ); else UI::ChangeWidget(`id("debug"), `Value, "no" ); - if ( syslog_val == "yes" ) + if ( fcoe_config["USE_SYSLOG"]:"" == "yes" ) UI::ChangeWidget(`id("syslog"), `Value, "yes" ); else UI::ChangeWidget(`id("syslog"), `Value, "no" ); } - else - { - y2error( "Cannot read /etc/fcoe/config"); - } } // @@ -267,6 +260,11 @@ void StoreEditDialog (string id, map event) { y2milestone( "Store edit dialog" ); + + string fcoe_enabled = (string)UI::QueryWidget( `id(`fcoe), `Value ); + string dcb_required = (string)UI::QueryWidget( `id(`dcb), `Value ); + + } /* EOF */ Modified: trunk/fcoe-client/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/dialogs.ycp?rev=63900&r1=63899&r2=63900&view=diff ============================================================================== --- trunk/fcoe-client/src/dialogs.ycp (original) +++ trunk/fcoe-client/src/dialogs.ycp Wed May 4 13:43:22 2011 @@ -49,12 +49,6 @@ `VSpacing (0.4) ); -/*symbol EditDialog() { - - y2milestone( "Edit dialog ***" ); - return `next; -} -*/ term EditDialogContents() { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn2.opensuse.org