[Zodb-checkins] CVS: ZODB3/ZODB - config.py:1.3 config.xml:1.3

Jeremy Hylton jeremy@zope.com
Mon, 6 Jan 2003 17:42:51 -0500


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv27907/ZODB

Modified Files:
	config.py config.xml 
Log Message:
Finish configuration for DemoStorage.

There's now concrete test of recursively defined section types.


=== ZODB3/ZODB/config.py 1.2 => 1.3 ===
--- ZODB3/ZODB/config.py:1.2	Fri Jan  3 16:19:06 2003
+++ ZODB3/ZODB/config.py	Mon Jan  6 17:42:17 2003
@@ -63,6 +63,18 @@
         from ZODB.MappingStorage import MappingStorage
         return MappingStorage(self.config.name)
 
+class DemoStorage(StorageConfig):
+
+    def open(self):
+        from ZODB.DemoStorage import DemoStorage
+        if self.config.base:
+            base = self.config.base.open()
+        else:
+            base = None
+        return DemoStorage(self.config.name,
+                           base=base,
+                           quota=self.config.quota)
+
 class FileStorage(StorageConfig):
 
     def open(self):


=== ZODB3/ZODB/config.xml 1.2 => 1.3 ===
--- ZODB3/ZODB/config.xml:1.2	Fri Jan  3 16:19:06 2003
+++ ZODB3/ZODB/config.xml	Mon Jan  6 17:42:17 2003
@@ -56,8 +56,7 @@
       <key name="read_only_fallback" datatype="boolean" default="off"/>
     </sectiontype>
 
-    <sectiontype type="demostorage">
-      <!--datatype="ZODB.config.DemoStorage"-->
+    <sectiontype type="demostorage" datatype="ZODB.config.DemoStorage">
       <key name="name" default="Demo Storage"/>
       <section type="storage" name="*" attribute="base"/>
       <key name="quota" datatype="integer"/>