Mark -

> I don't think I've seen code (except for obscure cases) which uses the
> CONF global directly (as opposed to being passed CONF as a parameter)
> but doesn't register the options at import time.
>
> Mark.
>
>
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().

Here's an example use of the CONF global:
http://git.openstack.org/cgit/openstack/keystone/tree/keystone/identity/controllers.py#n48

Here's the function that registers the CONF options:
http://git.openstack.org/cgit/openstack/keystone/tree/keystone/common/config.py#n820

Here's the call to the function that registers the CONF options:
http://git.openstack.org/cgit/openstack/keystone/tree/bin/keystone-all#n115

This was done so that reading the value of a config option during import
will fail.

- Brant
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to