[Zope] reading zope.config file for ClientStorage
Mika, David P (Research)
mika at crd.ge.com
Tue Oct 11 09:48:27 EDT 2005
OK, the opts object really did have everything loaded. On careful inspection the opts.configroot has an attribute "databases" with a list of Zope.Startup.datatypes.ZopeDatabase instances. I can do what I originally set out to do which was to open a ZEO.ClientStorage configured from the zope-with-zeo.conf file (the ZEO.ClientStorage is now wrapped in a ZEOClient object):
from Zope.Startup import options, handlers
opts = options.ZopeOptions()
opts.configfile='c:\Zope-Instance-Test\etc\zope-with-zeo.conf'
opts.load_schema()
opts.load_configfile()
for db in opts.configroot.databases:
if is instance(db.config.storage, ZODB.config.ZEOClient):
db.config.storage.open()
>What does your zope-with-zeo.conf file look like?
My zope-with-zeo.conf file is pretty standard except for a designation to use a zeoclient. I've also included a username and password as my zeo server is using digest authentication:
<zodb_db main>
mount-point /
<zeoclient>
server localhost:8090
storage 1
name zeostorage
var $INSTANCE/var
username metalfor
password my_zeo_cleartext_password
</zeoclient>
</zodb_db>
Thanks much!
Dave Mika
More information about the Zope
mailing list