[yast-commit] r64799 - in /trunk/iscsi-client: VERSION package/yast2-iscsi-client.changes src/IscsiClientLib.ycp src/dialogs.ycp src/widgets.ycp
Author: fehr Date: Thu Jul 14 12:11:26 2011 New Revision: 64799 URL: http://svn.opensuse.org/viewcvs/yast?rev=64799&view=rev Log: - delay offload initialisation into init function - fix offload init from old autoyast xml files (bnc#703485) - 2.21.1 Modified: trunk/iscsi-client/VERSION trunk/iscsi-client/package/yast2-iscsi-client.changes trunk/iscsi-client/src/IscsiClientLib.ycp trunk/iscsi-client/src/dialogs.ycp trunk/iscsi-client/src/widgets.ycp Modified: trunk/iscsi-client/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-client/VERSION?rev=64799&r1=64798&r2=64799&view=diff ============================================================================== --- trunk/iscsi-client/VERSION (original) +++ trunk/iscsi-client/VERSION Thu Jul 14 12:11:26 2011 @@ -1 +1 @@ -2.21.0 +2.21.1 Modified: trunk/iscsi-client/package/yast2-iscsi-client.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-client/package/yast2-iscsi-client.changes?rev=64799&r1=64798&r2=64799&view=diff ============================================================================== --- trunk/iscsi-client/package/yast2-iscsi-client.changes (original) +++ trunk/iscsi-client/package/yast2-iscsi-client.changes Thu Jul 14 12:11:26 2011 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Jul 12 18:13:53 CEST 2011 - fehr@suse.de + +- delay offload initialisation into init function +- fix offload init from old autoyast xml files (bnc#703485) +- 2.21.1 + +------------------------------------------------------------------- Thu May 12 14:20:50 CEST 2011 - fehr@suse.de - implement support for iSCSI offload cards (fate#311711) Modified: trunk/iscsi-client/src/IscsiClientLib.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-client/src/IscsiClientLib.ycp?rev=64799&r1=64798&r2=64799&view=diff ============================================================================== --- trunk/iscsi-client/src/IscsiClientLib.ycp (original) +++ trunk/iscsi-client/src/IscsiClientLib.ycp Thu Jul 14 12:11:26 2011 @@ -562,30 +562,38 @@ } global boolean autoyastWrite(){ -// do discovery first -list<string> portals = []; -list<string> ifaces = []; -string ifacepar = ""; -foreach(map target, ay_settings["targets"]:[], { - if (!contains(ifaces, target["iface"]:"")){ - ifacepar = ifacepar + "-I " + target["iface"]:""; - ifaces = add(ifaces, target["iface"]:""); - } -}); -foreach(map target, ay_settings["targets"]:[], { - if (!contains(portals, target["portal"]:"")){ - SCR::Execute(.target.bash, GetAdmCmd(sformat("-m discovery %1 -t st -p %2", ifacepar, target["portal"]:""))); - portals = add(portals, target["portal"]:""); - } -}); - foreach(map target, ay_settings["targets"]:[], { -y2internal("login into target %1", target); - loginIntoTarget(target); - currentRecord = [target["portal"]:"", target["target"]:"", target["iface"]:""]; - setStartupStatus(target["startup"]:"manual"); - }); - return true; -} + // do discovery first + list<string> portals = []; + list<string> ifaces = []; + string ifacepar = ""; + foreach(map target, ay_settings["targets"]:[], { + string iface = target["iface"]:"default"; + if (!contains(ifaces, iface)){ + if( size(ifacepar)>0 ) + ifacepar = ifacepar + " "; + ifacepar = ifacepar + "-I " + iface; + ifaces = add(ifaces, iface); + } + }); + if( size( filter( string s, ifaces, ``(s!="default")))>0 ) + { + CallConfigScript(); + } + foreach(map target, ay_settings["targets"]:[], { + if (!contains(portals, target["portal"]:"")){ + SCR::Execute(.target.bash, + GetAdmCmd(sformat("-m discovery %1 -t st -p %2", ifacepar, target["portal"]:""))); + portals = add(portals, target["portal"]:""); + } + }); + foreach(map target, ay_settings["targets"]:[], { + y2internal("login into target %1", target); + loginIntoTarget(target); + currentRecord = [target["portal"]:"", target["target"]:"", target["iface"]:""]; + setStartupStatus(target["startup"]:"manual"); + }); + return true; + } global string Overview(){ string overview = _("Configuration summary..."); Modified: trunk/iscsi-client/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-client/src/dialogs.ycp?rev=64799&r1=64798&r2=64799&view=diff ============================================================================== --- trunk/iscsi-client/src/dialogs.ycp (original) +++ trunk/iscsi-client/src/dialogs.ycp Thu Jul 14 12:11:26 2011 @@ -66,8 +66,7 @@ `TextEntry(`id(`initiator_name), _("Initiator Name")), `MinWidth( 8, `ComboBox(`id(`offload_card), `opt(`notify), - _("Offloa&d Card"), - IscsiClientLib::GetOffloadItems() )))) + _("Offloa&d Card"), [] )))) ), "init" : initInitName, "validate_type" : `function, Modified: trunk/iscsi-client/src/widgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-client/src/widgets.ycp?rev=64799&r1=64798&r2=64799&view=diff ============================================================================== --- trunk/iscsi-client/src/widgets.ycp (original) +++ trunk/iscsi-client/src/widgets.ycp Thu Jul 14 12:11:26 2011 @@ -245,6 +245,7 @@ void initInitName(string key){ y2milestone("initiatorname %1", IscsiClientLib::initiatorname); UI::ChangeWidget(`initiator_name, `Value, IscsiClientLib::initiatorname); + UI::ChangeWidget(`offload_card, `Items, IscsiClientLib::GetOffloadItems()); UI::ChangeWidget(`offload_card, `Value, IscsiClientLib::GetOffloadCard()); y2milestone("OffloadCard %1", IscsiClientLib::GetOffloadCard()); if (size(IscsiClientLib::getiBFT()["iSCSI_INITIATOR_NAME"]:"")>0){ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
fehr@svn2.opensuse.org