On 02/20/2012 10:46 AM, Wes Hardin wrote:
> I don't understand the reasoning behind the multitude of bundles.  Is there a 
> benefit that I'm not seeing?

Whats a multitude? I have one paramaterized bundle that handles
specifically interface settings, it takes a 1 dimensional array
interfacename[paramater]

> Cfengine supports multi-dimensional arrays.  You can make the the nodename a 
> component of the array name.  I'm imagining something like this:

It does indeed support multi-dimensional arrays I have had problems
getting slists back out of an array. I am not sure if its a bug, or if
its something I am doing wrong, in any case it hasn't been enough of a
hindrance thus far for me to continue pursuing.

I dont see anything wrong with your way of defining the configuration
either. I am curious how you would iterate over
"netconf[host0][eth0][PARAMATER]" Do you define a list of valid
parameters? As far as I know getindices wont work on a multidimensional
array.

> I don't think this is an issue when using the set_variable_values bundle from 
> the COPBL, but before using a variable in an edit_line promise, I suggest you 
> make sure that the variable exists.  That way you don't end up with an 
> unexpanded Cfengine variable name in your configuration files.  See the 
> isvariable function for this purpose.  Should probably check that the 
> "interfaces" slist is defined too before you use it in the files promise.  I 
> suspect it might try to create a file with the unexpanded variable name in 
> the file name if the variable isn't defined first.

You should share your bundles that help you manage this, sounds like
there might be some good examples the community could benefit from.

-- 
Nick Anderson <n...@cmdln.org>
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to