Author: mzugec
Date: Fri Jul 3 12:01:05 2009
New Revision: 57862
URL: http://svn.opensuse.org/viewcvs/yast?rev=57862&view=rev
Log:
added IsnsServer.ycp
Added:
trunk/isns/src/IsnsServer.ycp
Added: trunk/isns/src/IsnsServer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/isns/src/IsnsServer.ycp?rev=57862&view=auto
==============================================================================
--- trunk/isns/src/IsnsServer.ycp (added)
+++ trunk/isns/src/IsnsServer.ycp Fri Jul 3 12:01:05 2009
@@ -0,0 +1,615 @@
+/**
+ * File: modules/IsnsServer.ycp
+ * Package: Configuration of isns-server
+ * Summary: IsnsServer settings, input and output functions
+ * Authors: Michal Zugec
+ *
+ * $Id: IsnsServer.ycp 35355 2007-01-15 15:06:49Z mzugec $
+ *
+ * Representation of the configuration of iscsi-server.
+ * Input and output routines.
+ */
+
+{
+
+module "isnsServer";
+textdomain "isns";
+
+import "Progress";
+import "Report";
+import "Summary";
+import "Message";
+import "Service";
+import "Package";
+import "Popup";
+import "SuSEFirewall";
+import "Confirm";
+import "Mode";
+import "String";
+import "Map";
+
+boolean serviceStatus = false;
+boolean statusOnStart = false;
+
+/**
+ * Prototypes
+ */
+global boolean Modified();
+
+/**
+ * Data was modified?
+ */
+global boolean modified = false;
+global boolean configured = false;
+
+/**
+ */
+global boolean proposal_valid = false;
+
+/**
+ * Write only, used during autoinstallation.
+ * Don't run services and SuSEconfig, it's all done at one place.
+ */
+global boolean write_only = false;
+
+/**
+ * Abort function
+ * return boolean return true if abort
+ */
+global boolean() AbortFunction = Modified;
+
+/**
+ * Abort function
+ * @return boolean return true if abort
+ */
+global define boolean Abort() ``{
+ if(AbortFunction != nil)
+ {
+ return AbortFunction () == true;
+ }
+ return false;
+}
+
+/**
+ * Data was modified?
+ * @return true if modified
+ */
+global boolean Modified() {
+ y2debug("modified=%1",modified);
+ return modified;
+}
+
+// read configuration file /etc/ietd.conf
+global boolean readConfig(){
+ map read_values = (map)SCR::Read(.etc.isns.all);
+// IsnsServerFunctions::parseConfig( read_values );
+ y2milestone("isns readConfig");
+ return true;
+}
+
+// write configuration file /etc/ietd.conf
+boolean writeConfig(){
+// prepare map, because perl->ycp lost information about data types (integers in this case)
+// map config_file = IsnsServerFunctions::writeConfig();
+// config_file["type"]=tointeger(config_file["type"]:"1");
+// config_file["file"]=tointeger(config_file["file"]:"1");
+// list