Author: dfiser
Date: Tue Aug 14 17:00:28 2007
New Revision: 40262
URL: http://svn.opensuse.org/viewcvs/yast?rev=40262&view=rev
Log:
Support for autoyast done.
Help texts written.
Support for command line (only start/stop commands).
Reapaired testsuite which was broken by renaming scr path from .squid to .etc.squid.
Deleted file squid_proposal.ycp.
Removed:
trunk/squid/src/squid_proposal.ycp
Modified:
trunk/squid/src/Makefile.am
trunk/squid/src/Squid.ycp
trunk/squid/src/SquidACL.ycp
trunk/squid/src/SquidACL_local_functions.ycp
trunk/squid/src/dialogs.ycp
trunk/squid/src/helps.ycp
trunk/squid/src/popup_dialogs.ycp
trunk/squid/src/squid.ycp
trunk/squid/src/store_del.ycp
trunk/squid/testsuite/tests/Squid-Read.out
trunk/squid/testsuite/tests/Squid-Read.ycp
trunk/squid/testsuite/tests/Squid.out
trunk/squid/testsuite/tests/Squid.ycp
Modified: trunk/squid/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/Makefile.am?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/Makefile.am (original)
+++ trunk/squid/src/Makefile.am Tue Aug 14 17:00:28 2007
@@ -4,8 +4,7 @@
client_DATA = \
squid.ycp \
- squid_auto.ycp \
- squid_proposal.ycp
+ squid_auto.ycp
ynclude_DATA = \
helps.ycp \
Modified: trunk/squid/src/Squid.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/Squid.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/Squid.ycp (original)
+++ trunk/squid/src/Squid.ycp Tue Aug 14 17:00:28 2007
@@ -40,6 +40,7 @@
import "Summary";
import "Message";
import "Service";
+import "Summary";
/**
* Defines path used in SCR::Read/Write functions
@@ -132,6 +133,16 @@
];
+
+/**
+ * Write only, used during autoinstallation.
+ * Don't run services and SuSEconfig, it's all done at one place.
+ */
+global boolean write_only = false;
+
+
+
+/***************** HELP FUNCTIONS ***************/
/**
* Same as splitstring(), but returns only non-empty strings.
*/
@@ -144,6 +155,65 @@
});
}
+global integer NumACLs(integer id_item);
+/**
+ * Verify and repair list of ACLs if something's wrong.
+ */
+void verifyACLs()
+{
+ //verification of ACLs
+ //There must not exist more ACLs with same name and different type
+ integer i = 0;
+ list<string> tested = [];
+ list<integer> to_remove = [];
+ integer ii = 0;
+ foreach (map value, acls,
+ {
+ if (!contains(tested, value["name"]:"")){
+ if (NumACLs(i) > 0){
+ to_remove = [];
+ ii = 0;
+ foreach (map val, acls,
+ {
+ if (val["name"]:"" == value["name"]:""
+ && val["type"]:"" != value["type"]:""){
+ to_remove = add(to_remove, ii);
+ }
+ ii = ii + 1;
+ });
+ //delete all ACLs which has not type same as value["type"]:"" -
+ // - it means type of first occurence of tested ACL
+ foreach (integer val, to_remove, { acls = remove(acls, val);});
+ }
+ tested = add(tested, value["name"]:"");
+ }
+ i = i + 1;
+ });
+}
+
+
+string repairTimeoutPeriodUnits(string old)
+{
+ string ret = "seconds";
+ if (old == "day"){
+ ret = "days";
+ }else if (old == "hour"){
+ ret = "hours";
+ }else if (old == "minute"){
+ ret = "minutes";
+ }else if (old == "second"){
+ ret = "seconds";
+ }else if (contains(["seconds", "minutes", "hours", "days"], old)){
+ ret = old;
+ }
+
+ return ret;
+}
+/***************** HELP FUNCTIONS END ***********/
+
+
+
+
global void SetDefaultValues()
{
@@ -253,15 +323,7 @@
}
-/**
- */
-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
@@ -642,40 +704,6 @@
/******************** READ **********************/
-/**
- * Verify and repair list of ACLs if something's wrong.
- */
-void verifyACLs()
-{
- //verification of ACLs
- //There must not exist more ACLs with same name and different type
- integer i = 0;
- list<string> tested = [];
- list<integer> to_remove = [];
- integer ii = 0;
- foreach (map value, acls,
- {
- if (!contains(tested, value["name"]:"")){
- if (NumACLs(i) > 0){
- to_remove = [];
- ii = 0;
- foreach (map val, acls,
- {
- if (val["name"]:"" == value["name"]:""
- && val["type"]:"" != value["type"]:""){
- to_remove = add(to_remove, ii);
- }
- ii = ii + 1;
- });
- //delete all ACLs which has not type same as value["type"]:"" -
- // - it means type of first occurence of tested ACL
- foreach (integer val, to_remove, { acls = remove(acls, val);});
- }
- tested = add(tested, value["name"]:"");
- }
- i = i + 1;
- });
-}
/**
* Read setting of parameter http_port.
@@ -868,23 +896,6 @@
return ok;
}
-string repair_timeout_period_units(string old)
-{
- string ret = "seconds";
- if (old == "day"){
- ret = "days";
- }else if (old == "hour"){
- ret = "hours";
- }else if (old == "minute"){
- ret = "minutes";
- }else if (old == "second"){
- ret = "seconds";
- }else if (contains(["seconds", "minutes", "hours", "days"], old)){
- ret = old;
- }
-
- return ret;
-}
/**
* Read rest of setting.
* return true on success
@@ -912,9 +923,9 @@
settings["cache_replacement_policy"] = [mergestring(settings["cache_replacement_policy"]:[]," ")];
settings["memory_replacement_policy"] = [mergestring(settings["memory_replacement_policy"]:[]," ")];
settings["connect_timeout"] = [ (settings["connect_timeout"]:[])[0]:"",
- repair_timeout_period_units((settings["connect_timeout"]:[])[1]:"") ];
+ repairTimeoutPeriodUnits((settings["connect_timeout"]:[])[1]:"") ];
settings["client_lifetime"] = [ (settings["client_lifetime"]:[])[0]:"",
- repair_timeout_period_units((settings["client_lifetime"]:[])[1]:"") ];
+ repairTimeoutPeriodUnits((settings["client_lifetime"]:[])[1]:"") ];
return ok;
}
@@ -1131,7 +1142,19 @@
}
-boolean startService()
+/**
+ * Returns true if Squid service is running.
+ */
+global boolean IsServiceRunning()
+{
+ return (Service::Status("squid") == 0);
+}
+
+/**
+ * Start Squid service if not running otherwise reload.
+ * Returns true if squid was successfuly started
+ */
+global boolean StartService()
{
boolean ok = true;
//verify config file
@@ -1140,7 +1163,7 @@
// return false;
//}
- if (Service::Status("squid") != 0){
+ if (!IsServiceRunning()){
if (!Service::Start("squid")){
ok = false;
Report::Error(Message::CannotStartService("squid"));
@@ -1155,6 +1178,22 @@
return ok;
}
+/**
+ * Stop Squid service.
+ * Returns true if squid was successfuly stopped
+ */
+global boolean StopService()
+{
+ boolean ok = true;
+
+ if (IsServiceRunning()){
+ if (!Service::Stop("squid")){
+ ok = false;
+ Report::Error(Message::CannotStopService("squid"));
+ }
+ }
+ return ok;
+}
/**
* Write all squid settings
@@ -1197,7 +1236,7 @@
if(Abort()) return false;
Progress::NextStage ();
if (!write_only){
- if(!startService()) ok = false;
+ if(!StartService()) ok = false;
}
if(Abort()) return false;
@@ -1211,6 +1250,7 @@
+/******************* AUTOYAST *******************/
/**
* Get all squid settings from the first parameter
@@ -1262,19 +1302,35 @@
*/
global list Summary() {
string summary = "";
- // TODO FIXME: your code here...
- /* Configuration summary text for autoyast */
- return [ _("Configuration summary..."), [] ];
+ string tmp = "";
+ if (!GetModified()){
+ summary = Summary::NotConfigured();
+ }else{
+ summary = Summary::AddHeader("", _("Squid Cache Proxy"));
+ summary = Summary::AddLine(summary, _("Configured ports:"));
+ if (size(http_ports) > 0){
+ summary = Summary::OpenList(summary);
+ foreach (map value, http_ports,
+ {
+ tmp = "";
+ if (size(value["host"]:"") > 0) tmp = value["host"]:"" + ":";
+ tmp = tmp + value["port"]:"";
+ summary = Summary::AddListItem(summary, tmp);
+ });
+ summary = Summary::CloseList(summary);
+ }
+ }
+ return [ summary, [] ];
}
/**
* Create an overview table with all configured cards
* @return table items
- */
+ *
global list Overview() {
- // TODO FIXME: your code here...
return [];
}
+*/
/**
* Return packages needed to be installed and removed during
@@ -1285,6 +1341,7 @@
global map AutoPackages() {
return $[ "install":["squid"], "remove":[] ];
}
+/******************* AUTOYAST END ***************/
/* EOF */
}
Modified: trunk/squid/src/SquidACL.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/SquidACL.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/SquidACL.ycp (original)
+++ trunk/squid/src/SquidACL.ycp Tue Aug 14 17:00:28 2007
@@ -87,7 +87,7 @@
"widget_init" : srcWidgetInit,
"verification" : srcVerif,
"options" : srcOptions,
- "help" : "This is very usefull help text." ],
+ "help" : _("The IP address of the requesting client, or the clients IP Address.") ],
"dst" : $[ "name" : "dst",
"widget" : `Frame( _("dst"),
@@ -98,7 +98,8 @@
),
"widget_init" : dstWidgetInit,
"verification" : dstVerif,
- "options" : dstOptions ],
+ "options" : dstOptions,
+ "help" : _("Destination IP Address.") ],
"myip" : $[ "name" : "myip",
"widget" : `Frame( _("myip"),
@@ -109,7 +110,8 @@
),
"widget_init" : dstWidgetInit,
"verification" : dstVerif,
- "options" : dstOptions ],
+ "options" : dstOptions,
+ "help" : _("The local IP address on which the client connection exists.") ],
"srcdomain" : $[ "name" : "srcdomain",
"widget" : `Frame( _("srcdomain"),
@@ -119,7 +121,8 @@
),
"widget_init" : srcdomainWidgetInit,
"verification" : srcdomainVerif,
- "options" : srcdomainOptions ],
+ "options" : srcdomainOptions,
+ "help" : _("This type matches against the client's domain name.") ],
"dstdomain" : $[ "name" : "dstdomain",
"widget" : `Frame( _("dstdomain"),
@@ -129,10 +132,11 @@
),
"widget_init" : srcdomainWidgetInit,
"verification" : srcdomainVerif,
- "options" : srcdomainOptions ],
+ "options" : srcdomainOptions,
+ "help" : _("This refers to destination domain i.e. the source domain where the origin server is located.") ],
- "srcdom_regex" : regexp("srcdom_regex", "srcdom_regex"),
- "dstdom_regex" : regexp("dstdom_regex", "dstdom_regex"),
+ "srcdom_regex" : regexp("srcdom_regex", "srcdom_regex", _("Matches against the client domain name.")),
+ "dstdom_regex" : regexp("dstdom_regex", "dstdom_regex", _("Provides match against destination domain.")),
"time" : $[ "name" : "time",
"widget" : `Frame( _("time"),
@@ -153,10 +157,12 @@
),
"widget_init" : timeWidgetInit,
"verification" : timeVerif,
- "options" : timeOptions ],
+ "options" : timeOptions,
+ "help" : "" ],
- "url_regex" : regexp("url_regex", "url_regex"),
- "urlpath_regex" : regexp("urlpath_regex", "urlpath_regex"),
+ "url_regex" : regexp("url_regex", "url_regex", _("Matches using a regular expression on the complete URL.")),
+ "urlpath_regex" : regexp("urlpath_regex", "urlpath_regex",
+ _("Matches on the URL path minus any protocol, port, and host name information")),
"port" : $[ "name" : "port",
"widget" : `Frame( _("port"),
@@ -164,7 +170,8 @@
),
"widget_init" : portWidgetInit,
"verification" : portVerif,
- "options" : portOptions ],
+ "options" : portOptions,
+ "help" : _("Matches on the destination port for the request.") ],
"myport" : $[ "name" : "myport",
"widget" : `Frame( _("myport"),
@@ -172,7 +179,8 @@
),
"widget_init" : myportWidgetInit,
"verification" : myportVerif,
- "options" : portOptions ],
+ "options" : portOptions,
+ "help" : _("This provides match against local socket TCP port.") ],
"proto" : $[ "name" : "proto",
"widget" : `Frame ( _("proto"),
@@ -180,7 +188,8 @@
),
"widget_init" : protoWidgetInit,
"verification" : protoVerif,
- "options" : protoOptions ],
+ "options" : protoOptions,
+ "help" : _("Matches on the protocol of the request.") ],
"method" : $[ "name" : "method",
"widget" : `Frame( _("method"),
@@ -195,9 +204,10 @@
),
"widget_init" : methodWidgetInit,
"verification" : methodVerif,
- "options" : methodOptions ],
+ "options" : methodOptions,
+ "help" : _("This type matches the HTTP method in the request headers.") ],
- "browser" : regexp("browser", "browser"),
+ "browser" : regexp("browser", "browser", _("A regular expression that matches the clients browser type based on the user agent header.")),
"maxconn" : $[ "name" : "maxconn",
"widget" : `Frame("maxconn",
@@ -205,9 +215,10 @@
),
"widget_init" : maxconnWidgetInit,
"verification" : maxconnVerif,
- "options" : maxconnOptions ],
+ "options" : maxconnOptions,
+ "help" : _("Matches when the client's IP address has more than the specified number of HTTP connections established.") ],
- "referer_regex" : regexp("referer_regex", "referer_regex"),
+ "referer_regex" : regexp("referer_regex", "referer_regex", _("Matches against Referer header.")),
"req_header" : $[ "name" : "req_header",
"widget" : `Frame( "req_header",
@@ -219,7 +230,8 @@
),
"widget_init" : headerWidgetInit,
"verification" : headerVerif,
- "options" : headerOptions ],
+ "options" : headerOptions,
+ "help" : _("Regular expression matching against any of the known request headers.") ],
"rep_header" : $[ "name" : "rep_header",
"widget" : `Frame( "rep_header",
@@ -231,10 +243,12 @@
),
"widget_init" : headerWidgetInit,
"verification" : headerVerif,
- "options" : headerOptions ],
+ "options" : headerOptions,
+ "help" : _("Regular expression matching against the mime type of the reply received by
+squid. Can be used to detect file download or some types HTTP tunneling requests.") ],
- "req_mime_type" : regexp("req_mime_type", "req_mime_type"),
- "rep_mime_type" : regexp("rep_mime_type", "rep_mime_type"),
+ "req_mime_type" : regexp("req_mime_type", "req_mime_type", _("Match against the mime type of the request generated by the client.")),
+ "rep_mime_type" : regexp("rep_mime_type", "rep_mime_type", _("Match against the mime type of the reply received by Squid.")),
"arp" : $[ "name" : "arp",
"widget" : `Frame( "arp",
@@ -242,7 +256,8 @@
),
"widget_init" : arpWidgetInit,
"verification" : arpVerif,
- "options" : arpOptions ]
+ "options" : arpOptions,
+ "help" : _("Ethernet (MAC) address matching.") ]
];
/**
Modified: trunk/squid/src/SquidACL_local_functions.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/SquidACL_local_functions.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/SquidACL_local_functions.ycp (original)
+++ trunk/squid/src/SquidACL_local_functions.ycp Tue Aug 14 17:00:28 2007
@@ -21,7 +21,7 @@
/**
* File: include/squid/SquidACL_local_functions.ycp
* Package: Configuration of squid
- * Summary: Non-global functions of SquidACL module which are linked with ACL_map variable.
+ * Summary: Non-global functions of SquidACL module which are linked with acl_map variable.
* Authors: Daniel Fiser
*
* $Id$
@@ -219,7 +219,7 @@
/**************** REGEXP ************************/
/**
- * Returns univerzal widget for setting a regular expression.
+ * Returns universal widget for setting a regular expression.
*/
term regexpWidget(string frame_title)
{
@@ -232,7 +232,7 @@
}
/**
- * Univerzal widget_init for regular expression.
+ * Universal widget_init for regular expression.
*/
void regexpWidgetInit(integer id_item)
{
@@ -247,7 +247,7 @@
}
}
/**
- * Univerzal verification function for regular expression.
+ * Universal verification function for regular expression.
*/
boolean regexpVerif()
{
@@ -261,7 +261,7 @@
return ok;
}
/**
- * Univerzal options function for regular expression.
+ * Universal options function for regular expression.
*/
list<string> regexpOptions()
{
@@ -275,13 +275,14 @@
/**
* Returns map describing acl which has type of regular expression.
*/
-map regexp(string name, string frame_title)
+map regexp(string name, string frame_title, string help)
{
return $[ "name" : name,
"widget" : regexpWidget(frame_title),
"widget_init" : regexpWidgetInit,
"verification" : regexpVerif,
- "options" : regexpOptions ];
+ "options" : regexpOptions,
+ "help" : help ];
}
/**************** REGEXP END ********************/
Modified: trunk/squid/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/dialogs.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/dialogs.ycp (original)
+++ trunk/squid/src/dialogs.ycp Tue Aug 14 17:00:28 2007
@@ -35,8 +35,6 @@
import "Wizard";
import "SquidACL";
-//import "Squid";
-
include "squid/helps.ycp";
include "squid/popup_dialogs.ycp";
include "squid/inits.ycp";
@@ -90,7 +88,7 @@
)
);
- Wizard::SetContentsButtons(_("Squid - HTTP Ports Setting"), dialog_contents, "help text ad",
+ Wizard::SetContentsButtons(_("Squid - HTTP Ports Setting"), dialog_contents, HELPS["http_ports"]:"",
Label::BackButton(), Label::NextButton());
Wizard::DisableBackButton();
@@ -148,7 +146,7 @@
)
);
- Wizard::SetContentsButtons(_("Squid - Cache Setting"), dialog_contents, "help",
+ Wizard::SetContentsButtons(_("Squid - Cache Setting"), dialog_contents, HELPS["cache"]:"",
Label::BackButton(), Label::NextButton());
InitRefreshPatternsTable();
@@ -244,7 +242,7 @@
))
);
- Wizard::SetContentsButtons("Squid - Cache Setting 2", dialog_contents, "help",
+ Wizard::SetContentsButtons("Squid - Cache Setting 2", dialog_contents, HELPS["cache2"]:"",
Label::BackButton(), Label::NextButton());
InitCache2Dialog();
@@ -307,7 +305,7 @@
)
);
- Wizard::SetContentsButtons(_("Squid - Access Control Setting"), dialog_contents, "help",
+ Wizard::SetContentsButtons(_("Squid - Access Control Setting"), dialog_contents, HELPS["access_control"]:"",
Label::BackButton(), Label::NextButton());
InitACLGroupsTable();
@@ -411,7 +409,7 @@
))
));
- Wizard::SetContentsButtons("Squid - Logging + Timeouts Setting", dialog_contents, "help",
+ Wizard::SetContentsButtons("Squid - Logging + Timeouts Setting", dialog_contents, HELPS["logging_timeouts"]:"",
Label::BackButton(), Label::NextButton());
InitLoggingFrame();
@@ -461,7 +459,7 @@
`Left(`CheckBox(`id("ftp_passive"), _("Use Ftp Pasive Mode")))
));
- Wizard::SetContentsButtons("Squid - Miscellaneous Setting", dialog_contents, "help",
+ Wizard::SetContentsButtons("Squid - Miscellaneous Setting", dialog_contents, HELPS["miscellaneous"]:"",
Label::BackButton(), Label::FinishButton());
InitMiscellaneousDialog();
Modified: trunk/squid/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/helps.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/helps.ycp (original)
+++ trunk/squid/src/helps.ycp Tue Aug 14 17:00:28 2007
@@ -21,7 +21,7 @@
/**
* File: include/squid/helps.ycp
* Package: Configuration of squid
- * Summary: Help texts of all the dialogs
+ * Summary: Help texts of all the dialogs except AddEditACLDialog.
* Authors: Daniel Fiser
*
* $Id: helps.ycp 27914 2006-02-13 14:32:08Z locilka $
@@ -40,7 +40,6 @@
"read" : _("<p><b><big>Initializing squid Configuration</big></b><br>
Please wait...<br></p>
") +
-
/* Read dialog help 2/2 */
_("<p><b><big>Aborting Initialization:</big></b><br>
Safely abort the configuration utility by pressing <b>Abort</b> now.</p>
@@ -50,7 +49,6 @@
"write" : _("<p><b><big>Saving squid Configuration</big></b><br>
Please wait...<br></p>
") +
-
/* Write dialog help 2/2 */
_("<p><b><big>Aborting Saving:</big></b><br>
Abort the save procedure by pressing <b>Abort</b>.
@@ -58,61 +56,114 @@
</p>
"),
- /* Summary dialog help 1/3 */
+ /* Summary dialog help */
"summary" : _("<p><b><big>Squid Configuration</big></b><br>
Configure squid here.<br></p>
-") +
-
- /* Summary dialog help 2/3 */
- _("<p><b><big>Adding a squid:</big></b><br>
-Choose an squid from the list of detected squids.
-If your squid was not detected, use <b>Other (not detected)</b>.
-Then press <b>Configure</b>.</p>
-") +
-
- /* Summary dialog help 3/3 */
- _("<p><b><big>Editing or Deleting:</big></b><br>
-If you press <b>Edit</b>, an additional dialog in which to change
-the configuration opens.</p>
"),
- /* Ovreview dialog help 1/3 */
+ /* Ovreview dialog help */
"overview" : _("<p><b><big>Squid Configuration Overview</big></b><br>
Obtain an overview of installed squids. Additionally
edit their configurations.<br></p>
-") +
-
- /* Ovreview dialog help 2/3 */
-_("<p><b><big>Adding a squid:</big></b><br>
-Press <b>Add</b> to configure a squid.</p>") +
-
- /* Ovreview dialog help 3/3 */
-_("<p><b><big>Editing or Deleting:</big></b><br>
-Choose a squid to change or remove.
-Then press <b>Edit</b> or <b>Delete</b> as desired.</p>
"),
- /* Configure1 dialog help 1/2 */
- "c1" : _("<p><b><big>Configuration Part One</big></b><br>
-Press <b>Next</b> to continue.
-<br></p>") +
-
- /* Configure1 dialog help 2/2 */
-_("<p><b><big>Selecting Something</big></b><br>
-It is not possible. You must code it first. :-)
-</p>"),
- /* Configure2 dialog help 1/2 */
- "c2" : _("<p><b><big>Configuration Part Two</big></b><br>
-Press <b>Next</b> to continue.
-<br></p>
-") +
- /* Configure2 dialog help 2/2 */
-_("<p><b><big>Selecting Something</big></b><br>
-It is not possible. You must code it first. :-)
+ /* Http Ports Dialog */
+ "http_ports" :
+_("<p>Here you can define all ports where Squid will
+listen for clients http requests.</p>") +
+_("<p><b>Host</b> can contain hostname or ip address
+or it can be leaved empty.</p>"),
+
+
+ /* Cache Dialog */
+ "cache" :
+_("<p><b>Refresh Patterns</b> define the manner
+how Squid treats the objects in the cache.</p>") +
+_("<p>The refresh patterns are checked in the order listed here.
+The first entry which matches is used.</p>") +
+_("<p><b>Min</b> determines how long (in minutes) should be an object
+considered fresh if no explicit expire time given.") +
+_("<p><b>Percent</b> is percentage of the objects age (time since last
+modification age) an object without explicit expire time will be
+considered fresh.</p>") +
+_("<p><b>Max</b> is upper limit on how long objects without an explicit
+expiry time will be considered fresh.</p>"),
+
+
+ /* Cache 2 Dialog */
+ "cache2" :
+_("<p><b>Cache memory</b> defines the ideal amount of memory to be used for objects.</p>") +
+_("<p><b>Max Object Size</b> defines maximum size for objects to be stored
+in the disk.</p>") +
+_("<p><b>Min Object Size</b> specifies the minimum object size below which
+will not be saved to the disk.</p>") +
+_("<p>Replacement begins when the swap (disk) usage is above the
+<b>Swap Low-Water Mark</b> and attempts to maintain utilization near the
+<b>Swap Low-Water Mark</b>. As swap utilization gets close to
+<b>Swap High-Water Mark</b> object eviction becomes more aggressive.
+If utilization is close to the <b>Swap Low-Water Mark</b> less replacement
+is done each time.") +
+_("<p><b>Cache Replacement Policy</b> determines which objects are to be replaced
+when disk space is needed.
+<b>Memory Replacement Policy</b> specifies the policy for object replacement in
+memory when space for new objects is not available.
+Policies could be:
+<table>
+ <tr>
+ <td>lru</td>
+ <td>last recently used</td>
+ </tr>
+ <tr>
+ <td>heap GDSF</td>
+ <td>Greedy-Dual Size Frequency</td>
+ </tr>
+ <tr>
+ <td>heap LFUDA</td>
+ <td>Last Frequently Used with Dynamic Aging</td>
+ <tr>
+ <tr>
+ <td>heap LRU</td>
+ <td>lru policy implemented using a heap</td>
+ </tr>
+</table>
</p>"),
+
+ /* Access Control Dialog */
+ "access_control" :
+_("<p>Access to Squid server can be controlled via <b>ACL Groups</b>.</p>") +
+_("<p><b>ACL Group</b> has various types and description of ACL Group depends
+on them.</p>") +
+_("<p>In <b>Access Control</b> table can be denied or allowed ACL Groups.
+If there is more ACL Groups in one line it means that access will be allowed
+or denied for those who are from all ACL Groups at the same time.</p>") +
+_("<p><b>Access Control</b> table is checked in the order listed here.
+The first entry which matches is used.</p>"),
+
+
+ /* Logging and Timeouts Dialog */
+ "logging_timeouts" :
+_("<p><b>Access Log</b> defines the file where client activities are logged.</p>") +
+_("<p><b>Cache Log</b> defines the file where general informations about your
+cache's behavior is logged.</p>") +
+_("<p><b>Cache Store Log</b> defines the location where the transaction log of all
+objects that are stored in the object store, as well as the time when the object
+get deleted. This option can be leaved empty.</p>") +
+_("<p><b>Emulate Httpd Log</b> allows you to specify that Squid write its
+<b>Access Log</b> in HTTPD common log file format.</p>") +
+_("<p><b>Connection Timeout</b> is an option to force Squid to close
+connections after a specified time.</p>") +
+_("<p><b>Client Lifetime</b> defines the maximum amount of time that a client
+(browser) is allowed to remain connected to the cache process.</p>"),
+
+
+ /* Miscellaneous Dialog */
+ "miscellaneous" :
+_("<p><b>Admistrator's e-mail</b> is the address which will be added to any
+error pages that are displayed to clients. Defaults to either webmaster.</p>")
+
];
/* EOF */
Modified: trunk/squid/src/popup_dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/popup_dialogs.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/popup_dialogs.ycp (original)
+++ trunk/squid/src/popup_dialogs.ycp Tue Aug 14 17:00:28 2007
@@ -325,7 +325,7 @@
: _("Edit ACL Group"));
term contents =
`HBox(
- `HWeight(50, `RichText(`id("help_text"), "")),
+ `HWeight(30, `RichText(`id("help_text"), "")),
`HWeight(70, `VBox(
`Label(label),
`VSpacing(0.5),
Modified: trunk/squid/src/squid.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/squid.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/squid.ycp (original)
+++ trunk/squid/src/squid.ycp Tue Aug 14 17:00:28 2007
@@ -48,24 +48,61 @@
import "CommandLine";
include "squid/wizards.ycp";
+
+
+boolean startHandler(map options)
+{
+ CommandLine::PrintNoCR("Starting service ... ");
+ if (Squid::StartService()){
+ CommandLine::Print("Success");
+ return true;
+ }else{
+ CommandLine::Print("Failed");
+ return false;
+ }
+}
+boolean stopHandler(map options)
+{
+ CommandLine::PrintNoCR("Stopping service ... ");
+ if (Squid::StopService()){
+ CommandLine::Print("Success");
+ return true;
+ }else{
+ CommandLine::Print("Failed");
+ return false;
+ }
+}
+
+boolean init()
+{
+ return true;
+}
+boolean() finish = init;
+
+
+
map cmdline_description = $[
- "id" : "squid",
+ "id" : "squid",
/* Command line help text for the Xsquid module */
- "help" : _("Configuration of squid"),
- "guihandler" : SquidSequence,
-//"initialize" : Squid::Read,
-// "finish" : Squid::Write,
+ "help" : _("Configuration of Squid cache proxy"),
+ "guihandler" : SquidSequence,
+ "initialize" : init,
+ "finish" : finish,
"actions" : $[
- // FIXME TODO: fill the functionality description here
+ "start" : $[ "help" : "start squid service",
+ "handler" : startHandler],
+ "stop" : $[ "help" : "stop squid service",
+ "handler" : stopHandler]
],
"options" : $[
- // FIXME TODO: fill the option descriptions here
],
"mappings" : $[
- // FIXME TODO: fill the mappings of actions and options here
+ "start" : [],
+ "stop" : []
]
];
+
/* is this proposal or not? */
boolean propose = false;
list args = WFM::Args();
Modified: trunk/squid/src/store_del.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/src/store_del.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/src/store_del.ycp (original)
+++ trunk/squid/src/store_del.ycp Tue Aug 14 17:00:28 2007
@@ -420,10 +420,12 @@
ok = false;
message = message + (size(message)>0 ? "\n" : "") + _("Cache Log must not be empty.");
}
+ /*
if (size(cache_store_log) == 0){
ok = false;
message = message + (size(message)>0 ? "\n" : "") + _("Cache Store Log must not be empty.");
}
+ */
if (ok){
list<string> tmp = Squid::GetSetting("access_log");
Modified: trunk/squid/testsuite/tests/Squid-Read.out
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/testsuite/tests/Squid-Read.out?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/testsuite/tests/Squid-Read.out (original)
+++ trunk/squid/testsuite/tests/Squid-Read.out Tue Aug 14 17:00:28 2007
@@ -1,71 +1,71 @@
Dump Squid::readHttpPorts()
-Read .squid."http_port" ["localhost:3128", "80 transparent"]
+Read .etc.squid."http_port" ["localhost:3128", "80 transparent"]
Return true
Dump Squid::http_ports
Return [$["host":"localhost", "port":"3128"], $["host":"", "port":"80", "transparent":true]]
Dump ------------------------------
Dump Squid::readHttpAccesses()
-Read .squid."http_access" ["allow manager localhost", "deny manager", "deny !Safe_ports", "deny CONNECT !SSL_ports", "allow localhost", "allow localhost_public", "deny all"]
+Read .etc.squid."http_access" ["allow manager localhost", "deny manager", "deny !Safe_ports", "deny CONNECT !SSL_ports", "allow localhost", "allow localhost_public", "deny all"]
Return true
Dump Squid::http_accesses
Return [$["acl":["manager", "localhost"], "allow":true], $["acl":["manager"], "allow":false], $["acl":["!Safe_ports"], "allow":false], $["acl":["CONNECT", "!SSL_ports"], "allow":false], $["acl":["localhost"], "allow":true], $["acl":["localhost_public"], "allow":true], $["acl":["all"], "allow":false]]
Dump ------------------------------
Dump Squid::readRefreshPatterns()
-Read .squid."refresh_pattern" ["^ftp:\t\t1440\t20%\t10080", "-i ^gopher:\t1440\t0%\t1440", ".\t\t0\t20%\t4320"]
+Read .etc.squid."refresh_pattern" ["^ftp:\t\t1440\t20%\t10080", "-i ^gopher:\t1440\t0%\t1440", ".\t\t0\t20%\t4320"]
Return true
Dump Squid::refresh_patterns
Return [$["case_sensitive":true, "max":"10080", "min":"1440", "percent":"20", "regexp":"^ftp:"], $["case_sensitive":false, "max":"1440", "min":"1440", "percent":"0", "regexp":"^gopher:"], $["case_sensitive":true, "max":"4320", "min":"0", "percent":"20", "regexp":"."]]
Dump ------------------------------
Dump Squid::readACLs()
-Read .squid."acl" ["QUERY urlpath_regex cgi-bin \\?", "apache rep_header Server ^Apache", "all src 0.0.0.0/0.0.0.0", "manager proto cache_object", "localhost src \t \t 127.0.0.1/255.255.255.255", "localhost_public src 10.20.1.241/255.255.255.255", "to_localhost dst 127.0.0.0/8", "SSL_ports port 443", "Safe_ports port 80", "Safe_ports port 21", "Safe_ports port 443", "Safe_ports port 70", "Safe_ports port 210", "Safe_ports port 1025-65535", "Safe_ports port 280", "Safe_ports port 488", "Safe_ports port 591", "Safe_ports port 777", "CONNECT method CONNECT"]
+Read .etc.squid."acl" ["QUERY urlpath_regex cgi-bin \\?", "apache rep_header Server ^Apache", "all src 0.0.0.0/0.0.0.0", "manager proto cache_object", "localhost src \t \t 127.0.0.1/255.255.255.255", "localhost_public src 10.20.1.241/255.255.255.255", "to_localhost dst 127.0.0.0/8", "SSL_ports port 443", "Safe_ports port 80", "Safe_ports port 21", "Safe_ports port 443", "Safe_ports port 70", "Safe_ports port 210", "Safe_ports port 1025-65535", "Safe_ports port 280", "Safe_ports port 488", "Safe_ports port 591", "Safe_ports port 777", "CONNECT method CONNECT"]
Return true
Dump Squid::acls
Return [$["name":"QUERY", "options":["cgi-bin \\?"], "type":"urlpath_regex"], $["name":"apache", "options":["Server", "^Apache"], "type":"rep_header"], $["name":"all", "options":["0.0.0.0/0.0.0.0"], "type":"src"], $["name":"manager", "options":["cache_object"], "type":"proto"], $["name":"localhost", "options":["127.0.0.1/255.255.255.255"], "type":"src"], $["name":"localhost_public", "options":["10.20.1.241/255.255.255.255"], "type":"src"], $["name":"to_localhost", "options":["127.0.0.0/8"], "type":"dst"], $["name":"SSL_ports", "options":["443"], "type":"port"], $["name":"Safe_ports", "options":["80"], "type":"port"], $["name":"Safe_ports", "options":["21"], "type":"port"], $["name":"Safe_ports", "options":["443"], "type":"port"], $["name":"Safe_ports", "options":["70"], "type":"port"], $["name":"Safe_ports", "options":["210"], "type":"port"], $["name":"Safe_ports", "options":["1025-65535"], "type":"port"], $["name":"Safe_ports", "options":["280"], "type":"port"], $["name":"Safe_ports", "options":["488"], "type":"port"], $["name":"Safe_ports", "options":["591"], "type":"port"], $["name":"Safe_ports", "options":["777"], "type":"port"], $["name":"CONNECT", "options":["CONNECT"], "type":"method"]]
Dump ------------------------------
Dump Squid::readRestSetting()
-Read .squid."access_log" ["/var/log/squid/access.log"]
-Read .squid."cache_dir" ["ufs /var/cache/squid 100 16 256"]
-Read .squid."cache_log" ["/var/log/squid/cache.log"]
-Read .squid."cache_mem" ["80 MB"]
-Read .squid."cache_mgr" ["webmaster"]
-Read .squid."cache_replacement_policy" ["lru"]
-Read .squid."cache_store_log" ["/var/log/squid/store.log"]
-Read .squid."cache_swap_high" ["95"]
-Read .squid."cache_swap_low" ["90"]
-Read .squid."client_lifetime" ["1 day"]
-Read .squid."connect_timeout" ["2 minutes"]
-Read .squid."emulate_httpd_log" ["off"]
-Read .squid."error_directory" ["/usr/share/squid/errors/English"]
-Read .squid."ftp_passive" ["on"]
-Read .squid."maximum_object_size" ["4096 KB"]
-Read .squid."memory_replacement_policy" ["heap GDSF"]
-Read .squid."minimum_object_size" ["0 KB"]
+Read .etc.squid."access_log" ["/var/log/squid/access.log"]
+Read .etc.squid."cache_dir" ["ufs /var/cache/squid 100 16 256"]
+Read .etc.squid."cache_log" ["/var/log/squid/cache.log"]
+Read .etc.squid."cache_mem" ["80 MB"]
+Read .etc.squid."cache_mgr" ["webmaster"]
+Read .etc.squid."cache_replacement_policy" ["lru"]
+Read .etc.squid."cache_store_log" ["/var/log/squid/store.log"]
+Read .etc.squid."cache_swap_high" ["95"]
+Read .etc.squid."cache_swap_low" ["90"]
+Read .etc.squid."client_lifetime" ["1 day"]
+Read .etc.squid."connect_timeout" ["2 minutes"]
+Read .etc.squid."emulate_httpd_log" ["off"]
+Read .etc.squid."error_directory" ["/usr/share/squid/errors/English"]
+Read .etc.squid."ftp_passive" ["on"]
+Read .etc.squid."maximum_object_size" ["4096 KB"]
+Read .etc.squid."memory_replacement_policy" ["heap GDSF"]
+Read .etc.squid."minimum_object_size" ["0 KB"]
Return true
Dump Squid::settings
Return $["access_log":["/var/log/squid/access.log"], "cache_dir":["ufs", "/var/cache/squid", "100", "16", "256"], "cache_log":["/var/log/squid/cache.log"], "cache_mem":["80", "MB"], "cache_mgr":["webmaster"], "cache_replacement_policy":["lru"], "cache_store_log":["/var/log/squid/store.log"], "cache_swap_high":["95"], "cache_swap_low":["90"], "client_lifetime":["1", "days"], "connect_timeout":["2", "minutes"], "emulate_httpd_log":["off"], "error_directory":["/usr/share/squid/errors/English"], "ftp_passive":["on"], "maximum_object_size":["4096", "KB"], "memory_replacement_policy":["heap GDSF"], "minimum_object_size":["0", "KB"]]
Dump ------------------------------
Dump Squid::Read()
-Read .squid."http_port" ["localhost:3128", "80 transparent"]
-Read .squid."refresh_pattern" ["^ftp:\t\t1440\t20%\t10080", "-i ^gopher:\t1440\t0%\t1440", ".\t\t0\t20%\t4320"]
-Read .squid."acl" ["QUERY urlpath_regex cgi-bin \\?", "apache rep_header Server ^Apache", "all src 0.0.0.0/0.0.0.0", "manager proto cache_object", "localhost src \t \t 127.0.0.1/255.255.255.255", "localhost_public src 10.20.1.241/255.255.255.255", "to_localhost dst 127.0.0.0/8", "SSL_ports port 443", "Safe_ports port 80", "Safe_ports port 21", "Safe_ports port 443", "Safe_ports port 70", "Safe_ports port 210", "Safe_ports port 1025-65535", "Safe_ports port 280", "Safe_ports port 488", "Safe_ports port 591", "Safe_ports port 777", "CONNECT method CONNECT"]
-Read .squid."http_access" ["allow manager localhost", "deny manager", "deny !Safe_ports", "deny CONNECT !SSL_ports", "allow localhost", "allow localhost_public", "deny all"]
-Read .squid."access_log" ["/var/log/squid/access.log"]
-Read .squid."cache_dir" ["ufs /var/cache/squid 100 16 256"]
-Read .squid."cache_log" ["/var/log/squid/cache.log"]
-Read .squid."cache_mem" ["80 MB"]
-Read .squid."cache_mgr" ["webmaster"]
-Read .squid."cache_replacement_policy" ["lru"]
-Read .squid."cache_store_log" ["/var/log/squid/store.log"]
-Read .squid."cache_swap_high" ["95"]
-Read .squid."cache_swap_low" ["90"]
-Read .squid."client_lifetime" ["1 day"]
-Read .squid."connect_timeout" ["2 minutes"]
-Read .squid."emulate_httpd_log" ["off"]
-Read .squid."error_directory" ["/usr/share/squid/errors/English"]
-Read .squid."ftp_passive" ["on"]
-Read .squid."maximum_object_size" ["4096 KB"]
-Read .squid."memory_replacement_policy" ["heap GDSF"]
-Read .squid."minimum_object_size" ["0 KB"]
+Read .etc.squid."http_port" ["localhost:3128", "80 transparent"]
+Read .etc.squid."refresh_pattern" ["^ftp:\t\t1440\t20%\t10080", "-i ^gopher:\t1440\t0%\t1440", ".\t\t0\t20%\t4320"]
+Read .etc.squid."acl" ["QUERY urlpath_regex cgi-bin \\?", "apache rep_header Server ^Apache", "all src 0.0.0.0/0.0.0.0", "manager proto cache_object", "localhost src \t \t 127.0.0.1/255.255.255.255", "localhost_public src 10.20.1.241/255.255.255.255", "to_localhost dst 127.0.0.0/8", "SSL_ports port 443", "Safe_ports port 80", "Safe_ports port 21", "Safe_ports port 443", "Safe_ports port 70", "Safe_ports port 210", "Safe_ports port 1025-65535", "Safe_ports port 280", "Safe_ports port 488", "Safe_ports port 591", "Safe_ports port 777", "CONNECT method CONNECT"]
+Read .etc.squid."http_access" ["allow manager localhost", "deny manager", "deny !Safe_ports", "deny CONNECT !SSL_ports", "allow localhost", "allow localhost_public", "deny all"]
+Read .etc.squid."access_log" ["/var/log/squid/access.log"]
+Read .etc.squid."cache_dir" ["ufs /var/cache/squid 100 16 256"]
+Read .etc.squid."cache_log" ["/var/log/squid/cache.log"]
+Read .etc.squid."cache_mem" ["80 MB"]
+Read .etc.squid."cache_mgr" ["webmaster"]
+Read .etc.squid."cache_replacement_policy" ["lru"]
+Read .etc.squid."cache_store_log" ["/var/log/squid/store.log"]
+Read .etc.squid."cache_swap_high" ["95"]
+Read .etc.squid."cache_swap_low" ["90"]
+Read .etc.squid."client_lifetime" ["1 day"]
+Read .etc.squid."connect_timeout" ["2 minutes"]
+Read .etc.squid."emulate_httpd_log" ["off"]
+Read .etc.squid."error_directory" ["/usr/share/squid/errors/English"]
+Read .etc.squid."ftp_passive" ["on"]
+Read .etc.squid."maximum_object_size" ["4096 KB"]
+Read .etc.squid."memory_replacement_policy" ["heap GDSF"]
+Read .etc.squid."minimum_object_size" ["0 KB"]
Return true
Dump Squid::settings
Return $["access_log":["/var/log/squid/access.log"], "cache_dir":["ufs", "/var/cache/squid", "100", "16", "256"], "cache_log":["/var/log/squid/cache.log"], "cache_mem":["80", "MB"], "cache_mgr":["webmaster"], "cache_replacement_policy":["lru"], "cache_store_log":["/var/log/squid/store.log"], "cache_swap_high":["95"], "cache_swap_low":["90"], "client_lifetime":["1", "days"], "connect_timeout":["2", "minutes"], "emulate_httpd_log":["off"], "error_directory":["/usr/share/squid/errors/English"], "ftp_passive":["on"], "maximum_object_size":["4096", "KB"], "memory_replacement_policy":["heap GDSF"], "minimum_object_size":["0", "KB"]]
@@ -80,27 +80,27 @@
Dump ------------------------------
Dump ----testing defualt values----
Dump Squid:Read()
-Read .squid."http_port" ["localhost:3128", "80 transparent"]
-Read .squid."refresh_pattern" ["^ftp:\t\t1440\t20%\t10080", "-i ^gopher:\t1440\t0%\t1440", ".\t\t0\t20%\t4320"]
-Read .squid."acl" ["QUERY urlpath_regex cgi-bin \\?", "apache rep_header Server ^Apache", "all src 0.0.0.0/0.0.0.0", "manager proto cache_object", "localhost src \t \t 127.0.0.1/255.255.255.255", "localhost_public src 10.20.1.241/255.255.255.255", "to_localhost dst 127.0.0.0/8", "SSL_ports port 443", "Safe_ports port 80", "Safe_ports port 21", "Safe_ports port 443", "Safe_ports port 70", "Safe_ports port 210", "Safe_ports port 1025-65535", "Safe_ports port 280", "Safe_ports port 488", "Safe_ports port 591", "Safe_ports port 777", "CONNECT method CONNECT"]
-Read .squid."http_access" ["allow manager localhost", "deny manager", "deny !Safe_ports", "deny CONNECT !SSL_ports", "allow localhost", "allow localhost_public", "deny all"]
-Read .squid."access_log" ["/var/log/squid/access.log"]
-Read .squid."cache_dir" ["ufs /var/cache/squid 100 16 256"]
-Read .squid."cache_log" ["/var/log/squid/cache.log"]
-Read .squid."cache_mem" nil
-Read .squid."cache_mgr" ["webmaster"]
-Read .squid."cache_replacement_policy" ["lru"]
-Read .squid."cache_store_log" ["/var/log/squid/store.log"]
-Read .squid."cache_swap_high" ["95"]
-Read .squid."cache_swap_low" ["90"]
-Read .squid."client_lifetime" ["1 day"]
-Read .squid."connect_timeout" ["2 minutes"]
-Read .squid."emulate_httpd_log" ["off"]
-Read .squid."error_directory" ["/usr/share/squid/errors/English"]
-Read .squid."ftp_passive" ["on"]
-Read .squid."maximum_object_size" ["4096 KB"]
-Read .squid."memory_replacement_policy" nil
-Read .squid."minimum_object_size" ["0 KB"]
+Read .etc.squid."http_port" ["localhost:3128", "80 transparent"]
+Read .etc.squid."refresh_pattern" ["^ftp:\t\t1440\t20%\t10080", "-i ^gopher:\t1440\t0%\t1440", ".\t\t0\t20%\t4320"]
+Read .etc.squid."acl" ["QUERY urlpath_regex cgi-bin \\?", "apache rep_header Server ^Apache", "all src 0.0.0.0/0.0.0.0", "manager proto cache_object", "localhost src \t \t 127.0.0.1/255.255.255.255", "localhost_public src 10.20.1.241/255.255.255.255", "to_localhost dst 127.0.0.0/8", "SSL_ports port 443", "Safe_ports port 80", "Safe_ports port 21", "Safe_ports port 443", "Safe_ports port 70", "Safe_ports port 210", "Safe_ports port 1025-65535", "Safe_ports port 280", "Safe_ports port 488", "Safe_ports port 591", "Safe_ports port 777", "CONNECT method CONNECT"]
+Read .etc.squid."http_access" ["allow manager localhost", "deny manager", "deny !Safe_ports", "deny CONNECT !SSL_ports", "allow localhost", "allow localhost_public", "deny all"]
+Read .etc.squid."access_log" ["/var/log/squid/access.log"]
+Read .etc.squid."cache_dir" ["ufs /var/cache/squid 100 16 256"]
+Read .etc.squid."cache_log" ["/var/log/squid/cache.log"]
+Read .etc.squid."cache_mem" nil
+Read .etc.squid."cache_mgr" ["webmaster"]
+Read .etc.squid."cache_replacement_policy" ["lru"]
+Read .etc.squid."cache_store_log" ["/var/log/squid/store.log"]
+Read .etc.squid."cache_swap_high" ["95"]
+Read .etc.squid."cache_swap_low" ["90"]
+Read .etc.squid."client_lifetime" ["1 day"]
+Read .etc.squid."connect_timeout" ["2 minutes"]
+Read .etc.squid."emulate_httpd_log" ["off"]
+Read .etc.squid."error_directory" ["/usr/share/squid/errors/English"]
+Read .etc.squid."ftp_passive" ["on"]
+Read .etc.squid."maximum_object_size" ["4096 KB"]
+Read .etc.squid."memory_replacement_policy" nil
+Read .etc.squid."minimum_object_size" ["0 KB"]
Return true
Dump Squid::settings["cache_mem"]:["1"] == Squid::parameters["cache_mem"]:["2"]
Return true
Modified: trunk/squid/testsuite/tests/Squid-Read.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/testsuite/tests/Squid-Read.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/testsuite/tests/Squid-Read.ycp (original)
+++ trunk/squid/testsuite/tests/Squid-Read.ycp Tue Aug 14 17:00:28 2007
@@ -58,6 +58,7 @@
"ftp_passive" : ["on"]
]
];
+READ = $["etc" : READ];
map WRITE = $[];
map EXECUTE = $[];
@@ -119,8 +120,10 @@
/* Testing of using default values: */
DUMP("------------------------------");
DUMP("----testing defualt values----");
+READ = READ["etc"]:$[];
READ["squid"] = remove(READ["squid"]:$[], "cache_mem");
READ["squid"] = remove(READ["squid"]:$[], "memory_replacement_policy");
+READ = $["etc" : READ];
DUMP("Squid:Read()");
TEST(``(Squid::Read()), [READ], nil);
Modified: trunk/squid/testsuite/tests/Squid.out
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/testsuite/tests/Squid.out?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/testsuite/tests/Squid.out (original)
+++ trunk/squid/testsuite/tests/Squid.out Tue Aug 14 17:00:28 2007
@@ -1,24 +1,24 @@
-Read .squid."http_port" ["localhost:3128", "80 transparent"]
-Read .squid."refresh_pattern" ["^ftp:\t\t1440\t20%\t10080", "-i ^gopher:\t1440\t0%\t1440", ".\t\t0\t20%\t4320"]
-Read .squid."acl" ["QUERY urlpath_regex cgi-bin \\?", "apache rep_header Server ^Apache", "all src 0.0.0.0/0.0.0.0", "manager proto cache_object", "localhost src \t \t 127.0.0.1/255.255.255.255", "localhost_public src 10.20.1.241/255.255.255.255", "to_localhost dst 127.0.0.0/8", "SSL_ports port 443", "Safe_ports port 80", "Safe_ports port 21", "Safe_ports port 443", "Safe_ports port 70", "Safe_ports port 210", "Safe_ports port 1025-65535", "Safe_ports port 280", "Safe_ports port 488", "Safe_ports port 591", "Safe_ports port 777", "CONNECT method CONNECT"]
-Read .squid."http_access" ["allow manager localhost", "deny manager", "deny !Safe_ports", "deny CONNECT !SSL_ports", "allow localhost", "allow localhost_public", "deny all"]
-Read .squid."access_log" ["/var/log/squid/access.log"]
-Read .squid."cache_dir" ["ufs /var/cache/squid 100 16 256"]
-Read .squid."cache_log" ["/var/log/squid/cache.log"]
-Read .squid."cache_mem" ["80 MB"]
-Read .squid."cache_mgr" ["webmaster"]
-Read .squid."cache_replacement_policy" ["lru"]
-Read .squid."cache_store_log" ["/var/log/squid/store.log"]
-Read .squid."cache_swap_high" ["95"]
-Read .squid."cache_swap_low" ["90"]
-Read .squid."client_lifetime" ["1 day"]
-Read .squid."connect_timeout" ["2 minutes"]
-Read .squid."emulate_httpd_log" ["off"]
-Read .squid."error_directory" ["/usr/share/squid/errors/English"]
-Read .squid."ftp_passive" ["on"]
-Read .squid."maximum_object_size" ["4096 KB"]
-Read .squid."memory_replacement_policy" ["heap GDSF"]
-Read .squid."minimum_object_size" ["0 KB"]
+Read .etc.squid."http_port" ["localhost:3128", "80 transparent"]
+Read .etc.squid."refresh_pattern" ["^ftp:\t\t1440\t20%\t10080", "-i ^gopher:\t1440\t0%\t1440", ".\t\t0\t20%\t4320"]
+Read .etc.squid."acl" ["QUERY urlpath_regex cgi-bin \\?", "apache rep_header Server ^Apache", "all src 0.0.0.0/0.0.0.0", "manager proto cache_object", "localhost src \t \t 127.0.0.1/255.255.255.255", "localhost_public src 10.20.1.241/255.255.255.255", "to_localhost dst 127.0.0.0/8", "SSL_ports port 443", "Safe_ports port 80", "Safe_ports port 21", "Safe_ports port 443", "Safe_ports port 70", "Safe_ports port 210", "Safe_ports port 1025-65535", "Safe_ports port 280", "Safe_ports port 488", "Safe_ports port 591", "Safe_ports port 777", "CONNECT method CONNECT"]
+Read .etc.squid."http_access" ["allow manager localhost", "deny manager", "deny !Safe_ports", "deny CONNECT !SSL_ports", "allow localhost", "allow localhost_public", "deny all"]
+Read .etc.squid."access_log" ["/var/log/squid/access.log"]
+Read .etc.squid."cache_dir" ["ufs /var/cache/squid 100 16 256"]
+Read .etc.squid."cache_log" ["/var/log/squid/cache.log"]
+Read .etc.squid."cache_mem" ["80 MB"]
+Read .etc.squid."cache_mgr" ["webmaster"]
+Read .etc.squid."cache_replacement_policy" ["lru"]
+Read .etc.squid."cache_store_log" ["/var/log/squid/store.log"]
+Read .etc.squid."cache_swap_high" ["95"]
+Read .etc.squid."cache_swap_low" ["90"]
+Read .etc.squid."client_lifetime" ["1 day"]
+Read .etc.squid."connect_timeout" ["2 minutes"]
+Read .etc.squid."emulate_httpd_log" ["off"]
+Read .etc.squid."error_directory" ["/usr/share/squid/errors/English"]
+Read .etc.squid."ftp_passive" ["on"]
+Read .etc.squid."maximum_object_size" ["4096 KB"]
+Read .etc.squid."memory_replacement_policy" ["heap GDSF"]
+Read .etc.squid."minimum_object_size" ["0 KB"]
Dump ==================================================
Dump ===================== ACL ======================
Dump ==================================================
@@ -67,14 +67,14 @@
Return 10
Dump
Dump ACLIsUsedBy(0) - QUERY
-Dir .squid: ["access_log", "acl", "cache_dir", "cache_log", "cache_mem", "cache_mgr", "cache_replacement_policy", "cache_store_log", "cache_swap_high", "cache_swap_log", "cache_swap_low", "client_lifetime", "connect_timeout", "emulate_httpd_log", "error_directory", "ftp_passive", "http_access", "http_port", "maximum_object_size", "memory_replacement_policy", "minimum_object_size", "no_cache", "refresh_pattern"]
-Read .squid."no_cache" ["deny QUERY"]
-Read .squid."access_log" ["/var/log/squid/access.log"]
+Dir .etc.squid: ["access_log", "acl", "cache_dir", "cache_log", "cache_mem", "cache_mgr", "cache_replacement_policy", "cache_store_log", "cache_swap_high", "cache_swap_log", "cache_swap_low", "client_lifetime", "connect_timeout", "emulate_httpd_log", "error_directory", "ftp_passive", "http_access", "http_port", "maximum_object_size", "memory_replacement_policy", "minimum_object_size", "no_cache", "refresh_pattern"]
+Read .etc.squid."no_cache" ["deny QUERY"]
+Read .etc.squid."access_log" ["/var/log/squid/access.log"]
Return ["no_cache"]
Dump ACLIsUsedBy(1)
-Dir .squid: ["access_log", "acl", "cache_dir", "cache_log", "cache_mem", "cache_mgr", "cache_replacement_policy", "cache_store_log", "cache_swap_high", "cache_swap_log", "cache_swap_low", "client_lifetime", "connect_timeout", "emulate_httpd_log", "error_directory", "ftp_passive", "http_access", "http_port", "maximum_object_size", "memory_replacement_policy", "minimum_object_size", "no_cache", "refresh_pattern"]
-Read .squid."no_cache" ["deny QUERY"]
-Read .squid."access_log" ["/var/log/squid/access.log"]
+Dir .etc.squid: ["access_log", "acl", "cache_dir", "cache_log", "cache_mem", "cache_mgr", "cache_replacement_policy", "cache_store_log", "cache_swap_high", "cache_swap_log", "cache_swap_low", "client_lifetime", "connect_timeout", "emulate_httpd_log", "error_directory", "ftp_passive", "http_access", "http_port", "maximum_object_size", "memory_replacement_policy", "minimum_object_size", "no_cache", "refresh_pattern"]
+Read .etc.squid."no_cache" ["deny QUERY"]
+Read .etc.squid."access_log" ["/var/log/squid/access.log"]
Return ["http_access"]
Dump ==================================================
Dump ================ HTTP_ACCESS ===================
Modified: trunk/squid/testsuite/tests/Squid.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/squid/testsuite/tests/Squid.ycp?rev=40262&r1=40261&r2=40262&view=diff
==============================================================================
--- trunk/squid/testsuite/tests/Squid.ycp (original)
+++ trunk/squid/testsuite/tests/Squid.ycp Tue Aug 14 17:00:28 2007
@@ -60,6 +60,7 @@
"no_cache" : ["deny QUERY"]
]
];
+READ = $["etc" : READ];
map WRITE = $[];
map EXECUTE = $[];
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org