[openstack-dev] Recent oslo.config/Quantum changes [was Re: For those using Quantum with devstack]

Mark McLoughlin markmc at redhat.com
Sat May 25 13:03:35 UTC 2013


On Fri, 2013-05-24 at 23:00 +0100, Salvatore Orlando wrote:
> Hi Mark,
> 
> 
> Your comments where not really TL, but I thank your very much for the
> TL;DR follow up!
> And btw, thank you very much for [1]!

:)

> oslo.config 1.2.0 does normalize all option group names to lowercase,
> but still supports as 'deprecated' the ones with all capital letters.
> Is the above statement correct?
> I'm asking because during a review I expressed a similar concern and
> was told that oslo.config 1.1.0 did this ([2]), and I want to be sure
> my understanding is correct.

Yeah, this statement:

  "Thus conf files are backwards compatible but option group references
   in the code must now use lowercase before we update oslo.config"

was a misunderstanding.

There are two aspects to this case normalization thing:

  1) After the update to 1.2.0, users can now use upper case or lower 
     case section names in their config files (they can also have a 
     mixture of upper and lower case) and everything will work fine

  2) Before and after the update to 1.2.0, the case of the group names 
     in the code is determined by the case of the group name passed to 
     register_opt() - i.e. both of these are valid:

       CONF.register_opt(StrOpt('foo'), group='bar')
       print CONF.bar.foo

       CONF.register_opt(StrOpt('foo'), group='BAR')
       print CONF.BAR.foo

     but these would not be valid:

       CONF.register_opt(StrOpt('foo'), group='bar')
       print CONF.BAR.foo

       CONF.register_opt(StrOpt('foo'), group='BAR')
       print CONF.bar.foo

     Basically, the recent changes to oslo.config shouldn't *require*
     any code changes to Quantum. However, since we want to recommend 
     users use lower case sections, it makes sense to gradually change
     Quantum code to also use lower case group names.

Cheers,
Mark.





More information about the OpenStack-dev mailing list