[Zope-Checkins] CVS: Zope/lib/python/Controller - Directives.py:1.1.2.2 Main.py:1.1.2.3 MetaDirective.py:1.1.2.3 directives.csv:1.1.2.5 directives.gnumeric:1.1.2.2 makedirectives.py:NONE
Chris McDonough
chrism@zope.com
Tue, 10 Sep 2002 00:16:00 -0400
Update of /cvs-repository/Zope/lib/python/Controller
In directory cvs.zope.org:/tmp/cvs-serv11896/lib/python/Controller
Modified Files:
Tag: chrism-install-branch
Directives.py Main.py MetaDirective.py directives.csv
directives.gnumeric
Removed Files:
Tag: chrism-install-branch
makedirectives.py
Log Message:
Directives are now stored in a singleton registry. The defaults are read from the 'directives.csv' file in the Controller package and registered dynamically. As a result, the 'makedirectives.py' script was removed as it is no longer necessary.
The option to get a configuration from XML-RPC was removed in favor of
obtaining a configuration file over HTTP. The command-line options
to both zope.py and zctl were changed accordingly.
=== Zope/lib/python/Controller/Directives.py 1.1.2.1 => 1.1.2.2 === (810/910 lines abridged)
--- Zope/lib/python/Controller/Directives.py:1.1.2.1 Mon Sep 2 03:35:09 2002
+++ Zope/lib/python/Controller/Directives.py Tue Sep 10 00:15:59 2002
@@ -11,660 +11,252 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
-" Directive registry for configuration at startup. "
-__version__='$Revision$'[11:-2]
+"""
+Directive registration facilities
+
+$Id$
+"""
+
+import os, sys, re, urllib2
+import zLOG
+from MetaDirective import EnvironmentDirective, SwitchEnvironmentDirective,\
+ CommandLineDirective
+
+_marker = []
+
+DIRECTIVE_TSV_FORMAT = {
+ 0: 'category',
+ 1: 'pri',
+ 2: 'name',
+ 3: 'desc',
+ 4: 'type',
+ 5: 'valtype',
+ 6: 'influences',
+ 7: 'meta_default',
+ 8: 'value',
+ 9: 'example'
+ }
+
+HERE = os.path.dirname(globals()['__file__'])
+
+def get_eval_locals(reg_get):
+ def absp(path):
+ return os.path.abspath(os.path.normpath(path))
+ pjoin = os.path.join
+ dirname = os.path.dirname
+ split = os.path.split
+ ZOPE_HOME = dirname(dirname(dirname(dirname(
+ sys.modules[__name__].__file__))))
+ SOFTWARE_HOME = pjoin(ZOPE_HOME, 'lib', 'python')
+ INSTANCE_HOME = os.getcwd()
+ CLIENT_HOME = pjoin(INSTANCE_HOME, 'var')
+ return locals()
+
+class DirectiveRegistry:
[-=- -=- -=- 810 lines omitted -=- -=- -=-]
-access_syslog_path = access_syslog_path()
-access_syslog_server = access_syslog_server()
-event_log_filename = event_log_filename()
-event_log_severity = event_log_severity()
-event_syslog_facility = event_syslog_facility()
-event_syslog_path = event_syslog_path()
-event_syslog_server = event_syslog_server()
-trace_log_filename = trace_log_filename()
-default_structured_text_header_level = default_structured_text_header_level()
-maximum_security_manager_stack_size = maximum_security_manager_stack_size()
-publisher_profile_file = publisher_profile_file()
-webdav_source_user_agents = webdav_source_user_agents()
-dns_server_address = dns_server_address()
-ip_address = ip_address()
-default_http_realm = default_http_realm()
-fastcgi_resource_path_or_port = fastcgi_resource_path_or_port()
-force_http_connection_close = force_http_connection_close()
-http_server_ports = http_server_ports()
-ftp_server_ports = ftp_server_ports()
-icp_server_ports = icp_server_ports()
-monitor_server_ports = monitor_server_ports()
-webdav_source_server_ports = webdav_source_server_ports()
-pcgi_resource_path = pcgi_resource_path()
-automatically_quote_dtml_request_data = automatically_quote_dtml_request_data()
-skip_authentication_checking = skip_authentication_checking()
-skip_ownership_checking = skip_ownership_checking()
-security_policy_implementation = security_policy_implementation()
-maximum_number_of_session_objects = maximum_number_of_session_objects()
-session_add_notify_script_path = session_add_notify_script_path()
-session_delete_notify_script_path = session_delete_notify_script_path()
-session_timeout_minutes = session_timeout_minutes()
-suppress_all_access_rules = suppress_all_access_rules()
-suppress_all_site_roots = suppress_all_site_roots()
-zodb_filestorage_filepath = zodb_filestorage_filepath()
-zodb_db_cache_size = zodb_db_cache_size()
-zodb_db_pool_size = zodb_db_pool_size()
-database_quota_size = database_quota_size()
-read_only_database = read_only_database()
-use_zeo_server = use_zeo_server()
-zeo_client_name = zeo_client_name()
-zeo_storage_server_hostname = zeo_storage_server_hostname()
-zeo_storage_server_path_or_port = zeo_storage_server_path_or_port()
-zeo_storage_server_storagename = zeo_storage_server_storagename()
-zeo_client_cache_size = zeo_client_cache_size()
-zeo_client_debug = zeo_client_debug()
-zeo_client_cache_directory = zeo_client_cache_directory()
-zeo_client_min_disconnect_poll = zeo_client_min_disconnect_poll()
-zeo_client_max_disconnect_poll = zeo_client_max_disconnect_poll()
-zeo_client_wait_for_server_on_startup = zeo_client_wait_for_server_on_startup()
-__all__ = ['zope_home', 'instance_home', 'software_home', 'client_home', 'python_path', 'debug_mode', 'effective_user', 'inhibit_product_installation', 'locale', 'number_of_threads', 'python_check_interval', 'use_daemon_process', 'zserver_read_only_mode', 'pid_filename', 'acccess_syslog_facility', 'access_log_filename', 'access_syslog_path', 'access_syslog_server', 'event_log_filename', 'event_log_severity', 'event_syslog_facility', 'event_syslog_path', 'event_syslog_server', 'trace_log_filename', 'default_structured_text_header_level', 'maximum_security_manager_stack_size', 'publisher_profile_file', 'webdav_source_user_agents', 'dns_server_address', 'ip_address', 'default_http_realm', 'fastcgi_resource_path_or_port', 'force_http_connection_close', 'http_server_ports', 'ftp_server_ports', 'icp_server_ports', 'monitor_server_ports', 'webdav_source_server_ports', 'pcgi_resource_path', 'automatically_quote_dtml_request_data', 'skip_authentication_checking', 'skip_ownership_che!
cking', 'security_policy_implementation', 'maximum_number_of_session_objects', 'session_add_notify_script_path', 'session_delete_notify_script_path', 'session_timeout_minutes', 'suppress_all_access_rules', 'suppress_all_site_roots', 'zodb_filestorage_filepath', 'zodb_db_cache_size', 'zodb_db_pool_size', 'database_quota_size', 'read_only_database', 'use_zeo_server', 'zeo_client_name', 'zeo_storage_server_hostname', 'zeo_storage_server_path_or_port', 'zeo_storage_server_storagename', 'zeo_client_cache_size', 'zeo_client_debug', 'zeo_client_cache_directory', 'zeo_client_min_disconnect_poll', 'zeo_client_max_disconnect_poll', 'zeo_client_wait_for_server_on_startup']
=== Zope/lib/python/Controller/Main.py 1.1.2.2 => 1.1.2.3 ===
--- Zope/lib/python/Controller/Main.py:1.1.2.2 Tue Sep 3 03:43:45 2002
+++ Zope/lib/python/Controller/Main.py Tue Sep 10 00:15:59 2002
@@ -15,14 +15,12 @@
import os, sys, codecs, string, socket, re, warnings
from types import StringType, IntType
import Directives
-from Directives import __all__ as DIRECTIVE_NAMES
_marker = []
-def hold(stuff, d={}):
- d[stuff] = 1
-
-def start_zope(config):
+def start_zope(config_location):
# config *must* include zope_home, software_home and instance_home
+ config = Directives.DirectiveRegistry
+ config.reconfigure(config_location)
ZOPE_HOME = config['zope_home']
SOFTWARE_HOME = config['software_home']
INSTANCE_HOME = config['instance_home']
@@ -474,8 +472,6 @@
except: pass
pf.write(pid)
pf.flush()
- # hold on to the pidfile while its locked (we will clean it up later)
- hold(pf)
# move this to after setuid once we figure it out.
if not READ_ONLY:
@@ -490,93 +486,6 @@
if not READ_ONLY:
pf.close()
os.unlink(PID_FILE)
-
-class Configuration:
- def __init__(self, dict):
- self.config = dict
-
- def activate(self):
- for name in DIRECTIVE_NAMES:
- directive = getattr(Directives, name)
- value = self.config.get(name)
- if value is not None:
- directive.set(value)
- directive.activate()
-
- def get(self, name, default=_marker):
- if name in DIRECTIVE_NAMES:
- return getattr(Directives, name).value
- if default is _marker:
- return None
- return default
-
- def set(self, name, value):
- if name in DIRECTIVE_NAMES:
- getattr(Directives, name).set(value)
- raise KeyError, name
-
- def __getitem__(self, name):
- if name in DIRECTIVE_NAMES:
- return self.get(name)
- raise KeyError, name
-
- def printable(self):
- l = []
- longest = 0
- for name in DIRECTIVE_NAMES:
- if len(name) > longest:
- longest = len(name)
- for name in DIRECTIVE_NAMES:
- l.append(' %s:\n %s' % ( name, self[name] ))
- return '\n'.join(l)
-
-def parse_config_file(filename):
- filename = os.path.expanduser(filename)
- filename = os.path.normpath(filename)
- filename = os.path.abspath(filename)
- if not os.path.exists(filename):
- raise 'Cannot find configuration file at %s' % filename
- regex = re.compile(r'(\w+)\s+(.*)')
- f = open(filename, 'r')
- i = 1
- seen = {}
- d = {}
- while 1:
- line = f.readline()
- if not line:
- break
- if line.startswith('#'):
- i = i + 1
- continue
- line = line.strip()
- if not line:
- i = i + 1
- continue
- sre = regex.match(line)
- if sre is None:
- if len(line) > 40:
- line = line[:40] + '...'
- raise ConfigParseError, 'malformed line %s: %s"' % (i, line)
- name, value = sre.groups()
- if seen.has_key(name):
- raise ConfigParseError, (
- 'Illegal multiple directive declarations for %s' % name
- )
- seen[name] = 1
- if name not in DIRECTIVE_NAMES:
- raise ConfigParseError, (
- 'Unknown directive "%s" at line %s' % (name, i)
- )
- d[name] = value
- return d
-
-def get_xmlrpc_config(url):
- import xmlrpclib
- method = xmlrpclib.Server(url)
- return method()
-
-class ConfigParseError(Exception):
- pass
def _warn_nobody():
import zLOG
=== Zope/lib/python/Controller/MetaDirective.py 1.1.2.2 => 1.1.2.3 ===
--- Zope/lib/python/Controller/MetaDirective.py:1.1.2.2 Mon Sep 2 03:35:09 2002
+++ Zope/lib/python/Controller/MetaDirective.py Tue Sep 10 00:15:59 2002
@@ -11,45 +11,59 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
-"""Base classes and type handlers for directive processing.
-"""
+"""Base classes and type handlers for directives."""
+
__version__='$Revision$'[11:-2]
_marker = []
-import os, sys
+import os
+
+def getParsedValue(type, s):
+ if s is None:
+ return None
+ return dispatch[type](s)
class Directive:
+ def __init__(self, **kw):
+ self.__dict__.update(kw)
+
def getName(self):
- return self.__class__.__name__
+ return self.name
+
+ def getValue(self):
+ return self.value
+
+ def getInfluences(self):
+ return self.influences
def set(self, value):
- if value is not None:
- self.value = dispatch[self.valtype](value)
- else:
- self.value = None
+ self.value = getParsedValue(self.valtype, value)
class EnvironmentDirective(Directive):
- type = 'env'
def activate(self):
- if self.value is not None:
- os.environ[self.influences]=str(self.value)
+ value = self.getValue()
+ influences = self.getInfluences()
+ if value is not None:
+ os.environ[influences]=str(value)
def deactivate(self):
- if os.environ.has_key(self.influences):
- del os.environ[self.influences]
+ influences = self.getInfluences()
+ if os.environ.has_key(influences):
+ del os.environ[influences]
class SwitchEnvironmentDirective(Directive):
- type='env_switch'
def activate(self):
- if self.value:
- os.environ[self.influences] = str(self.value)
+ value = self.getValue()
+ influences = self.getInfluences()
+ if value:
+ os.environ[influences] = str(value)
def deactivate(self):
- if os.environ.has_key(self.influences):
- del os.environ[self.influences]
+ influences = self.getInfluences()
+ if os.environ.has_key(influences):
+ del os.environ[influences]
class CommandLineDirective(Directive):
- type = 'cmd'
def activate(self):
# command directives are currently activated remotely
pass
@@ -58,6 +72,8 @@
# command directives are currently deactivated remotely
pass
+# handlers for specific directive types below
+
def pathHandler(s):
s = s.strip()
if s == '-':
@@ -101,16 +117,3 @@
'revonoff':reverseOnOffHandler,
}
-# these are used by the Directives module, don't remove them
-
-def absp(path):
- return os.path.abspath(os.path.normpath(path))
-
-pjoin = os.path.join
-psplit = os.path.split
-dirname = os.path.dirname
-
-ZOPE_HOME = dirname(dirname(dirname(dirname(sys.modules[__name__].__file__))))
-SOFTWARE_HOME = pjoin(ZOPE_HOME, 'lib', 'python')
-INSTANCE_HOME = os.getcwd()
-CLIENT_HOME = pjoin(INSTANCE_HOME, 'var')
=== Zope/lib/python/Controller/directives.csv 1.1.2.4 => 1.1.2.5 ===
--- Zope/lib/python/Controller/directives.csv:1.1.2.4 Mon Sep 2 03:35:09 2002
+++ Zope/lib/python/Controller/directives.csv Tue Sep 10 00:15:59 2002
@@ -1,65 +1,65 @@
-general zope_home The 'top-level' Zope software directory (home of the Zserver directory, the doc directory, the utilities directory, etc.) env path ZOPE_HOME The directory in which the 'zope.py' file (or other executable file used to start Zope) lives. ZOPE_HOME /home/chrism/software/Trunk
-general instance_home The path to the data files, local product files, import directory, and Extensions directory used by Zope. env path INSTANCE_HOME The current working directory when Zope is started. INSTANCE_HOME /home/chrism/projects/sessions
-general software_home The path to the majority of the Python software files used by Zope. One software_home can support many instance_homes. env path SOFTWARE_HOME ZOPE_HOME/lib/python SOFTWARE_HOME /home/chrism/software/Trunk/lib/python
-general client_home The directory in which a running Zope's process identifier files are placed. env path CLIENT_HOME INSTANCE_HOME/var CLIENT_HOME /home/chrism/projects/sessions/var
-general python_path Set the PYTHONPATH environment variable with the value of this directive. The PYTHONPATH represents a list of directories which are prefixed to the default list of directories searched by Python when it attempts to look up module names. See the Python documentation for more information on PYTHONPATH. It must be a colon-separated list of directory names. env string PYTHONPATH unset None /home/chrism/opt/Python-2.1.3:/usr/lib/python
-admin debug_mode If this directive is set to 'on', it causes the Zope process to not detach from the controlling terminal after it is run. It also influences the behavior of some Zope objects at runtime (for example, when debug mode is "on", you are able to view changes made to DTMLFile and PageTemplateFile objects immediately; When it is 'off', you must restart the server to see the changes. Additionally, event log and other log output will not be sent to the console when this directive is set to 'off'. Setting this to 'off' when Zope is in a production environment is encouraged, as it speeds execution. env_switch onoff Z_DEBUG_MODE on 1 on
-admin effective_user If you intend to run Zope as the "root" user, you must supply this directive with an effective username or userid number to which Zope will 'suid' after the server ports are bound. This directive only works under UNIX and if Zope is started as the root user. cmd string -u unset None chrism
-admin inhibit_product_installation If this directive is set, the 'product installation' step performed by Zope at startup is prevented. This can speed Zope startup time, but it can also cause your Control_Panel Product list to become desynchronized with the contents of your Products directories. If the 'zeo_client_name' directive is set, and this directive is unset, this directive will be implicitly turned on. By default, it is off. env_switch revonoff FORCE_PRODUCT_LOAD off 0 on
-admin locale Enable locale (internationalization) support by supplying a locale name to be used. See your operating system documentation for locale information specific to your system. If your Python module does not support the locale module, or if the requested locale is not supported by your system, an error will be raised and Zope will not start. cmd string -L unset None fr_FR
-admin number_of_threads Specify the number of threads that Zope will use to service requests. The default is 4. cmd int -t 4 None 10
-admin python_check_interval Specify an integer representing the Python interpreter "check interval" This interval determines how often the interpreter checks for perioding things such as thread switches and signal handlers. The Zope default is 500, but you may want to experiment with other values in order to attempt to increae performance in your particular environment. cmd int -i 500 500 1000
-admin use_daemon_process If this directive is set to 'on', Zope will be managed by a 'daemon' process which will restart the Zope process if it dies unexpectedly. cmd onoff -Z on 1 on
-admin zserver_read_only_mode If this directive is set to 'on', it will cause Zope to inhibit the creation of log files and pid files. Access and event log files will be presented on standard output. Setting this directive 'on' causes pcgi, fastcgi, and daemon-related directives to have no effect. cmd onoff -r off None on
-admin pid_filename The path to the file in which the Zope process id(s) will be written. This defaults to client_home/Z2.pid. cmd path special (admin) CLIENT_HOME/Z2.pid pjoin(client_home.value, 'Z2.pid') /home/chrism/projects/sessions/var/Z2.pid
-log acccess_syslog_facility Same as 'event_syslog_facility', only for the "access" log data (z2.log data). env string ZSYSLOG_ACCESS_FACILITY unset None local7
-log access_log_filename The file path of the Zope 'access' log (z2.log) which is written in the combined logfile format. The access log will be printed to standard output if the 'zserver_read_only' directive is set to 'on', regardless of this setting. cmd string -I CLIENT_HOME/z2.log pjoin(client_home.value, 'Z2.log') /home/chrism/projects/sessions/z2.log
-log access_syslog_path Same as event_syslog_path, only for the "access" log data (z2.log data). env path ZSYSLOG_ACCESS unset None /dev/log
-log access_syslog_server Same as event_syslog_path, only for the 'access' data (z2.log data). env string ZSYSLOG_ACCESS_SERVER unset None syslog.example.com:514
-log event_log_filename Path to the Zope event log for debugging information. env path EVENT_LOG_FILE standard output ('-') '' /home/chrism/projects/var/event.log
-log event_log_severity Filter events that can be written to the event log by priority. A higher priority means fewer events will be written. Choose one of (300, 200, 100, 0, -100, -200, or -300). Descriptions of the integer levels are as follows: 300=PANIC, 200=ERROR, 100=WARNING, 0=INFO, -100=BLATHER, -200=DEBUG, -300=TRACE). env int EVENT_LOG_SEVERITY 0 0 100
-log event_syslog_facility The facility used when the event log is being written to syslog (when 'event_syslog_path' or 'event_syslog_server' is set). env string ZSYSLOG_FACILITY user None local7
-log event_syslog_path Setting this directive will cause Zope to write the event log to syslog on the named UNIX domain socket on the local host. This only works on UNIX. It is overridden by specifying 'event_syslog_server'. env path ZSYSLOG unset None /dev/log
-log event_syslog_server Specify a machine and udp port to send event data to over syslog. The format of this directive should be 'machine_name:port'. env string ZSYSLOG_SERVER unset None syslog.example.com:514
-log trace_log_filename The file path of the Zope 'trace' log which contains detailed request information which can later be interpreted by the requestprofiler.py script in the utilities directory. cmd string -M unset None /home/chrism/projects/sessions/trace.log
-misc default_structured_text_header_level Set the default starting HTML header level for structured text documents. The default is 3, which implies that top-level headers will be created with an <H3> tag. env int STX_DEFAULT_LEVEL 3 3 1
-misc maximum_security_manager_stack_size This variable allows you to customize the size of the Zope SecurityManager stack. You shouldn't change this unless you know what it means. env int Z_MAX_STACK_SIZE 100 100 200
-misc publisher_profile_file Causing this directive to point to a file on the filesystem will cause Zope's profiling capabilities to be enabled. For more information, see the Debug -> Profiling tab of the Control_Panel. env path PROFILE_PUBLISHER unset None /home/chrism/projects/sessions/var/profile.dat
-misc webdav_source_user_agents Setting this directive enabls the retrieval of the *source* of Zope documents through the standard HTTP port instead of via a WebDAV source port (which are enabled via the 'webdav_source_server_ports' directive). The value should be a regular expression that is matched against the user-agent string of the client. Only clients which have a user-agent which match this regex will obain the source of the document via DAV on the normal HTTP port. env string WEBDAV_SOURCE_PORT_CLIENTS unset None cadaver.*
-network dns_server_address Specify the ip address of your DNS server in order to cause resolved hostnames to be written to Zope's access log. By default, Zope will not resolve hostnames unless this is set. cmd string -d unset None 127.0.0.1
-network ip_address The IP address on which Zope's various server protocol iimplementations will listen for requests. If this is unset, Zope will listen on all IP addresses supported by the machine. cmd string -a unset None 127.0.0.1
-protocol default_http_realm The HTTP "Realm" header value sent by this Zope instance. This value often shows up in basic authentication dialogs. env string Z_REALM Zope 'Zope' Slipknot
-protocol fastcgi_resource_path_or_port Either a path (for unix domain sockets) or port number (for inet sockets) for the FastCGI server. cmd string -F unset None /home/chrism/projects/sessions/fastcgi.soc
-protocol force_http_connection_close If set to on, this directive causes Zope to close all HTTP connections regardless of the 'Connection:' header (or lack thereof) specified by the client. cmd onoff -C off 0 on
-protocol http_server_ports A space-separated list of TCP port numbers on which Zope will listen for HTTP requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". cmd stringlist -w 8080 [8080] 8080 80 1.2.3.4:80
-protocol ftp_server_ports A space-separated list of TCP port numbers on which Zope will listen for FTP requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". cmd stringlist -f 8021 [8021] 8021 21 1.2.3.4:21
-protocol icp_server_ports A space-separated list of TCP port numbers on which Zope will listen for ICP requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". cmd stringlist --icp unset None 3130 1.2.3.4:3130
-protocol monitor_server_ports A space-separated list of TCP port numbers on which Zope will listen for Medusa monitor requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". Connections to a medusa monitor port using the medusa monitor client allow a developer to remotely debug a running Zope. It is dangerous to enable this for this reason. cmd stringlist -m unset None 8090 90 1.2.3.4:90
-protocol webdav_source_server_ports A space-separated list of TCP port numbers on which Zope will listen for HTTP/WebDAV 'source' requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". The source of the Zope object requested will be returned when requests are made to this set of ports, as opposed to the rendered version which is returned when the normal HTTP port is consulted. cmd stringlist -W 9800 [9800] 9800 9801
-protocol pcgi_resource_path Path to the PCGI 'resource' file. If the directive is left unset or the file doesn't exist, PCGI is disabled. cmd path -p unset None /home/chrism/projects/sessions/Zope.cgi
-security automatically_quote_dtml_request_data Set this directive to 'off' in order to disable the autoquoting of implicitly retrieved REQUEST data by DTML code which contains a '<' when used in <dtml-var> construction. When this directive is 'on', all data implicitly retrieved from the REQUEST in DTML (as opposed to addressing REQUEST.somevarname directly) that contains a '<' will be HTML-quoted when interpolated via a <dtml-var> or &dtml- construct. This mitigates the possibility that DTML programmers will leave their sites open to a "client-side trojan" attack. env onoff ZOPE_DTML_REQUEST_AUTOQUOTE on 1 on
-security skip_authentication_checking Set this directive to 'on' to cause Zope to allow unauthenticated access to all resources. DANGEROUS. Only works if security_policy_implementation is C env_switch onoff ZSP_AUTHENTICATED_SKIP off None on
-security skip_ownership_checking Set this directive to 'on' to cause Zope to ignore ownership checking when attempting to execute "through the web" code. By default, this directive is on in order to prevent 'trojan horse' security problems whereby a user with less privilege can cause a user with more privilege to execute dangerous code. env_switch onoff ZSP_OWNEROUS_SKIP off None on
-security security_policy_implementation Set this directive to 'PYTHON' to use a pure-Python implementation of Zope's default security policy. The default value for this directive is 'C". Setting it to PYTHON causes Zope to run more slowly, but it can be helpful when attempting to debug security-related application failures. env string ZOPE_SECURITY_POLICY C 'C' PYTHON
-sessions maximum_number_of_session_objects An integer value representing the number of items to use as a "maximum number of subobjects" value of the '/temp_folder/session_data' transient object container. env int ZSESSION_OBJECT_LIMIT 1000 1000 10000
-sessions session_add_notify_script_path An optional fill Zope path name of a callable object to be set as the "script to call on object addition" of the sessioN_data transient object container created in the /temp_folder folder at startup. env path ZSESSION_ADD_NOTIFY unset None /scripts/add_notifier
-sessions session_delete_notify_script_path An optional fill Zope path name of a callable object to be set as the "script to call on object deletion" of the sessioN_data transient object container created in the /temp_folder folder at startup. env path ZSESSION_DEL_NOTIFY unset None /scripts/del_notifier
-sessions session_timeout_minutes An integer value representing the number of minutes to be used as the "data object timeout" of the '/temp_folder/session_data' transient object container. env int ZSESSION_TIMEOUT_MINS 20 20 30
-url suppress_all_access_rules If this directive is set to on, no access rules in your Zope site will be executed. This is useful if you "lock yourself out" of a particular part of your site by setting an improper access rule. env_switch onoff SUPPRESS_ACCESRULE off None on
-url suppress_all_site_roots If this directive is set to on, no site roots in your Zope site will be effective. This is useful if you "lock yourself out" of a particular part of your site by setting an improper site root. env_switch onoff SUPPRESS_SITEROOT off None on
-zodb zodb_filestorage_filepath Provide an absolute file path to the file which should be used as the default ZODB FileStorage. If you leave this unset, it will default to INSTANCE_HOME/var/Data.fs. cmd path special (custom_zodb.py) INSTANCE_HOME/var/Data.fs pjoin(instance_home.value, 'var', 'Data.fs') /home/chrism/somedirectory/Data.fs
-zodb zodb_db_cache_size The target number of objects that will be stored in the local ZODB "pickle cache" (as per the Control_Panel -> Database tab). The default is 5000. cmd int special (custom_zodb.py) 5000 5000
-zodb zodb_db_pool_size The number of ZODB database connections used by a ZODB.DB instance. The default is 7. cmd int special (custom_zodb.py) 7 7
-zodb database_quota_size Set this directive to an integer in bytes in order to place a hard limit on the size which the default FileStorage-backed Zope database can grow. Additions to the database will not be permitted once this filesize is exceeded. env int ZOPE_DATABASE_QUOTA unset None 1000000
-zodb read_only_database This causes the main Zope FileStorage-backed ZODB to be opened in read-only mode. env_switch onoff ZOPE_READ_ONLY off 0 on
-zodb use_zeo_server Specifying this option will cause Zope to use a ZEO server to obtain ZODB data instead of the 'default' FileStorage specified via 'zodb_filestorage_filepath'. You must install the ZEO software before using this directive successfully. cmd onoff special (custom_zodb.py) off 0 on
-zodb zeo_client_name Provide a string value to uniquely identify the local cache files created if this Zope is a ZEO client. Setting this directive implies setting 'inhibit_product_installation' to 'on' if 'inhibit_product_installation' is left unset. env string ZEO_CLIENT unset None zeo1
-zodb zeo_storage_server_hostname Provide a an IP address or hostname to specify a ZEO server which serves the "main" ZODB database for this Zope instance. This directive will be ignored if you use a filepath for 'zeo_storage_server_path_or_port' (localhost is assumed in this case). cmd string special (custom_zodb.py) unset None storage.zope.com
-zodb zeo_storage_server_path_or_port Specify either a TCP port number (e.g. 2199) or a UNIX domain socket filename (e.g. /home/chrism/zeo.soc) to use as an argument to the ZEO ClientStorage constructor. If you specify a TCP port number, you must have also specified a storage server name via 'zeo_storage_server_name'. cmd string special (custom_zodb.py) unset None /home/chrism/zope/var/zeo.soc or 2199
-zodb zeo_storage_server_storagename Specifies a "storage name" to use under a ZEO-backed configuration. The "typical" storage name is "1" (this is what ZEO defaults to when it serves only one storage). cmd string special (custom_zodb.py) unset '1' 1 or Main
-zodb zeo_client_cache_size Specifies the size in bytes allocated to the ZEO client disk cache. The default is 200,000,000 (200MB) bytes if this is left unset. cmd int special (custom_zodb.py) unset 200000000 20000000
-zodb zeo_client_debug If this is set to "on", the ZEO ClientStorage will output debugging information to the event log. cmd onoff special (custom_zodb.py) off 0 on
-zodb zeo_client_cache_directory Specify a directory in which the ZEO client cache files should be stored. Defaults to INSTANCE_HOME/var. cmd onoff special (custom_zodb.py) INSTANCE_HOME/var/ client_home.value /home/chrism/projects/sessions/var
-zodb zeo_client_min_disconnect_poll The minimum number of seconds that a ClientStorage will wait before retrying a connection after a failure. The default is 5 if this is left unset. cmd int special (custom_zodb.py) 5 5 10
-zodb zeo_client_max_disconnect_poll The maximum number of seconds that a ClientStorage will wait before retrying a connection after a failure. The default is 300 if this is left unset. cmd int special (custom_zodb.py) 300 300 300
-zodb zeo_client_wait_for_server_on_startup If this is set to "on", the ZEO ClientStorage will wait for a connection to its storage before serving data. If this is set to "off", the ZEO ClientStorage will attempt to serve data out of its cache file at startup even if it cannot make a connection to a storage server. cmd onoff special (custom_zodb.py) off 0 on
+general 0 zope_home The 'top-level' Zope software directory (home of the Zserver directory, the doc directory, the utilities directory, etc.) env path ZOPE_HOME The directory in which the 'zope.py' file (or other executable file used to start Zope) lives. ZOPE_HOME /home/chrism/software/Trunk
+general 1 instance_home The path to the data files, local product files, import directory, and Extensions directory used by Zope. env path INSTANCE_HOME The current working directory when Zope is started. INSTANCE_HOME /home/chrism/projects/sessions
+general 2 software_home The path to the majority of the Python software files used by Zope. One software_home can support many instance_homes. env path SOFTWARE_HOME ZOPE_HOME/lib/python SOFTWARE_HOME /home/chrism/software/Trunk/lib/python
+general 3 client_home The directory in which a running Zope's process identifier files are placed. env path CLIENT_HOME INSTANCE_HOME/var CLIENT_HOME /home/chrism/projects/sessions/var
+general 4 python_path Set the PYTHONPATH environment variable with the value of this directive. The PYTHONPATH represents a list of directories which are prefixed to the default list of directories searched by Python when it attempts to look up module names. See the Python documentation for more information on PYTHONPATH. It must be a colon-separated list of directory names. env string PYTHONPATH unset None /home/chrism/opt/Python-2.1.3:/usr/lib/python
+admin 5 debug_mode If this directive is set to 'on', it causes the Zope process to not detach from the controlling terminal after it is run. It also influences the behavior of some Zope objects at runtime (for example, when debug mode is "on", you are able to view changes made to DTMLFile and PageTemplateFile objects immediately; When it is 'off', you must restart the server to see the changes. Additionally, event log and other log output will not be sent to the console when this directive is set to 'off'. Setting this to 'off' when Zope is in a production environment is encouraged, as it speeds execution. env_switch onoff Z_DEBUG_MODE on 1 on
+admin 6 effective_user If you intend to run Zope as the "root" user, you must supply this directive with an effective username or userid number to which Zope will 'suid' after the server ports are bound. This directive only works under UNIX and if Zope is started as the root user. cmd string -u unset None chrism
+admin 7 inhibit_product_installation If this directive is set, the 'product installation' step performed by Zope at startup is prevented. This can speed Zope startup time, but it can also cause your Control_Panel Product list to become desynchronized with the contents of your Products directories. If the 'zeo_client_name' directive is set, and this directive is unset, this directive will be implicitly turned on. By default, it is off. env_switch revonoff FORCE_PRODUCT_LOAD off 0 on
+admin 8 locale Enable locale (internationalization) support by supplying a locale name to be used. See your operating system documentation for locale information specific to your system. If your Python module does not support the locale module, or if the requested locale is not supported by your system, an error will be raised and Zope will not start. cmd string -L unset None fr_FR
+admin 9 number_of_threads Specify the number of threads that Zope will use to service requests. The default is 4. cmd int -t 4 None 10
+admin 10 python_check_interval Specify an integer representing the Python interpreter "check interval" This interval determines how often the interpreter checks for perioding things such as thread switches and signal handlers. The Zope default is 500, but you may want to experiment with other values in order to attempt to increae performance in your particular environment. cmd int -i 500 500 1000
+admin 11 use_daemon_process If this directive is set to 'on', Zope will be managed by a 'daemon' process which will restart the Zope process if it dies unexpectedly. cmd onoff -Z on 1 on
+admin 12 zserver_read_only_mode If this directive is set to 'on', it will cause Zope to inhibit the creation of log files and pid files. Access and event log files will be presented on standard output. Setting this directive 'on' causes pcgi, fastcgi, and daemon-related directives to have no effect. cmd onoff -r off None on
+admin 13 pid_filename The path to the file in which the Zope process id(s) will be written. This defaults to client_home/Z2.pid. cmd path special (admin) CLIENT_HOME/Z2.pid pjoin(reg_get('client_home'), 'Z2.pid') /home/chrism/projects/sessions/var/Z2.pid
+log 14 acccess_syslog_facility Same as 'event_syslog_facility', only for the "access" log data (z2.log data). env string ZSYSLOG_ACCESS_FACILITY unset None local7
+log 15 access_log_filename The file path of the Zope 'access' log (z2.log) which is written in the combined logfile format. The access log will be printed to standard output if the 'zserver_read_only' directive is set to 'on', regardless of this setting. cmd string -I CLIENT_HOME/z2.log pjoin(reg_get('client_home'), 'Z2.log') /home/chrism/projects/sessions/z2.log
+log 16 access_syslog_path Same as event_syslog_path, only for the "access" log data (z2.log data). env path ZSYSLOG_ACCESS unset None /dev/log
+log 17 access_syslog_server Same as event_syslog_path, only for the 'access' data (z2.log data). env string ZSYSLOG_ACCESS_SERVER unset None syslog.example.com:514
+log 18 event_log_filename Path to the Zope event log for debugging information. env path EVENT_LOG_FILE standard output ('-') '' /home/chrism/projects/var/event.log
+log 19 event_log_severity Filter events that can be written to the event log by priority. A higher priority means fewer events will be written. Choose one of (300, 200, 100, 0, -100, -200, or -300). Descriptions of the integer levels are as follows: 300=PANIC, 200=ERROR, 100=WARNING, 0=INFO, -100=BLATHER, -200=DEBUG, -300=TRACE). env int EVENT_LOG_SEVERITY 0 0 100
+log 20 event_syslog_facility The facility used when the event log is being written to syslog (when 'event_syslog_path' or 'event_syslog_server' is set). env string ZSYSLOG_FACILITY user None local7
+log 21 event_syslog_path Setting this directive will cause Zope to write the event log to syslog on the named UNIX domain socket on the local host. This only works on UNIX. It is overridden by specifying 'event_syslog_server'. env path ZSYSLOG unset None /dev/log
+log 22 event_syslog_server Specify a machine and udp port to send event data to over syslog. The format of this directive should be 'machine_name:port'. env string ZSYSLOG_SERVER unset None syslog.example.com:514
+log 23 trace_log_filename The file path of the Zope 'trace' log which contains detailed request information which can later be interpreted by the requestprofiler.py script in the utilities directory. cmd string -M unset None /home/chrism/projects/sessions/trace.log
+misc 24 default_structured_text_header_level Set the default starting HTML header level for structured text documents. The default is 3, which implies that top-level headers will be created with an <H3> tag. env int STX_DEFAULT_LEVEL 3 3 1
+misc 25 maximum_security_manager_stack_size This variable allows you to customize the size of the Zope SecurityManager stack. You shouldn't change this unless you know what it means. env int Z_MAX_STACK_SIZE 100 100 200
+misc 26 publisher_profile_file Causing this directive to point to a file on the filesystem will cause Zope's profiling capabilities to be enabled. For more information, see the Debug -> Profiling tab of the Control_Panel. env path PROFILE_PUBLISHER unset None /home/chrism/projects/sessions/var/profile.dat
+misc 27 webdav_source_user_agents Setting this directive enabls the retrieval of the *source* of Zope documents through the standard HTTP port instead of via a WebDAV source port (which are enabled via the 'webdav_source_server_ports' directive). The value should be a regular expression that is matched against the user-agent string of the client. Only clients which have a user-agent which match this regex will obain the source of the document via DAV on the normal HTTP port. env string WEBDAV_SOURCE_PORT_CLIENTS unset None cadaver.*
+network 28 dns_server_address Specify the ip address of your DNS server in order to cause resolved hostnames to be written to Zope's access log. By default, Zope will not resolve hostnames unless this is set. cmd string -d unset None 127.0.0.1
+network 29 ip_address The IP address on which Zope's various server protocol iimplementations will listen for requests. If this is unset, Zope will listen on all IP addresses supported by the machine. cmd string -a unset None 127.0.0.1
+protocol 30 default_http_realm The HTTP "Realm" header value sent by this Zope instance. This value often shows up in basic authentication dialogs. env string Z_REALM Zope 'Zope' Slipknot
+protocol 31 fastcgi_resource_path_or_port Either a path (for unix domain sockets) or port number (for inet sockets) for the FastCGI server. cmd string -F unset None /home/chrism/projects/sessions/fastcgi.soc
+protocol 32 force_http_connection_close If set to on, this directive causes Zope to close all HTTP connections regardless of the 'Connection:' header (or lack thereof) specified by the client. cmd onoff -C off 0 on
+protocol 33 http_server_ports A space-separated list of TCP port numbers on which Zope will listen for HTTP requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". cmd stringlist -w 8080 [8080] 8080 80 1.2.3.4:80
+protocol 34 ftp_server_ports A space-separated list of TCP port numbers on which Zope will listen for FTP requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". cmd stringlist -f 8021 [8021] 8021 21 1.2.3.4:21
+protocol 35 icp_server_ports A space-separated list of TCP port numbers on which Zope will listen for ICP requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". cmd stringlist --icp unset None 3130 1.2.3.4:3130
+protocol 36 monitor_server_ports A space-separated list of TCP port numbers on which Zope will listen for Medusa monitor requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". Connections to a medusa monitor port using the medusa monitor client allow a developer to remotely debug a running Zope. It is dangerous to enable this for this reason. cmd stringlist -m unset None 8090 90 1.2.3.4:90
+protocol 37 webdav_source_server_ports A space-separated list of TCP port numbers on which Zope will listen for HTTP/WebDAV 'source' requests. Any value in the list may also be an IP addresses/port number specification in the form "an.ip.address:portnum". The source of the Zope object requested will be returned when requests are made to this set of ports, as opposed to the rendered version which is returned when the normal HTTP port is consulted. cmd stringlist -W 9800 [9800] 9800 9801
+protocol 38 pcgi_resource_path Path to the PCGI 'resource' file. If the directive is left unset or the file doesn't exist, PCGI is disabled. cmd path -p unset None /home/chrism/projects/sessions/Zope.cgi
+security 39 automatically_quote_dtml_request_data Set this directive to 'off' in order to disable the autoquoting of implicitly retrieved REQUEST data by DTML code which contains a '<' when used in <dtml-var> construction. When this directive is 'on', all data implicitly retrieved from the REQUEST in DTML (as opposed to addressing REQUEST.somevarname directly) that contains a '<' will be HTML-quoted when interpolated via a <dtml-var> or &dtml- construct. This mitigates the possibility that DTML programmers will leave their sites open to a "client-side trojan" attack. env onoff ZOPE_DTML_REQUEST_AUTOQUOTE on 1 on
+security 40 skip_authentication_checking Set this directive to 'on' to cause Zope to allow unauthenticated access to all resources. DANGEROUS. Only works if security_policy_implementation is C env_switch onoff ZSP_AUTHENTICATED_SKIP off None on
+security 41 skip_ownership_checking Set this directive to 'on' to cause Zope to ignore ownership checking when attempting to execute "through the web" code. By default, this directive is on in order to prevent 'trojan horse' security problems whereby a user with less privilege can cause a user with more privilege to execute dangerous code. env_switch onoff ZSP_OWNEROUS_SKIP off None on
+security 42 security_policy_implementation Set this directive to 'PYTHON' to use a pure-Python implementation of Zope's default security policy. The default value for this directive is 'C". Setting it to PYTHON causes Zope to run more slowly, but it can be helpful when attempting to debug security-related application failures. env string ZOPE_SECURITY_POLICY C 'C' PYTHON
+sessions 43 maximum_number_of_session_objects An integer value representing the number of items to use as a "maximum number of subobjects" value of the '/temp_folder/session_data' transient object container. env int ZSESSION_OBJECT_LIMIT 1000 1000 10000
+sessions 44 session_add_notify_script_path An optional fill Zope path name of a callable object to be set as the "script to call on object addition" of the sessioN_data transient object container created in the /temp_folder folder at startup. env path ZSESSION_ADD_NOTIFY unset None /scripts/add_notifier
+sessions 45 session_delete_notify_script_path An optional fill Zope path name of a callable object to be set as the "script to call on object deletion" of the sessioN_data transient object container created in the /temp_folder folder at startup. env path ZSESSION_DEL_NOTIFY unset None /scripts/del_notifier
+sessions 46 session_timeout_minutes An integer value representing the number of minutes to be used as the "data object timeout" of the '/temp_folder/session_data' transient object container. env int ZSESSION_TIMEOUT_MINS 20 20 30
+url 47 suppress_all_access_rules If this directive is set to on, no access rules in your Zope site will be executed. This is useful if you "lock yourself out" of a particular part of your site by setting an improper access rule. env_switch onoff SUPPRESS_ACCESRULE off None on
+url 48 suppress_all_site_roots If this directive is set to on, no site roots in your Zope site will be effective. This is useful if you "lock yourself out" of a particular part of your site by setting an improper site root. env_switch onoff SUPPRESS_SITEROOT off None on
+zodb 49 zodb_filestorage_filepath Provide an absolute file path to the file which should be used as the default ZODB FileStorage. If you leave this unset, it will default to INSTANCE_HOME/var/Data.fs. cmd path special (custom_zodb.py) CLIENT_HOME/Data.fs pjoin(reg_get('client_home'), 'Data.fs') /home/chrism/somedirectory/Data.fs
+zodb 50 zodb_db_cache_size The target number of objects that will be stored in the local ZODB "pickle cache" (as per the Control_Panel -> Database tab). The default is 5000. cmd int special (custom_zodb.py) 5000 5000
+zodb 51 zodb_db_pool_size The number of ZODB database connections used by a ZODB.DB instance. The default is 7. cmd int special (custom_zodb.py) 7 7
+zodb 52 database_quota_size Set this directive to an integer in bytes in order to place a hard limit on the size which the default FileStorage-backed Zope database can grow. Additions to the database will not be permitted once this filesize is exceeded. env int ZOPE_DATABASE_QUOTA unset None 1000000
+zodb 53 read_only_database This causes the main Zope FileStorage-backed ZODB to be opened in read-only mode. env_switch onoff ZOPE_READ_ONLY off 0 on
+zodb 54 use_zeo_server Specifying this option will cause Zope to use a ZEO server to obtain ZODB data instead of the 'default' FileStorage specified via 'zodb_filestorage_filepath'. You must install the ZEO software before using this directive successfully. cmd onoff special (custom_zodb.py) off 0 on
+zodb 55 zeo_client_name Provide a string value to uniquely identify the local cache files created if this Zope is a ZEO client. Setting this directive implies setting 'inhibit_product_installation' to 'on' if 'inhibit_product_installation' is left unset. env string ZEO_CLIENT unset None zeo1
+zodb 56 zeo_storage_server_hostname Provide a an IP address or hostname to specify a ZEO server which serves the "main" ZODB database for this Zope instance. This directive will be ignored if you use a filepath for 'zeo_storage_server_path_or_port' (localhost is assumed in this case). cmd string special (custom_zodb.py) unset None storage.zope.com
+zodb 57 zeo_storage_server_path_or_port Specify either a TCP port number (e.g. 2199) or a UNIX domain socket filename (e.g. /home/chrism/zeo.soc) to use as an argument to the ZEO ClientStorage constructor. If you specify a TCP port number, you must have also specified a storage server name via 'zeo_storage_server_name'. cmd string special (custom_zodb.py) unset None /home/chrism/zope/var/zeo.soc or 2199
+zodb 58 zeo_storage_server_storagename Specifies a "storage name" to use under a ZEO-backed configuration. The "typical" storage name is "1" (this is what ZEO defaults to when it serves only one storage). cmd string special (custom_zodb.py) unset '1' 1 or Main
+zodb 59 zeo_client_cache_size Specifies the size in bytes allocated to the ZEO client disk cache. The default is 200,000,000 (200MB) bytes if this is left unset. cmd int special (custom_zodb.py) unset 200000000 20000000
+zodb 60 zeo_client_debug If this is set to "on", the ZEO ClientStorage will output debugging information to the event log. cmd onoff special (custom_zodb.py) off 0 on
+zodb 61 zeo_client_cache_directory Specify a directory in which the ZEO client cache files should be stored. Defaults to INSTANCE_HOME/var. cmd onoff special (custom_zodb.py) INSTANCE_HOME/var/ reg_get('client_home') /home/chrism/projects/sessions/var
+zodb 62 zeo_client_min_disconnect_poll The minimum number of seconds that a ClientStorage will wait before retrying a connection after a failure. The default is 5 if this is left unset. cmd int special (custom_zodb.py) 5 5 10
+zodb 63 zeo_client_max_disconnect_poll The maximum number of seconds that a ClientStorage will wait before retrying a connection after a failure. The default is 300 if this is left unset. cmd int special (custom_zodb.py) 300 300 300
+zodb 64 zeo_client_wait_for_server_on_startup If this is set to "on", the ZEO ClientStorage will wait for a connection to its storage before serving data. If this is set to "off", the ZEO ClientStorage will attempt to serve data out of its cache file at startup even if it cannot make a connection to a storage server. cmd onoff special (custom_zodb.py) off 0 on
=== Zope/lib/python/Controller/directives.gnumeric 1.1.2.1 => 1.1.2.2 ===
=== Removed File Zope/lib/python/Controller/makedirectives.py ===