[yast-commit] r67510 - in /trunk/s390: package/yast2-s390.changes src/dasd/dialogs.ycp src/modules/ZFCPController.ycp src/zfcp/dialogs.ycp
Author: aschnell Date: Wed Feb 22 12:43:25 2012 New Revision: 67510 URL: http://svn.opensuse.org/viewcvs/yast?rev=67510&view=rev Log: - more input checks - some fixes Modified: trunk/s390/package/yast2-s390.changes trunk/s390/src/dasd/dialogs.ycp trunk/s390/src/modules/ZFCPController.ycp trunk/s390/src/zfcp/dialogs.ycp Modified: trunk/s390/package/yast2-s390.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/package/yast2-s390.changes?rev=67510&r1=67509&r2=67510&view=diff ============================================================================== --- trunk/s390/package/yast2-s390.changes (original) +++ trunk/s390/package/yast2-s390.changes Wed Feb 22 12:43:25 2012 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Feb 22 12:21:42 CET 2012 - aschnell@suse.de + +- make ZFCP module work with AutoYaST editor + +------------------------------------------------------------------- Wed Feb 15 11:25:49 CET 2012 - aschnell@suse.de - make DASD module work with AutoYaST editor Modified: trunk/s390/src/dasd/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/dasd/dialogs.ycp?rev=67510&r1=67509&r2=67510&view=diff ============================================================================== --- trunk/s390/src/dasd/dialogs.ycp (original) +++ trunk/s390/src/dasd/dialogs.ycp Wed Feb 22 12:43:25 2012 @@ -529,8 +529,7 @@ if (DASDController::GetDeviceIndex(channel) != nil) { // error popup - Popup::Error(_("Channel already exists.")); - UI::SetFocus(`channel); + Popup::Error(_("Device already exists.")); ret = nil; continue; } Modified: trunk/s390/src/modules/ZFCPController.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/ZFCPController.ycp?rev=67510&r1=67509&r2=67510&view=diff ============================================================================== --- trunk/s390/src/modules/ZFCPController.ycp (original) +++ trunk/s390/src/modules/ZFCPController.ycp Wed Feb 22 12:43:25 2012 @@ -182,9 +182,9 @@ if (!Mode::normal()) { foreach (integer index, map<string, any> device, devices, { - string channel = device["controller_id"]:""; - string wwpn = device["wwpn"]:""; - string lun = device["fcp_lun"]:""; + string channel = device["detail", "controller_id"]:""; + string wwpn = device["detail", "wwpn"]:""; + string lun = device["detail", "fcp_lun"]:""; ActivateDisk(channel, wwpn, lun); }); } @@ -313,11 +313,13 @@ global integer - GetDeviceIndex(string channel) + GetDeviceIndex(string channel, string wwpn, string lun) { integer ret = nil; foreach(integer index , map<string, any> d, devices, { - if (d["channel"]:"" == channel) + if (d["detail", "controller_id"]:"" == channel && + d["detail", "wwpn"]:"" == wwpn && + d["detail", "fcp_lun"]:"" == lun) ret = index; }); return ret; @@ -367,6 +369,10 @@ return c["device"]:"" == "zFCP controller"; }); + controllers = maplist (map<string, any> c, controllers, { + return filter(string k, any v, c, { return contains([ "sysfs_bus_id" ], k); }); + }); + y2milestone ("probed ZFCP controllers %1", controllers); } return controllers; @@ -399,6 +405,10 @@ list<map<string, any> > disks_tapes = (list<map<string, any> >) merge(disks, tapes); + disks_tapes = maplist (map<string, any> d, disks_tapes, { + return filter(string k, any v, d, { return contains([ "dev_name", "detail" ], k); }); + }); + integer index = -1; devices = listmap (map<string, any> d, disks_tapes, { index = index + 1; Modified: trunk/s390/src/zfcp/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/zfcp/dialogs.ycp?rev=67510&r1=67509&r2=67510&view=diff ============================================================================== --- trunk/s390/src/zfcp/dialogs.ycp (original) +++ trunk/s390/src/zfcp/dialogs.ycp Wed Feb 22 12:43:25 2012 @@ -243,7 +243,8 @@ string caption = _("Add New ZFCP Device"); string fcp_lun = ZFCPController::previous_settings["fcp_lun"]:""; - fcp_lun = ZFCPController::GetNextLUN(fcp_lun); + if (!isempty(fcp_lun)) + fcp_lun = ZFCPController::GetNextLUN(fcp_lun); list<string> items = []; if (Mode::config ()) @@ -252,13 +253,11 @@ return d["detail", "controller_id"]:""; }); items = toset (items); - items = filter (string i, items, { return i != "" && i != nil; }); } else { items = maplist (map<string, any> c, ZFCPController::GetControllers(), { - string channel = c["sysfs_bus_id"]:""; - return channel; + return c["sysfs_bus_id"]:""; }); } @@ -391,6 +390,18 @@ ret = nil; continue; } + + channel = ZFCPController::FormatChannel(channel); + wwpn = ZFCPController::FormatWWPN(wwpn); + fcp_lun = ZFCPController::FormatFCPLUN(fcp_lun); + + if (ZFCPController::GetDeviceIndex(channel, wwpn, fcp_lun) != nil) + { + // error popup + Popup::Error(_("Device already exists.")); + ret = nil; + continue; + } } } @@ -423,6 +434,8 @@ else { ZFCPController::ActivateDisk (channel, wwpn, lun); + + ZFCPController::ProbeDisks(); } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn2.opensuse.org