Mon, 02 Jun 2003
Uravelling the ZConfig schema mess

ZConfig is the brand-spanky-new configuration system for Zope 2.7 (and ZODB/ZEO) which cleans up the previously limited, dogs-breakfast approach of configuration that we've all come to love in Zope.

Unfortunately, it's a bit difficult to get into as an end user - there's a whole lot of configuration flexibility now, and there's no real way to actually discover the shape of it all. Nobody seems to have thought it important to actually document all those wonderful new configuration options. OK, that's harsh - they're still in a bit of a state of flux, and there's other more important things to be doing at the moment, I'm sure.

Specifically, I need to figure how to configure a ZODB to be undo-less, then how to configure a ZEO server to serve that and finally how to have a bunch of Zope servers connect to that ZEO server. So far the site and associated documentation seems to indicate that it's possible, just not how to do it.

So I wrote an introspection tool - after spending a number of hours deciphering the internal storage system of the ZConfig system. The result is and a dump of the Zope configuration vars as in the current (today, 2 June 2003) CVS. Run the script in your Zope lib/python directory (or at least have that dir in your Python search path). Some examples: Zope/Startup/zopeschema.xml >Zope_schema.html ZEO/schema.xml >ZEO_schema.html

Can't dump individual components yet - the ZConfig schema parser won't let us. Other enhancements to the dumper would include displaying default values and an indication of where the component XML files for the schema are located. Not sure I can access the information about the latter. It's generally pretty obvious from the data type in question.

Unfortunately my efforts didn't actually help with the question at hand: how to config up an undo-less database in a Zope/ZEO instance. Poking somewhat more I get the distinct impression that the undo-less store doesn't exist anymore, which seems a little wrong. I think (hope) I'm just reading the code wrong. I've never used them before, but I was sure they existed...

Oh, and as per usual I fixed a couple of bugs in Zope along the way ;)

path: /python | permanent link |