# HG changeset patch # User Thierry Florac # Date 1348508576 -7200 # Node ID a7275e2a9252a7a685f01deb9cf2ddb0a250c4fb # Parent 590c2e6d725e55d3b848a33802773f9d24e30efc Updated ZEO connection interface diff -r 590c2e6d725e -r a7275e2a9252 src/ztfy/utils/interfaces.py --- a/src/ztfy/utils/interfaces.py Mon Sep 24 19:42:40 2012 +0200 +++ b/src/ztfy/utils/interfaces.py Mon Sep 24 19:42:56 2012 +0200 @@ -24,7 +24,7 @@ # import Zope3 packages from zope.interface import Interface -from zope.schema import TextLine, Int, Password +from zope.schema import TextLine, Int, Password, Bool # import local packages @@ -179,6 +179,16 @@ description=_("Realm name on ZEO server"), required=False) + blob_dir = TextLine(title=_("BLOBs directory"), + description=_("Directory path for blob data"), + required=False) + + shared_blob_dir = Bool(title=_("Shared BLOBs directory ?"), + description=_("""Flag whether the blob_dir is a server-shared filesystem """ + """that should be used instead of transferring blob data over zrpc."""), + required=True, + default=False) + def getSettings(self): """Get ZEO connection setting as a JSON dict""" diff -r 590c2e6d725e -r a7275e2a9252 src/ztfy/utils/zodb.py --- a/src/ztfy/utils/zodb.py Mon Sep 24 19:42:40 2012 +0200 +++ b/src/ztfy/utils/zodb.py Mon Sep 24 19:42:56 2012 +0200 @@ -51,6 +51,8 @@ username = FieldProperty(IZEOConnection['username']) password = FieldProperty(IZEOConnection['password']) server_realm = FieldProperty(IZEOConnection['server_realm']) + blob_dir = FieldProperty(IZEOConnection['blob_dir']) + shared_blob_dir = FieldProperty(IZEOConnection['shared_blob_dir']) def getSettings(self): result = {} @@ -71,6 +73,8 @@ username=self.username or '', password=self.password or '', realm=self.server_realm, + blob_dir=self.blob_dir, + shared_blob_dir=self.shared_blob_dir, wait=wait) db = DB(storage) return (storage, db) if get_storage else db