Commit 769d309d authored by Julien Muchembled's avatar Julien Muchembled

client: add 'read-only' & 'verbose' config options

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2764 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 22adbcd7
<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>
......@@ -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()))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment