1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
###########################################################
#
# Test maparray for multi-index arrays
# Redmine#6033
#
###########################################################
body common control
{
inputs => { "../../default.cf.sub" };
bundlesequence => { default("$(this.promise_filename)") };
version => "1.0";
}
###########################################################
bundle agent init
{
}
###########################################################
bundle agent test
{
vars:
"bundles[x][y][z1]" string => "xyz1";
"bundles[x][y][z23]" slist => { "xyz2", "xyz3" };
"bundles[zculib][mypaths]" slist => { "pathsa.cf", "pathsb.cf" };
"bundles[zculib][myservices]" slist => { "myservices.cf" };
#make sure that below variables will be not mapped
"bundles[zcuinventory][zcuinventory]" slist => { "inv_zcuinventory.cf" };
"bundles[zcuinventory][inventory_fibrechannel]" slist => { "inv_fibrechannel.cf" };
"bundles[zcuinventory][inventory_virtualization]" slist => { "inv_virtualization.cf" };
"bundles[services][afs]" slist => { "afs.cf", "afsadm.cf" };
"bundles[services][base]" slist => { "base.cf", "base2.cf" };
"bundles[onelevel1]" slist => { "onelevel1_avalue", "onelevel1_bvalue" };
"bundles[onelevel2]" string => "onelevel2value";
"inputs" slist => maparray("zculib/$(this.v)","bundles[zculib]");
"merged_bundles" data => mergedata(bundles);
"merged_zculib" data => mergedata("bundles[zculib]");
}
###########################################################
bundle agent check
{
methods:
"check" usebundle => dcs_check_state(test,
"$(this.promise_filename).expected.json",
$(this.promise_filename));
}
|