-
Type:
Bug
-
Status: Rejected
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.6.0
-
Component/s: Promise type: methods
-
Labels:None
In the following bundle (also attached):
<pre>
bundle agent test
{
vars:
"json1" data => parsejson('
');
"packageinfo" data => parsejson('
{ "name": "php", "old_version": "5.3.3-27.el6_5", "new_version": "5.3.3-26.el6", "reinstall_list": ["php", "php-common", "php-cli"] }');
methods:
one::
"print_json" usebundle => show(@(json1));
two::
"again" usebundle => show(@(packageinfo));
}
bundle agent show(data)
{
reports:
one::
"zero: $(data[zero])";
"more: $(data[more])";
two::
"package: $(data[reinstall_list])";
}
</pre>
Using multiple usebundle calls, gives me a list of unexpanded variables. Please see the following sequence of outputs:
[root@hub ]# cf-agent ./test_container.cf -b test -K -Done
R: zero: 0 <<== this is expected
R: more: hello
R: more: test
[root@hub ]# cf-agent ./test_container.cf -b test -K -Dtwo
R: package: php <<== this is also expected
R: package: php-common
R: package: php-cli
[root@hub ]# cf-agent ./test_container.cf -b test -K -Dtwo,one
R: zero: 0
R: more: hello
R: more: test
*R: package: $(data[reinstall_list]) <<== where does this come from?
R: zero: $(data[zero])
R: more: $(data[more])*
R: package: php
R: package: php-common
R: package: php-cli