[openstack-dev] [oslo]

Eric Brown browne at vmware.com
Tue Apr 21 17:25:18 UTC 2015


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150421/d74ffc39/attachment.html>


More information about the OpenStack-dev mailing list