[Zodb-checkins] CVS: ZODB3/ZODB - component.xml:1.1 config.py:1.7 config.xml:1.5
Fred L. Drake, Jr.
fred@zope.com
Fri, 10 Jan 2003 01:45:23 -0500
Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv17477/ZODB
Modified Files:
config.py config.xml
Added Files:
component.xml
Log Message:
Reorganize the schema support so we can actually use the revised component
import to load the database and storage types.
=== Added File ZODB3/ZODB/component.xml ===
<component prefix="ZODB.config">
<!-- XXX needs descriptions for everything -->
<abstracttype name="storage"/>
<abstracttype name="database"/>
<sectiontype name="filestorage" datatype=".FileStorage"
implements="storage">
<key name="path" required="yes"/>
<key name="create" datatype="boolean" default="true"/>
<key name="read-only" datatype="boolean" default="false"/>
<key name="stop"/>
<key name="quota" datatype="integer"/>
</sectiontype>
<sectiontype name="mappingstorage" datatype=".MappingStorage"
implements="storage">
<key name="name" default="Mapping Storage"/>
</sectiontype>
<sectiontype name="fullstorage" datatype=".BDBStorage"
implements="storage">
<key name="name" required="yes" />
<key name="interval" datatype="time-interval" default="2m" />
<key name="kbyte" datatype="integer" default="0" />
<key name="min" datatype="integer" default="0" />
<key name="logdir" />
<key name="cachesize" datatype="byte-size" default="128MB" />
<key name="frequency" datatype="time-interval" default="0" />
<key name="packtime" datatype="time-interval" default="4h" />
<key name="classicpack" datatype="integer" default="0" />
<key name="read-only" datatype="boolean" default="off"/>
</sectiontype>
<!-- XXX Fred promises to make it so minimal storage is just an
extension of fullstorage -->
<sectiontype name="minimalstorage" datatype=".BDBStorage"
implements="storage">
<key name="name" required="yes" />
<key name="interval" datatype="time-interval" default="2m" />
<key name="kbyte" datatype="integer" default="0" />
<key name="min" datatype="integer" default="0" />
<key name="logdir" />
<key name="cachesize" datatype="byte-size" default="128MB" />
<key name="frequency" datatype="time-interval" default="0" />
<key name="packtime" datatype="time-interval" default="4h" />
<key name="classicpack" datatype="integer" default="0" />
<key name="read-only" datatype="boolean" default="off"/>
</sectiontype>
<sectiontype name="zeoclient" datatype=".ZEOClient"
implements="storage">
<multikey name="server" datatype="socket-address" required="yes"/>
<key name="storage" default="1"/>
<key name="cache-size" datatype="integer" default="20000000"/>
<key name="name" default=""/>
<key name="client"/>
<key name="var"/>
<key name="min-disconnect-poll" datatype="integer" default="5"/>
<key name="max-disconnect-poll" datatype="integer" default="300"/>
<key name="wait" datatype="boolean" default="on"/>
<key name="read-only" datatype="boolean" default="off"/>
<key name="read-only-fallback" datatype="boolean" default="off"/>
</sectiontype>
<sectiontype name="demostorage" datatype=".DemoStorage"
implements="storage">
<key name="name" default="Demo Storage"/>
<section type="storage" name="*" attribute="base"/>
<key name="quota" datatype="integer"/>
</sectiontype>
<sectiontype name="zodb"
implements="database">
<section type="storage" name="*" attribute="storage"/>
<key name="cache-size" datatype="integer" default="5000"/>
<key name="pool-size" datatype="integer" default="7"/>
<key name="version-pool-size" datatype="integer" default="3"/>
<key name="version-cache-size" datatype="integer" default="100"/>
</sectiontype>
</component>
=== ZODB3/ZODB/config.py 1.6 => 1.7 ===
--- ZODB3/ZODB/config.py:1.6 Thu Jan 9 13:26:53 2003
+++ ZODB3/ZODB/config.py Fri Jan 10 01:44:50 2003
@@ -36,18 +36,18 @@
def databaseFromFile(f):
config, handle = ZConfig.loadConfigFile(getSchema(), f)
- return databaseFromConfig(config)
+ return databaseFromConfig(config.database)
def databaseFromURL(url):
config, handler = ZConfig.loadConfig(getSchema(), url)
- return databaseFromConfig(config)
+ return databaseFromConfig(config.database)
-def databaseFromConfig(config):
- return ZODB.DB(config.storage.open(),
- pool_size=config.pool_size,
- cache_size=config.cache_size,
- version_pool_size=config.version_pool_size,
- version_cache_size=config.version_cache_size)
+def databaseFromConfig(section):
+ return ZODB.DB(section.storage.open(),
+ pool_size=section.pool_size,
+ cache_size=section.cache_size,
+ version_pool_size=section.version_pool_size,
+ version_cache_size=section.version_cache_size)
class StorageConfig:
=== ZODB3/ZODB/config.xml 1.4 => 1.5 ===
--- ZODB3/ZODB/config.xml:1.4 Thu Jan 9 01:32:44 2003
+++ ZODB3/ZODB/config.xml Fri Jan 10 01:44:50 2003
@@ -1,79 +1,7 @@
-<schema type="database" prefix="ZODB.config">
+<schema prefix="ZODB.config">
- <abstracttype name="storage"/>
+ <import package="ZODB"/>
- <sectiontype name="filestorage" datatype=".FileStorage"
- implements="storage">
- <key name="path" required="yes"/>
- <key name="create" datatype="boolean" default="true"/>
- <key name="read_only" datatype="boolean" default="false"/>
- <key name="stop"/>
- <key name="quota" datatype="integer"/>
- </sectiontype>
-
- <sectiontype name="mappingstorage" datatype=".MappingStorage"
- implements="storage">
- <key name="name" default="Mapping Storage"/>
- </sectiontype>
-
- <sectiontype name="fullstorage" datatype=".BDBStorage"
- implements="storage">
- <key name="name" required="yes" />
- <key name="interval" datatype="time-interval" default="2m" />
- <key name="kbyte" datatype="integer" default="0" />
- <key name="min" datatype="integer" default="0" />
- <key name="logdir" />
- <key name="cachesize" datatype="byte-size" default="128MB" />
- <key name="frequency" datatype="time-interval" default="0" />
- <key name="packtime" datatype="time-interval" default="4h" />
- <key name="classicpack" datatype="integer" default="0" />
- <key name="read_only" datatype="boolean" default="off"/>
- </sectiontype>
-
- <!-- XXX Fred promises to make it so minimal storage is just an
- extension of fullstorage -->
- <sectiontype name="minimalstorage" datatype=".BDBStorage"
- implements="storage">
- <key name="name" required="yes" />
- <key name="interval" datatype="time-interval" default="2m" />
- <key name="kbyte" datatype="integer" default="0" />
- <key name="min" datatype="integer" default="0" />
- <key name="logdir" />
- <key name="cachesize" datatype="byte-size" default="128MB" />
- <key name="frequency" datatype="time-interval" default="0" />
- <key name="packtime" datatype="time-interval" default="4h" />
- <key name="classicpack" datatype="integer" default="0" />
- <key name="read_only" datatype="boolean" default="off"/>
- </sectiontype>
-
- <sectiontype name="zeoclient" datatype=".ZEOClient"
- implements="storage">
- <multikey name="server" datatype="socket-address" required="yes"/>
- <key name="storage" default="1"/>
- <key name="cache_size" datatype="integer" default="20000000"/>
- <key name="name" default=""/>
- <key name="client"/>
- <key name="var"/>
- <key name="min_disconnect_poll" datatype="integer" default="5"/>
- <key name="max_disconnect_poll" datatype="integer" default="300"/>
- <key name="wait" datatype="boolean" default="on"/>
- <key name="read_only" datatype="boolean" default="off"/>
- <key name="read_only_fallback" datatype="boolean" default="off"/>
- </sectiontype>
-
- <sectiontype name="demostorage" datatype=".DemoStorage"
- implements="storage">
- <key name="name" default="Demo Storage"/>
- <section type="storage" name="*" attribute="base"/>
- <key name="quota" datatype="integer"/>
- </sectiontype>
-
-
- <!-- the rest is the actual configuration for the database -->
- <section type="storage" name="*" attribute="storage"/>
- <key name="cache_size" datatype="integer" default="5000"/>
- <key name="pool_size" datatype="integer" default="7"/>
- <key name="version_pool_size" datatype="integer" default="3"/>
- <key name="version_cache_size" datatype="integer" default="100"/>
+ <section type="database" name="*" attribute="database"/>
</schema>