Forum: CFEngine Help
Subject: Methods and default variables
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,23009,23009#msg-23009

Theoretical question.  Consider this

methods:
'any' usebundle => foo("x","y","z");

...

bundle foo (x,y,z) {

Do something
}

Can there be defaults for the three variables inside foo so that one can pass 
just a subset of x y and z leaving the defaults to fill in what is missing? 
Normally I would do this in the main bundle

any::
        "x" string ...
        "y" string ...
        "z" string ...

other::
        "y" string ...
        "z" string ...

methods:
'any' usebundle => foo("$x","$y","$z");


Thus, for class other x is the default value and z and y are the other values. 
Could something like that be possible inside the foo bundle without putting all 
of the classes there?

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to