[openstack-dev] [oslo] usage patterns for oslo.config

Devananda van der Veen devananda.vdv at gmail.com
Fri Aug 8 23:22:16 UTC 2014


On Fri, Aug 8, 2014 at 12:41 PM, Doug Hellmann <doug at doughellmann.com> wrote:
>
> That’s right. The preferred approach is to put the register_opt() in
> *runtime* code somewhere before the option will be used. That might be in
> the constructor for a class that uses an option, for example, as described
> in
> http://docs.openstack.org/developer/oslo.config/cfg.html#registering-options
>
> Doug

Interesting.

I've been following the prevailing example in Nova, which is to
register opts at the top of a module, immediately after defining them.
Is there a situation in which one approach is better than the other?

Thanks,
Devananda



More information about the OpenStack-dev mailing list