[Openstack-docs] Boolean configuration options

Gauvain Pocentek gauvain.pocentek at objectif-libre.com
Sat Mar 15 14:23:57 UTC 2014


Le 2014-03-15 08:02, Miranda Zhang 张倩 a écrit :
> On Sat, Mar 15, 2014 at 5:04 PM, David O'Brien <dob12460 at gmail.com> 
> wrote:
> 
>> How strict is it? Does it need to be one or the other?
>> 
>> I'm thinking about if somebody happened to write <option>= True and 
>> experienced a failure because of one missing space. Might be hard to 
>> troubleshoot. Can you support both, and recommend using spaces for 
>> readability?
>> 
>> Just a thought.
>> 
>> On Wed, Mar 12, 2014 at 5:34 AM, Phil Hopkins 
>> <phil.hopkins at rackspace.com> wrote:
>> 
>>> Gauvain,
>>> 
>>> You are correct, that was what I was thinking and I put it in the 
>>> boolean section. Thanks forcorrecting
>>> this.
>>> 
>>> Phil Hopkins RHCA CMDBA
>>> Openstack Instructor
>>> Rackspace Hostingtm
>>> (210) 312-3584
>>> 
>>> ________________________________________
>>> From: Gauvain Pocentek [gauvain.pocentek at objectif-libre.com]
>>> Sent: Tuesday, March 11, 2014 2:26 PM
>>> To: Phil Hopkins
>>> Cc: openstack-docs
>>> Subject: Re: [Openstack-docs] Boolean configuration options
>>> 
>>> Le 2014-03-11 19:44, phil hopkins a écrit :
>>>> I would like to post a change to the Boolean configuration options. 
>>>> I
>>>> believe that for alll of the configuration files we should use the
>>>> form:
>>>> 
>>>> force_dhcp_release = True
>>>> 
>>>> as opposed to:
>>>> 
>>>> force_dhcp_release=True
>>>> 
>>>> using a space on either side of the equals sign. This makes it 
>>>> easier
>>>> to separate the configuration item and the option. I believe it is
>>>> easier to read.
>>>> 
>>>> Any comments?
>>> 
>>> +1
>>> 
>>> But why limit this to boolean options? We could use this convention 
>>> for
>>> all the options.
> 
> I'm not familiar with the config files, but one concern to me from
> the experience with bash script is:variable declaration in bash script
> can not have space (or space will change the meaning of the command)

I think that Phil was talking about configuration files only, which 
supports both possibilities (with/without spaces). I find options not 
using space harder to read.

As you're pointing out, shell examples should not have spaces, that 
would be incorrect.

Gauvain



More information about the Openstack-docs mailing list