[Openstack-docs] Boolean configuration options

Miranda Zhang 张倩 miranda.zhang.q at gmail.com
Sat Mar 15 07:02:04 UTC 2014


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)

When you write:

STR = "foo"

bash tries to run a command named STR with 2 arguments (the strings '=' and
'foo')

When you write:

STR =foo

bash tries to run a command named STR with 1 argument (the string '=foo')

When you write:

STR= foo

bash tries to run the command foo with STR set to the empty string in its
environment.
http://stackoverflow.com/questions/2268104/basic-bash-script-variable-declaration-command-not-found

I probably prefer the way as it is now: force_dhcp_release=True

>
>> Gauvain Pocentek
>>
>> Objectif Libre - Infrastructure et Formations Linux
>> http://www.objectif-libre.com
>>
>>
>> _______________________________________________
>> Openstack-docs mailing list
>> Openstack-docs at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>>
>
>
>
> --
> /David
>
> _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
>


-- 
Qian Zhang 张倩
M: +61 401 909 897
T: +61 262 167 148
PhD Candidate, Cloud Computing
S326 Computer and Information Technology Building (Building 108)
ANU ID: U5214628
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20140315/4a076085/attachment.html>


More information about the Openstack-docs mailing list