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
...@@ -14,15 +14,27 @@ ...@@ -14,15 +14,27 @@
Give the name of the cluster Give the name of the cluster
</description> </description>
</key> </key>
<key name="connector" required="no"> <key name="connector">
<description> <description>
Give the name of the connector used at low-level Give the name of the connector used at low-level
</description> </description>
</key> </key>
<key name="compress" required="no" default="true" datatype="boolean"> <key name="compress" datatype="boolean">
<description> <description>
true: enable automatic data compression (compression is only used when compressed size is smaller). If true, enable automatic data compression (compression is only used
false: disable data compression. when compressed size is smaller).
</description>
</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> </description>
</key> </key>
</sectiontype> </sectiontype>
......
...@@ -21,9 +21,6 @@ class NeoStorage(BaseConfig): ...@@ -21,9 +21,6 @@ class NeoStorage(BaseConfig):
def open(self): def open(self):
from neo.client.Storage import Storage from neo.client.Storage import Storage
return Storage(master_nodes=self.config.master_nodes, config = self.config
name=self.config.name, connector = self.config.connector, return Storage(**dict((k, getattr(config, k))
compress=self.config.compress, 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