Re: [openstack-dev] [oslo] Any reason why not have 'choices' parameter for ListOpt()?

2018-03-27 Thread Kashyap Chamarthy
On Mon, Mar 26, 2018 at 12:28:02PM -0700, melanie witt wrote: > On Mon, 26 Mar 2018 14:12:52 -0500, Matt Riedemann wrote: > > On 3/26/2018 6:24 AM, ChangBo Guo wrote: > > > What's your use case for ListOpt, just make sure the value(a list) is > > > part of  'choices' ?   Maybe we need another

Re: [openstack-dev] [oslo] Any reason why not have 'choices' parameter for ListOpt()?

2018-03-26 Thread Doug Hellmann
Excerpts from melanie witt's message of 2018-03-26 12:28:02 -0700: > On Mon, 26 Mar 2018 14:12:52 -0500, Matt Riedemann wrote: > > On 3/26/2018 6:24 AM, ChangBo Guo wrote: > >> What's your use case for ListOpt, just make sure the value(a list) is > >> part of  'choices' ?   Maybe we need another

Re: [openstack-dev] [oslo] Any reason why not have 'choices' parameter for ListOpt()?

2018-03-26 Thread Doug Hellmann
Excerpts from Matt Riedemann's message of 2018-03-26 14:12:52 -0500: > On 3/26/2018 6:24 AM, ChangBo Guo wrote: > > What's your use case for ListOpt, just make sure the value(a list) is > > part of  'choices' ?   Maybe we need another parameter to distinguish > > It came up because of this

Re: [openstack-dev] [oslo] Any reason why not have 'choices' parameter for ListOpt()?

2018-03-26 Thread melanie witt
On Mon, 26 Mar 2018 14:12:52 -0500, Matt Riedemann wrote: On 3/26/2018 6:24 AM, ChangBo Guo wrote: What's your use case for ListOpt, just make sure the value(a list) is part of  'choices' ?   Maybe we need another parameter to distinguish It came up because of this change in nova:

Re: [openstack-dev] [oslo] Any reason why not have 'choices' parameter for ListOpt()?

2018-03-26 Thread Matt Riedemann
On 3/26/2018 6:24 AM, ChangBo Guo wrote: What's your use case for ListOpt, just make sure the value(a list) is part of  'choices' ?   Maybe we need another parameter to distinguish It came up because of this change in nova: https://review.openstack.org/#/c/534384/ We want to backport that as

Re: [openstack-dev] [oslo] Any reason why not have 'choices' parameter for ListOpt()?

2018-03-26 Thread ChangBo Guo
There is no special reasons that ListOpt doesn't allow parameter, PortOpt also uses parameter 'choices'. PortOpt and StrOpt only accept one value and use this parameter to double check value is valid which is in the 'choices'. What's your use case for ListOpt, just make sure the value(a

[openstack-dev] [oslo] Any reason why not have 'choices' parameter for ListOpt()?

2018-03-26 Thread Kashyap Chamarthy
Hi there, I was looking at oslo_config/cfg.py[*], and the StrOpt() class has 'choices' parameter, to allow a sequence of valid values / tuples of valid values for descriptions. However, I don't see the same 'choices' parameter for the ListOpt() class. Out of curiosity, is there a reason to not