[Openstack-docs] Boolean configuration options
phil hopkins
phil.hopkins at rackspace.com
Mon Mar 17 13:01:39 UTC 2014
On 03/15/2014 09:23 AM, Gauvain Pocentek wrote:
> 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
Yes, I would like that the configuration examples only use the spaces.
It is easier to read and we need consistency in how we
write these.
Shell commands would work with the spaces, but would need to be quoted
to prevent the shell misinterpreting the space and
this can become difficult when the command will require quotes before
the spaces are placed in the line. Because of that not
using the spaces on a shell command would be acceptable.
I will update the wiki later today if no one objects.
Phil
>
> _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
More information about the Openstack-docs
mailing list