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

ChangBo Guo glongwave at gmail.com
Mon Mar 26 11:24:11 UTC 2018

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 list) is part
of  'choices' ?   Maybe we need another parameter to distinguish

2018-03-26 17:49 GMT+08:00 Kashyap Chamarthy <kchamart at redhat.com>:

> 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 add it for ListOpt()
> too?
> [*] https://git.openstack.org/cgit/openstack/oslo.config/
> tree/oslo_config/cfg.py#n1271
> --
> /kashyap
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

ChangBo Guo(gcb)
Community Director @EasyStack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180326/ec7f557c/attachment.html>

More information about the OpenStack-dev mailing list