[Zodb-checkins] CVS: ZODB3/ZEO - runsvr.py:1.28 schema.xml:1.6

Guido van Rossum guido@python.org
Thu, 9 Jan 2003 17:12:35 -0500


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv30382

Modified Files:
	runsvr.py schema.xml 
Log Message:
Move the ZEO parameters into a <zeo> section.


=== ZODB3/ZEO/runsvr.py 1.27 => 1.28 ===
--- ZODB3/ZEO/runsvr.py:1.27	Thu Jan  9 16:50:18 2003
+++ ZODB3/ZEO/runsvr.py	Thu Jan  9 17:12:02 2003
@@ -120,14 +120,18 @@
         """
         self.load_configuration()
 
+    def load_schema(self):
+        here = os.path.dirname(ZEO.__file__)
+        schemafile = os.path.join(here, "schema.xml")
+        self.schema = ZConfig.loadSchema(schemafile)
+
     def load_configuration(self):
         if not self.configuration:
             return
-        here = os.path.dirname(ZEO.__file__)
-        schemafile = os.path.join(here, "schema.xml")
-        schema = ZConfig.loadSchema(schemafile)
+        self.load_schema()
         try:
-            self.rootconf = ZConfig.loadConfig(schema, self.configuration)[0]
+            self.rootconf, nil = ZConfig.loadConfig(self.schema,
+                                                    self.configuration)
         except ZConfig.ConfigurationError, errobj:
             self.usage(str(errobj))
 
@@ -253,12 +257,12 @@
     def load_zeoconf(self):
         # Get some option values from the configuration
         if self.family is None:
-            self.family = self.rootconf.address.family
-            self.address = self.rootconf.address.address
+            self.family = self.rootconf.zeo.address.family
+            self.address = self.rootconf.zeo.address.address
 
-        self.read_only = self.rootconf.read_only
-        self.transaction_timeout = self.rootconf.transaction_timeout
-        self.invalidation_queue_size = 100
+        self.read_only = self.rootconf.zeo.read_only
+        self.transaction_timeout = self.rootconf.zeo.transaction_timeout
+        self.invalidation_queue_size = self.rootconf.zeo.invalidation_queue_size
 
     def load_logconf(self):
         # Get logging options from conf, unless overridden by environment


=== ZODB3/ZEO/schema.xml 1.5 => 1.6 ===
--- ZODB3/ZEO/schema.xml:1.5	Thu Jan  9 16:50:18 2003
+++ ZODB3/ZEO/schema.xml	Thu Jan  9 17:12:02 2003
@@ -1,4 +1,4 @@
-<schema type="ZEO">
+<schema>
 
   <!-- XXX This schema still needs logging support. -->
 
@@ -10,53 +10,59 @@
   <!-- Use the storage types defined by ZODB. -->
   <import src="../ZODB/config.xml"/>
 
-  <key name="address" datatype="socket-address"
-       required="yes">
-    <description>
-      The address at which the server should listen.  This can be in
-      the form 'host:port' to signify a TCP/IP connection or a
-      pathname string to signify a Unix domain socket connection (at
-      least one '/' is required).  A hostname may be a DNS name or a
-      dotted IP address.  If the hostname is omitted, the platform's
-      default behavior is used when binding the listening socket (''
-      is passed to socket.bind() as the hostname portion of the
-      address).
-    </description>
-  </key>
-
-  <key name="read-only" datatype="boolean"
-       required="no"
-       default="false">
-    <description>
-      Flag indicating whether the server should operate in read-only
-      mode.  Defaults to false.  Note that even if the server is
-      operating in writable mode, individual storages may still be
-      read-only.  But if the server is in read-only mode, no write
-      operations are allowed, even if the storages are writable.  Note
-      that pack() is considered a read-only operation.
-    </description>
-  </key>
-
-  <key name="invalidation-queue-size" datatype="integer"
-       required="no"
-       default="100">
-    <description>
-      The storage server keeps a queue of the objects modified by the
-      last N transactions, where N == invalidation_queue_size.  This
-      queue is used to speed client cache verification when a client
-      disconnects for a short period of time.
-    </description>
-  </key>
-
-  <key name="transaction-timeout" datatype="integer"
-       required="no">
-    <description>
-      The maximum amount of time to wait for a transaction to commit
-      after acquiring the storage lock, specified in seconds.  If the
-      transaction takes too long, the client connection will be closed
-      and the transaction aborted.
-    </description>
-  </key>
+  <sectiontype name="zeo">
+
+    <key name="address" datatype="socket-address"
+	 required="yes">
+      <description>
+	The address at which the server should listen.  This can be in
+	the form 'host:port' to signify a TCP/IP connection or a
+	pathname string to signify a Unix domain socket connection (at
+	least one '/' is required).  A hostname may be a DNS name or a
+	dotted IP address.  If the hostname is omitted, the platform's
+	default behavior is used when binding the listening socket (''
+	is passed to socket.bind() as the hostname portion of the
+	address).
+      </description>
+    </key>
+
+    <key name="read-only" datatype="boolean"
+	 required="no"
+	 default="false">
+      <description>
+	Flag indicating whether the server should operate in read-only
+	mode.  Defaults to false.  Note that even if the server is
+	operating in writable mode, individual storages may still be
+	read-only.  But if the server is in read-only mode, no write
+	operations are allowed, even if the storages are writable.  Note
+	that pack() is considered a read-only operation.
+      </description>
+    </key>
+
+    <key name="invalidation-queue-size" datatype="integer"
+	 required="no"
+	 default="100">
+      <description>
+	The storage server keeps a queue of the objects modified by the
+	last N transactions, where N == invalidation_queue_size.  This
+	queue is used to speed client cache verification when a client
+	disconnects for a short period of time.
+      </description>
+    </key>
+
+    <key name="transaction-timeout" datatype="integer"
+	 required="no">
+      <description>
+	The maximum amount of time to wait for a transaction to commit
+	after acquiring the storage lock, specified in seconds.  If the
+	transaction takes too long, the client connection will be closed
+	and the transaction aborted.
+      </description>
+    </key>
+
+  </sectiontype>
+
+  <section type="zeo" name="*" required="yes" attribute="zeo" />
 
   <key name="monitor-address" datatype="socket-address" required="no">
     <description>