Inheritance
Christoph Maser
cmr at financial.com
Tue Feb 6 08:50:17 CET 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Relph schrieb:
> Christoph Maser writes:
>
>
> John Relph wrote:
>>>> Christoph Maser writes:
>>>> Could we change that to read
>>>>
>>>> hostgroups +, linux-servers,web-servers
>>>>
>>>>
>>>> this +<string> looks a bit awkward to me. Also considering how you use
>>>> "!" as a unary operator +<string> makes people think the "+" is an
>>>> operator for the following string.
>>>>
>>>>> Disagreed. Your proposed syntax is more confusing. Your syntax makes
>>>>> it look like "+" is itself a hostgroup (albeit with special meaning).
>>>>> The original syntax is well known and understood. For example, Apache
>>>>> configuration files use the "+" as proposed below.
>>>>> I prefer Ethan's proposed syntax.
>>>>> -- John
>>>> Chris
> John,
>
> i see your point but i really think the way +<string> and !<string> are
> used are not very consistent. I'm not quite certain which parts in
> httpd-config you mean? Options? Could you further elaborate this comparison?
>
>> See http://httpd.apache.org/docs/2.0/mod/core.html#options
>
>> ... if all the options on the Options directive are preceded by a +
>> or - symbol, the options are merged. Any options preceded by a + are
>> added to the options currently in force, and any options preceded by
>> a - are removed from the options currently in force.
>
>> Which basically says you can do this:
>
>> hostgroups +linux-servers,web-servers
>
>> which adds the specified groups to those inherited from the template,
Really? Mabye you missed a thing: 1st it says "if all the options..."
and then very definitely:
"Warning
Mixing Options with a + or - with those without is not valid syntax, and
is likely to cause unexpected results."
- From the very same document. IIRC this warning was added in 2.0 docs,
just because their where many misunderstandings with this syntax.
>> or this:
>
>> hostgroups +linux-servers,-web-servers
>
>> which adds the first group to and removes the second group from those
>> inherited from the template, or this:
>
>> hostgroups linux-servers,web-servers
>
>> which replaces any groups inherited from the template with those
>> specified.
>
Well that makes sense!
>> I don't know if we need the minus "-" operator for Nagios (though I
>> suppose if we built it, they would come).
>
I would love to see that beeing added.
Just to clarify what i disliked about the original posting. If I see
"+group1,group2" whith the comment Ethan gave is see "+(group1,group2)"
But what you all meant was "+group1,+group2".
As you can see this is not absolutely obvious, even if you would define
missing +es as beeing implicitly added i would propose throwing a warning.
Even better declare the mixed syntax invalid (just like apache does but
in contrast to their config parser actually throw an error) just to
avoid any kind of confusion which might happen.
Yes I know its totally pedantic, but i really think these kind of
details make a differnce in software quality.
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFyDM5sLjW0HYht7URAiOqAKDhfJu/4aToNO1L1jud3eRPQStOaACfbs7/
JllioMWyormTE/tPWtOL3QM=
=90YU
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
More information about the Developers
mailing list