Re: [Nagios-devel] RFC - Feature Template overrides Definition

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] RFC - Feature Template overrides Definition

Post by Guest »

------=_Part_2998_14252348.1203007922894
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

On Thu, Feb 14, 2008 at 5:28 PM, Andreas Ericsson wrote:

> Mark Eisenblaetter wrote:
> > On Thu, Feb 14, 2008 at 1:56 PM, Andreas Ericsson wrote:
> >
> >> If you could perhaps post your templates for your master and slave and
> >> one or two objects that use those template, I'm sure I could explain
> >> how you can accomplish what you want, although I'm quite sure already
> >> that you'd be off just fine if you left the template-controlled
> variables
> >> out of the objects completely and set them to what they should be in
> the
> >> templates on master and slave.
> >
> >
> > Should we do this in this thread or in the initial thread?
> >
>
> In this thread please. The other one is too old for me to fully remember.
>

>
> >
> >>> I know that the default behavior is the other direction (template ->
> >>> service, but service directives are last significant).
> >>>
> >>> Since Nagios 3.x allows a template addition through the "+" notation
> my
> >>> thoughts goes in this direction.
> >>> What would be if you were allowed to inject a special character to
> your
> >>> template to override a service definition (for example).
> >>>
> >>> With attached patch I got exactly this behavior.
> >>>
> >> I failed to see the point of your patch after having scrolled past
> >> 4 pages of function-renaming diff data. I *do* know that it doesn't
> >> even compile with the attached patch. Since it doesn't compile, I'm
> >> thinking you can't have tested this very well at all, and what you've
> >> actually got running is something else, which you're not at all sure
> >> works as per the current spec at all.
> >>
> >
> > Ok i will look at this. And will do more testing befor submitting the
> new
> > version.
> >
> > one question is it better to patch against the last release or the last
> cvs
> > checkout.
> > I used the last checkout.
> >
>
> Latest checkout pretty much always.
>
> >
> >
> >> It doesn't compile because you have renamed
> >> xodtemplate_clean_additive_string() to xodtemplate_clean_strings() and
> >> then call it as xodtemplate_clean_string(). That change is just plain
> >> noise and should never have made it into the diff. If you want me to
> >> review it, resend with a minimal set of changes so I can see where the
> >> logic happens without having to wade through page after page of
> nonsense.
> >
> >
> > there are both funktions in xodtemplate.c and i can't find one wrong
> > renaming.
> >
>
> "both" is not applicable in this case, as there are 3 function names in
> use.
> xodtemplate_clean_additive_string()
> xodtemplate_clean_strings()
> xodtemplate_clean_string()
>
> It used to be the first, you renamed it to the second and you're calling
> it
> as the third.


ok know i a little confused.

I found the funktion xodtemplate_clean_additive_strings were all variables
are checked by xodtemplate_clean_additive_string if there ist any + left.
For me that are two different funktions.

And I tried to renmame xodtemplate_clean_additive_string in
xodtemplate_clean_string
and xodtemplate_clean_additive_strings in xodtemplate_clean_strings



>
> > I don't want to produce double code so i used addaptive funktions to
> provide
> > the Cleaning in my case.
> > in line 98 - 99 you can see that i added my char (=) for cleanup in the
> > xodtemplate_clean_additive_string funktion and added the handling of the
> > check_command (Host Line 199 service 214) in the
> > xodtemplate_clean_additive_strings funktions.
> >
> > In this case i tought it would be better to rename the funktion because
> they
> > are not handling addaptive-only anymore.
> >
> > So what the "best" way to do in this case?
> > 1. Double the xodtemplate_clean_additive_string and
> > xodtemplate_clean_additive_strings
> > 2. Use the both funktions an rename them
> > 3. Use both funktions and don't touch the name
> >
>
> Pick one name and then use that everywhere. You picked one and used
> another

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked