<div dir="ltr">Mark -<br><br><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">
<br>
</div></div>I don't think I've seen code (except for obscure cases) which uses the<br>
CONF global directly (as opposed to being passed CONF as a parameter)<br>
but doesn't register the options at import time.<br>
<div class=""><div class="h5"><br>
Mark.<br>
<br></div></div></blockquote><div><br></div><div>Keystone uses the CONF global directly and doesn't register the options at import time. They're registered early when keystone is started, just before the call to CONF().<br>
<br></div><div>Here's an example use of the CONF global: <a href="http://git.openstack.org/cgit/openstack/keystone/tree/keystone/identity/controllers.py#n48">http://git.openstack.org/cgit/openstack/keystone/tree/keystone/identity/controllers.py#n48</a><br>
<br></div><div>Here's the function that registers the CONF options: <a href="http://git.openstack.org/cgit/openstack/keystone/tree/keystone/common/config.py#n820">http://git.openstack.org/cgit/openstack/keystone/tree/keystone/common/config.py#n820</a><br>
<br></div><div>Here's the call to the function that registers the CONF options: <a href="http://git.openstack.org/cgit/openstack/keystone/tree/bin/keystone-all#n115">http://git.openstack.org/cgit/openstack/keystone/tree/bin/keystone-all#n115</a><br>
</div><div><br></div><div>This was done so that reading the value of a config option during import will fail.<br></div><div><br></div><div>- Brant<br></div><div><br></div></div></div></div></div>