[Neo-report] r2764 jm - in /trunk/neo/client: component.xml config.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon May 30 15:59:31 CEST 2011
Author: jm
Date: Mon May 30 15:59:31 2011
New Revision: 2764
Log:
client: add 'read-only' & 'verbose' config options
Modified:
trunk/neo/client/component.xml
trunk/neo/client/config.py
Modified: trunk/neo/client/component.xml
==============================================================================
--- trunk/neo/client/component.xml [iso-8859-1] (original)
+++ trunk/neo/client/component.xml [iso-8859-1] Mon May 30 15:59:31 2011
@@ -1,29 +1,41 @@
<component prefix="neo.client.config">
<sectiontype name="NeoStorage" datatype=".NeoStorage"
implements="ZODB.storage">
- <description>
- A scalable storage for Zope
- </description>
- <key name="master_nodes" required="yes">
+ <description>
+ A scalable storage for Zope
+ </description>
+ <key name="master_nodes" required="yes">
<description>
- Give the list of the master node like ip:port ip:port...
+ Give the list of the master node like ip:port ip:port...
</description>
- </key>
- <key name="name" required="yes">
+ </key>
+ <key name="name" required="yes">
<description>
- Give the name of the cluster
+ Give the name of the cluster
</description>
- </key>
- <key name="connector" required="no">
+ </key>
+ <key name="connector">
<description>
- Give the name of the connector used at low-level
+ Give the name of the connector used at low-level
</description>
- </key>
- <key name="compress" required="no" default="true" datatype="boolean">
+ </key>
+ <key name="compress" datatype="boolean">
<description>
- true: enable automatic data compression (compression is only used when compressed size is smaller).
- false: disable data compression.
+ If true, enable automatic data compression (compression is only used
+ when compressed size is smaller).
</description>
- </key>
+ </key>
+ <key name="read-only" datatype="boolean">
+ <description>
+ If true, only reads may be executed against the storage. Note
+ that the "pack" operation is not considered a write operation
+ and is still allowed on a read-only neostorage.
+ </description>
+ </key>
+ <key name="verbose" datatype="boolean">
+ <description>
+ Log debugging information
+ </description>
+ </key>
</sectiontype>
</component>
Modified: trunk/neo/client/config.py
==============================================================================
--- trunk/neo/client/config.py [iso-8859-1] (original)
+++ trunk/neo/client/config.py [iso-8859-1] Mon May 30 15:59:31 2011
@@ -21,9 +21,6 @@ class NeoStorage(BaseConfig):
def open(self):
from neo.client.Storage import Storage
- return Storage(master_nodes=self.config.master_nodes,
- name=self.config.name, connector = self.config.connector,
- compress=self.config.compress,
- )
-
-
+ config = self.config
+ return Storage(**dict((k, getattr(config, k))
+ for k in config.getSectionAttributes()))
More information about the Neo-report
mailing list