All,

I created a patch that would introduce a new behavior in how oslo.config 
matches StrOpt choice values.

https://review.openstack.org/#/c/167025/

I’m emailing the mailing list to get a consensus on whether the approach is the 
correct one.

Historically oslo.config matches given StrOpt values to choices in a case 
sensitive manner.  But this patch would make that match case insensitive.  This 
should make it slightly easier for deployers so they don’t have to worry about 
specifying the correct capitalization.  But the drawback is that this change 
will not allow having choices with the same characters but different 
capitalization.

For example (this would not be allowed):

cfg.StrOpt(‘foo_opt’,
                 choices=(‘FOO’, ‘foo’)
                 help=‘blah’)

I doubt we have any cases of above, but correct me if I’m wrong.

Another suggested alternative was to have a new flag on StrOpt to specify 
whether the matching is case sensitive or insensitive.  This avoids the issue 
above, but means the deployer must take note of whether the option is case 
insensitive or insensitive.

Let me know your thoughts.  Thanks

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to