body file control
{
      namespace => "ns1";
}

bundle agent mytest(a)
{
  classes:
      "ns1global" expression => "any", scope => "namespace";

      "ns1global_from_ppkeys" expression => "ns1ppkeys", scope => "namespace"; # should be defined
      "ns1global_from_ppkeys_explicit" expression => "ns1:ns1ppkeys", scope => "namespace"; # prefix should not be necessary

  vars:
    cfengine_3::
      "ns1string" string => $(this.promise_dirname);

  files:
      "$(sys.workdir)/ppkeys/."
      create => "true",
      classes => default:always("ns1ppkeys");

  reports:
    EXTRA::
      "$(this.bundle): ns1string = '$(ns1string)'";
}

body file control
{
      namespace => "ns2";
}

bundle agent mytest(a,b)
{
  classes:
      "ns2global" expression => "cfengine_3", scope => "namespace";

  vars:
      "ns2string" string => $(sys.fqhost);
      "ns2string2" string => $(const.t);

  files:
      "$(sys.workdir)/ppkeys/."
      create => "true";

  reports:
    EXTRA::
      "$(this.bundle): ns2string = '$(ns2string)'";
}
