# cat test_services.cf
bundle agent main { services: "service" service_policy => "reload";
"service_test" service_policy => "reload", service_method => service_test;}
body service_method service_test { service_bundle => non_standard_services("$(this.promiser)","$(this.service_policy)");}
bundle agent non_standard_services(service,state) { reports: "Test non_standard_services promise for \"$(service)\" -> $(state)";}
bundle agent standard_services(service,state){ reports: "Test standard_service promise for \"$(service)\" -> $(state)";}
# cf-agent -KIf ./test_services.cfR: Test standard_service promise for "service" -> restartR: Test non_standard_services promise for "service_test" -> reload
# cat test_services.cfbundle agent main { services: "service" service_policy => "reload";
"service_test" service_policy => "reload", service_method => service_test;
methods: "" usebundle => standard_services("service_method", "reload"); "" usebundle => non_standard_services("service_test_method", "reload");
}
body service_method service_test { service_bundle => non_standard_services("$(this.promiser)","$(this.service_policy)");}
bundle agent non_standard_services(service,state) { reports: "Test non_standard_services promise for \"$(service)\" -> $(state)";}
bundle agent standard_services(service,state){ reports: "Test standard_service promise for \"$(service)\" -> $(state)";}# cf-agent -KIf ./test_services.cf
R: Test standard_service promise for "service_method" -> reloadR: Test non_standard_services promise for "service_test_method" -> reload
R: Test standard_service promise for "service" -> restartR: Test non_standard_services promise for "service_test" -> reload