Re: [openstack-dev] [oslo.config] MultiStrOpt VS. ListOpt

2015-05-06 Thread Davanum Srinivas
ZhiQiang,

Please log a bug and we can try to do what jd suggested.

-- dims

On Wed, May 6, 2015 at 9:21 AM, Julien Danjou jul...@danjou.info wrote:
 On Wed, May 06 2015, ZhiQiang Fan wrote:

 I come across a problem that crudini cannot handle MultiStrOpt[1], I don't
 know why such type configuration option is needed. It seems ListOpt is a
 better choice. Currently I find lots of MultiStrOpt options in both Nova
 and Ceilometer, and I think other projects have too.

 Here are my questions:

 1) how can I update such type of option without manually rewrite the config
 file? (like devstack scenario)
 2) Is there any way to migrate MultiStrOpt to ListOpt? The ListOpt will
 take last specified value while MultiStrOpt takes all, so the compatibility
 is a big problem

 Any hints?

 I didn't check extensively, but this is something I hit regularly. It
 seems to me we have to two types doing more or less the same things and
 mapping to the same data structure (i.e. list). We should unify them.

 --
 Julien Danjou
 // Free Software hacker
 // http://julien.danjou.info

 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




-- 
Davanum Srinivas :: https://twitter.com/dims

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [oslo.config] MultiStrOpt VS. ListOpt

2015-05-06 Thread ZhiQiang Fan
Hi, devs

I come across a problem that crudini cannot handle MultiStrOpt[1], I don't
know why such type configuration option is needed. It seems ListOpt is a
better choice. Currently I find lots of MultiStrOpt options in both Nova
and Ceilometer, and I think other projects have too.

Here are my questions:

1) how can I update such type of option without manually rewrite the config
file? (like devstack scenario)
2) Is there any way to migrate MultiStrOpt to ListOpt? The ListOpt will
take last specified value while MultiStrOpt takes all, so the compatibility
is a big problem

Any hints?

Thanks!

[1]
https://github.com/pixelb/crudini/blob/6c7cb8330d2b3606610af20c767433358c8d20ab/TODO#L19
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.config] MultiStrOpt VS. ListOpt

2015-05-06 Thread Julien Danjou
On Wed, May 06 2015, ZhiQiang Fan wrote:

 I come across a problem that crudini cannot handle MultiStrOpt[1], I don't
 know why such type configuration option is needed. It seems ListOpt is a
 better choice. Currently I find lots of MultiStrOpt options in both Nova
 and Ceilometer, and I think other projects have too.

 Here are my questions:

 1) how can I update such type of option without manually rewrite the config
 file? (like devstack scenario)
 2) Is there any way to migrate MultiStrOpt to ListOpt? The ListOpt will
 take last specified value while MultiStrOpt takes all, so the compatibility
 is a big problem

 Any hints?

I didn't check extensively, but this is something I hit regularly. It
seems to me we have to two types doing more or less the same things and
mapping to the same data structure (i.e. list). We should unify them.

-- 
Julien Danjou
// Free Software hacker
// http://julien.danjou.info


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.config] MultiStrOpt VS. ListOpt

2015-05-06 Thread Julien Danjou
On Wed, May 06 2015, Steve Martinelli wrote:

 One key difference about this is that AFAIR ListOpt is delimited by 
 commas? Whereas MultiStrOpt is specified multiple times. In the case of 
 Keystone, we include LDAP values which often include commas. Also for 
 longer values, it is easier to read MultiStrOpt instead of ListOpt

Yes, that's the only difference I'm aware of.
It should be easy enough to support both formats with one type.

-- 
Julien Danjou
// Free Software hacker
// http://julien.danjou.info


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.config] MultiStrOpt VS. ListOpt

2015-05-06 Thread Steve Martinelli
One key difference about this is that AFAIR ListOpt is delimited by 
commas? Whereas MultiStrOpt is specified multiple times. In the case of 
Keystone, we include LDAP values which often include commas. Also for 
longer values, it is easier to read MultiStrOpt instead of ListOpt

Thanks,

Steve Martinelli
OpenStack Keystone Core

Davanum Srinivas dava...@gmail.com wrote on 05/06/2015 10:06:38 AM:

 From: Davanum Srinivas dava...@gmail.com
 To: OpenStack Development Mailing List (not for usage questions) 
 openstack-dev@lists.openstack.org, ZhiQiang Fan aji.zq...@gmail.com
 Date: 05/06/2015 10:15 AM
 Subject: Re: [openstack-dev] [oslo.config] MultiStrOpt VS. ListOpt
 
 ZhiQiang,
 
 Please log a bug and we can try to do what jd suggested.
 
 -- dims
 
 On Wed, May 6, 2015 at 9:21 AM, Julien Danjou jul...@danjou.info 
wrote:
  On Wed, May 06 2015, ZhiQiang Fan wrote:
 
  I come across a problem that crudini cannot handle MultiStrOpt[1], I 
don't
  know why such type configuration option is needed. It seems ListOpt 
is a
  better choice. Currently I find lots of MultiStrOpt options in both 
Nova
  and Ceilometer, and I think other projects have too.
 
  Here are my questions:
 
  1) how can I update such type of option without manually rewrite the 
config
  file? (like devstack scenario)
  2) Is there any way to migrate MultiStrOpt to ListOpt? The ListOpt 
will
  take last specified value while MultiStrOpt takes all, so the 
compatibility
  is a big problem
 
  Any hints?
 
  I didn't check extensively, but this is something I hit regularly. It
  seems to me we have to two types doing more or less the same things 
and
  mapping to the same data structure (i.e. list). We should unify them.
 
  --
  Julien Danjou
  // Free Software hacker
  // http://julien.danjou.info
 
  
__
  OpenStack Development Mailing List (not for usage questions)
  Unsubscribe: 
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
  http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
 
 
 
 
 -- 
 Davanum Srinivas :: https://twitter.com/dims
 
 
__
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: 
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
 
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev