Author: fehr
Date: Wed Apr 18 17:55:14 2012
New Revision: 67968
URL: http://svn.opensuse.org/viewcvs/yast?rev=67968&view=rev
Log:
checkin for backup purposes
Modified:
branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/IscsiLioData.ycp
branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/dialogs.ycp
branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/widgets.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/IscsiLioData.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/IscsiLioData.ycp?rev=67968&r1=67967&r2=67968&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/IscsiLioData.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/IscsiLioData.ycp Wed Apr 18 17:55:14 2012
@@ -286,6 +286,8 @@
global map GetAuth( string tgt, integer tpg, string clnt )
{
map m = GetTgt(data,tgt,tpg);
+ if( !isempty(tgt) )
+ m = m["clnt",clnt]:$[];
return( $[ "incoming" : m["incoming",0]:[],
"outgoing" : m["outgoing"]:[] ] );
}
@@ -881,7 +883,7 @@
}
else
{
- string param = tgt + " " + tpg + " " + clnt;
+ string param = tgt + " " + tpg + " " + clnt + " ";
if( !isempty(inc) )
{
cmd = "lio_node --setchapauth " + param;
@@ -936,6 +938,26 @@
return( ret );
}
+global boolean DoRemoveClntLun( string tgt, integer tpg, string clnt,
+ integer lun )
+ {
+ string kt = tgt + " " + tpg + " " + clnt + " " + lun;
+ boolean ret = LogExecCmd( "lio_node --dellunacl " + kt );
+ y2milestone( "DoRemoveClntLun tgt:%1 tpg:%2 clnt:%3 lun:%4 ret:%5",
+ tgt, tpg, clnt, lun, ret );
+ return( ret );
+ }
+
+global boolean DoCreateClntLun( string tgt, integer tpg, string clnt,
+ integer lun, integer tlun )
+ {
+ string kt = tgt + " " + tpg + " " + clnt + " " + tlun + " " + lun;
+ boolean ret = LogExecCmd( "lio_node --addlunacl " + kt );
+ y2milestone( "DoCreateClntLun tgt:%1 tpg:%2 clnt:%3 lun:%4:%5 ret:%6",
+ tgt, tpg, clnt, lun, tlun, ret );
+ return( ret );
+ }
+
global void UpdateConfig()
{
data = ParseConfigLio();
Modified: branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/dialogs.ycp?rev=67968&r1=67967&r2=67968&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/dialogs.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/dialogs.ycp Wed Apr 18 17:55:14 2012
@@ -346,7 +346,6 @@
// Main dialog - tabbed
any SummaryDialog() {
string caption = _("LIO iSCSI Target Overview");
- curr_target = "";
map widget_descr = $[
"tab": CWMTab::CreateWidget($[
"tab_order": [ "service", "global", "targets" ],
Modified: branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/widgets.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/widgets.ycp?rev=67968&r1=67967&r2=67968&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/widgets.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/iscsi-lio-server/src/widgets.ycp Wed Apr 18 17:55:14 2012
@@ -684,13 +684,19 @@
list <term> inc_items = [];
// create items from targets
list<list> tgt = IscsiLioData::GetTargets();
+ integer cur = 0;
foreach(list l, tgt,
{
inc_items = add(inc_items, `item(`id(count), l[0]:"", tostring(l[1]:0)));
+ y2milestone( "tgt:%1 tpg:%2 ctgt:%3 ctpg:%4", l[0]:"", l[1]:0, curr_target, curr_tpg );
+ if( curr_target==l[0]:"" && curr_tpg==l[1]:1 )
+ cur = count;
count = count + 1;
});
// put it into table
UI::ChangeWidget(`id(`server), `Items, inc_items);
+ if( cur!=0 )
+ UI::ChangeWidget(`id(`server), `CurrentItem, cur);
}
symbol handleTable (string table, map event)
@@ -734,11 +740,6 @@
curr_target = t[1]:"";
curr_tpg = tointeger(t[2]:"");
y2milestone("handleTable tgt:%1 tpg:%2", curr_target, curr_tpg );
- if (IscsiServerFunctions::setModifChanges( curr_target ) == 0)
- y2milestone("modified %1", curr_target);
- else
- y2error("%1 already modified", curr_target);
- // goto EditDialog() (initModify)
ret = `edit;
break;
}
@@ -1212,10 +1213,33 @@
return( ret );
}
+boolean removeClntLun( string tgt, integer tpg, string clnt, integer lun )
+ {
+ boolean ret = IscsiLioData::DoRemoveClntLun( tgt, tpg, clnt, lun );
+ if( !ret )
+ {
+ string txt = sformat( _("Problem removing lun %4 for client %3 in %1:%2"),
+ tgt, tpg, clnt, lun );
+ Popup::Error( txt );
+ }
+ return( ret );
+ }
+
+boolean createClntLun( string tgt, integer tpg, string clnt, integer lun, integer tlun )
+ {
+ boolean ret = IscsiLioData::DoCreateClntLun( tgt, tpg, clnt, lun, tlun );
+ if( !ret )
+ {
+ string txt = sformat( _("Problem adding lun %4:%5 for client %3 in %1:%2"),
+ tgt, tpg, clnt, lun, tlun );
+ Popup::Error( txt );
+ }
+ return( ret );
+ }
+
void storeClient(string option_id, map option_map)
{
boolean chg = false;
- //map