Matt, I apologise for your trouble. I now found the time to look for
this and please try the latest svn where this now seems to work correctly.

M

Matt Richards wrote:
> Greetings. It seems that when you pass in a parameter to a usebundle,
> canonify can't handle it. Consider the following example.
> 
> bundle control common {
>    bundlesquence = { "test" };
> }
> 
> ##
> 
> bundle agent test {
> 
>   vars:
>     "test_files" slist => { "/etc/motd",
>                                "/etc/resolv.conf",
>                                "/etc/netsvc.conf"
>                              };
> 
>    methods:
>       "any" usebundle => test_func("$(test_files)");
> 
> }
> 
> ##
> 
> bundle agent test_func(filename) {
> 
>   vars:
> 
>     "canon_filename" string => canonify("$(filename)");
> 
>   reports:
>      Yr2009::
>        "filename: $(filename)";
>        "canon_filename: $(canon_filename)";
> 
> }
> 
> 
> running the example:
> cf3    =========================================================
> cf3    reports in bundle drop_copy (2)
> cf3    =========================================================
> cf3
> cf3
> cf3     .........................................................
> cf3     Promise by: filename: /etc/netsvc.conf
> cf3     .........................................................
> cf3
> cf3 R: filename: /etc/netsvc.conf
> cf3
> cf3     .........................................................
> cf3     Promise by: canon_filename: __filename_
> cf3     .........................................................
> cf3
> cf3 R: canon_filename: __filename_
> cf3 Method invoked successfully
> cf3
> cf3      +  Private classes augmented:
> cf3
> cf3      -  Private classes diminished:
> cf3
> cf3
> cf3
> _______________________________________________
> Bug-cfengine mailing list
> Bug-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/bug-cfengine

-- 
Mark Burgess

-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway

Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Bug-cfengine mailing list
Bug-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to