Author: mzugec
Date: Thu Aug 30 09:34:57 2007
New Revision: 40596
URL: http://svn.opensuse.org/viewcvs/yast?rev=40596&view=rev
Log:
zfcp discovery in add dialog (fate#300869)
Modified:
trunk/s390/VERSION
trunk/s390/package/yast2-s390.changes
trunk/s390/src/modules/ZFCPController.ycp
trunk/s390/src/zfcp/dialogs.ycp
Modified: trunk/s390/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/VERSION?rev=40596&r1=40595&r2=40596&view=diff
==============================================================================
--- trunk/s390/VERSION (original)
+++ trunk/s390/VERSION Thu Aug 30 09:34:57 2007
@@ -1 +1 @@
-2.15.0
+2.15.1
Modified: trunk/s390/package/yast2-s390.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/package/yast2-s390.changes?rev=40596&r1=40595&r2=40596&view=diff
==============================================================================
--- trunk/s390/package/yast2-s390.changes (original)
+++ trunk/s390/package/yast2-s390.changes Thu Aug 30 09:34:57 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Aug 30 09:40:46 CEST 2007 - mzugec@suse.cz
+
+- zfcp discovery in add dialog (fate#300869)
+- 2.15.1
+
+-------------------------------------------------------------------
Wed Mar 14 10:29:15 CET 2007 - mvidner@suse.cz
- Tell yast2-schema about our schema pieces (#242148).
Modified: trunk/s390/src/modules/ZFCPController.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/ZFCPController.ycp?rev=40596&r1=40595&r2=40596&view=diff
==============================================================================
--- trunk/s390/src/modules/ZFCPController.ycp (original)
+++ trunk/s390/src/modules/ZFCPController.ycp Thu Aug 30 09:34:57 2007
@@ -21,7 +21,7 @@
import "Report";
import "Stage";
import "Summary";
-
+import "Popup";
global map > devices = $[];
@@ -438,5 +438,28 @@
disk_configured = true;
}
+ list<string> runCommand(string cmd){
+ list<string> ret = [];
+ map cmd_output = (map)SCR::Execute(.target.bash_output, cmd);
+ if (cmd_output["exit"]:-1==0){
+ ret = splitstring(cmd_output["stdout"]:"", "\n");
+ ret = filter(string row, ret, {return (size(row)>0);});
+ } else {
+ Popup::Error(cmd_output["stderr"]:"");
+ }
+ y2milestone("command %1, output %2", cmd, cmd_output);
+ return ret;
+ }
+
+ global list<string> GetWWPNs(string busid){
+ return runCommand(sformat("zfcp_san_disc -b '%1' -W", busid));
+ }
+
+ global list<string> GetLUNs(string busid, string wwpn){
+ return runCommand(sformat("zfcp_san_disc -b '%1' -p '%2' -L", busid, wwpn));
+ }
+
+
+
/* EOF */
}
Modified: trunk/s390/src/zfcp/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/zfcp/dialogs.ycp?rev=40596&r1=40595&r2=40596&view=diff
==============================================================================
--- trunk/s390/src/zfcp/dialogs.ycp (original)
+++ trunk/s390/src/zfcp/dialogs.ycp Thu Aug 30 09:34:57 2007
@@ -290,12 +290,18 @@
_("&Channel Number"),
items),
`VSpacing (2),
- // text entry
- `TextEntry(`id(`wwpn), _("&WWPN"),
- ZFCPController::previous_settings["wwpn"]:""),
+ `HBox(
+ // text entry
+ `ComboBox(`id(`wwpn), `opt(`hstretch), _("&WWPN"),
+ [ ZFCPController::previous_settings["wwpn"]:"" ]),
+ `PushButton(`id(`get_wwpn), _("Get WWPN's"))
+ ),
`VSpacing (2),
+ `HBox(
// text entry
- `TextEntry(`id(`fcp_lun), _("&FCP-LUN"), fcp_lun),
+ `ComboBox(`id(`fcp_lun), _("&FCP-LUN"), [ fcp_lun ]),
+ `PushButton(`id(`get_lun), _("Get LUN's"))
+ ),
`VStretch ()
), `HStretch ());
@@ -310,7 +316,17 @@
{
ret = UI::UserInput();
- if (ret == `abort || ret == `cancel)
+ if (ret == `get_wwpn){
+ list<string> items = ZFCPController::GetWWPNs((string)UI::QueryWidget(`channel, `Value));
+ UI::ChangeWidget(`wwpn, `Items, items);
+ ret=nil;
+ }
+ else if (ret == `get_lun){
+ list<string> items = ZFCPController::GetLUNs((string)UI::QueryWidget(`channel, `Value), (string)UI::QueryWidget(`wwpn, `Value));
+ UI::ChangeWidget(`fcp_lun, `Items, items);
+ ret=nil;
+ }
+ else if (ret == `abort || ret == `cancel)
{
// yes-no popup
if (! Popup::YesNo (_("Really leave the ZFCP disk configuration without saving?
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org