Author: aschnell
Date: Fri Feb 24 10:42:48 2012
New Revision: 67538
URL: http://svn.opensuse.org/viewcvs/yast?rev=67538&view=rev
Log:
- improved summary
Modified:
trunk/s390/src/modules/DASDController.ycp
trunk/s390/src/modules/ZFCPController.ycp
Modified: trunk/s390/src/modules/DASDController.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/DASDController.ycp?rev=67538&r1=67537&r2=67538&view=diff
==============================================================================
--- trunk/s390/src/modules/DASDController.ycp (original)
+++ trunk/s390/src/modules/DASDController.ycp Fri Feb 24 10:42:48 2012
@@ -290,16 +290,35 @@
/**
- * Create a textual summary and a list of unconfigured cards
+ * Create a textual summary and a list of configured devices
* @return summary of the current configuration
*/
global list<string> Summary()
{
- list<string> ret = maplist (integer index, map d, devices, {
- // summary text, %1 is channel (number), // %2 and %3 are Yes or No
- return sformat(_("Channel: %1, Format: %2, DIAG: %3"), d["channel"]:"",
- String::YesNo(d["format"]:false), String::YesNo(d["diag"]:false));
- });
+ list<string> ret = [];
+
+ if (Mode::config())
+ {
+ ret = maplist (integer index, map d, devices, {
+ // summary text, %1 is channel, %2 and %3 are Yes or No
+ return sformat(_("Channel: %1, Format: %2, DIAG: %3"), d["channel"]:"",
+ String::YesNo(d["format"]:false), String::YesNo(d["diag"]:false));
+ });
+ }
+ else
+ {
+ map > active_devices =
+ filter(integer index, map device, devices, {
+ return device["resource", "io", 0, "active"]:false;
+ });
+
+ ret = maplist (integer index, map d, active_devices, {
+ // summary text, %1 is channel, %2 is device name, %3 is Yes or No
+ return sformat(_("Channel: %1, Device: %2, DIAG: %3"), d["channel"]:"",
+ d["dev_name"]:"", String::YesNo(d["diag"]:false));
+ });
+ }
+
y2milestone("Summary: %1", ret);
return ret;
}
Modified: trunk/s390/src/modules/ZFCPController.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/ZFCPController.ycp?rev=67538&r1=67537&r2=67538&view=diff
==============================================================================
--- trunk/s390/src/modules/ZFCPController.ycp (original)
+++ trunk/s390/src/modules/ZFCPController.ycp Fri Feb 24 10:42:48 2012
@@ -302,18 +302,32 @@
/**
- * Create a textual summary and a list of unconfigured cards
+ * Create a textual summary and a list of configured devices
* @return summary of the current configuration
*/
global list<string> Summary()
{
- list<string> ret = maplist (integer index, map d, devices, {
- // summary text, %1 is channel, %1 is WWPN, %3 is LUN
- // (all of them are numbers)
- return sformat(_("Channel: %1, WWPN: %2, ZFCP LUN: %3"),
- d["detail", "controller_id"]:"", d["detail", "wwpn"]:"",
- d["detail", "fcp_lun"]:"");
- });
+ list<string> ret = [];
+
+ if (Mode::config())
+ {
+ ret = maplist (integer index, map d, devices, {
+ // summary text, %1 is channel, %2 is WWPN, %3 is LUN
+ return sformat(_("Channel: %1, WWPN: %2, ZFCP LUN: %3"),
+ d["detail", "controller_id"]:"", d["detail", "wwpn"]:"",
+ d["detail", "fcp_lun"]:"");
+ });
+ }
+ else
+ {
+ ret = maplist (integer index, map d, devices, {
+ // summary text, %1 is channel, %2 is WWPN, %3 is LUN, %4 is device name
+ return sformat(_("Channel: %1, WWPN: %2, ZFCP LUN: %3, Device: %4"),
+ d["detail", "controller_id"]:"", d["detail", "wwpn"]:"",
+ d["detail", "fcp_lun"]:"", d["dev_name"]:"");
+ });
+ }
+
y2milestone("Summary: %1", ret);
return ret;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org