***********************************************************
 Promises 
***********************************************************
Bundle test in the context of agent

   ARGS:

   {
   TYPE: vars

      vars promise by 'hosts' (implicit) if context is any

              slist =>  {'slogans.iu.hio.no','eternity.iu.hio.no','nexus.iu.hio.no'}       if body context any
            Promise (version 1.2.3) belongs to bundle 'test' (type agent) in file '../tests/units/unit_selectservers.cf' near line 20


      vars promise by 'up_servers' (implicit) if context is any

                int => 0       if body context any
            Promise (version 1.2.3) belongs to bundle 'test' (type agent) in file '../tests/units/unit_selectservers.cf' near line 24


   TYPE: classes

      classes promise by 'someone_alive' (implicit) if context is any

         expression => isgreaterthan($(up_servers),0,)            Promise (version 1.2.3) belongs to bundle 'test' (type agent) in file '../tests/units/unit_selectservers.cf' near line 28


      classes promise by 'i_am_a_server' (implicit) if context is any

         expression => regarray(up_servers,$(host)|$(fqhost),)            Promise (version 1.2.3) belongs to bundle 'test' (type agent) in file '../tests/units/unit_selectservers.cf' near line 30


   TYPE: reports

      reports promise by 'Number of active servers $(up_servers)' (implicit) if context is someone_alive

             action => always body for type action(no parameters)
               {
               ifelapsed => 0 if sub-body context any
               }
       if body context any
            Promise (version 1.2.3) belongs to bundle 'test' (type agent) in file '../tests/units/unit_selectservers.cf' near line 36


      reports promise by 'First server $(alive_servers[0]) fails over to $(alive_servers[1])' (implicit) if context is someone_alive

            Promise (version 1.2.3) belongs to bundle 'test' (type agent) in file '../tests/units/unit_selectservers.cf' near line 38


   }


Bundle testbundle in the context of agent

   ARGS:

   {
   TYPE: vars

      vars promise by 'remote' (implicit) if context is any

             string => <remote scalar>       if body context any
            Promise (version 1.2.3) belongs to bundle 'testbundle' (type agent) in file '../tests/units/unit_selectservers.cf' near line 79


   TYPE: reports

      reports promise by 'Receive value $(remote)' (implicit) if context is linux

            Promise (version 1.2.3) belongs to bundle 'testbundle' (type agent) in file '../tests/units/unit_selectservers.cf' near line 85


   }


Bundle access_rules in the context of server

   ARGS:

   {
   TYPE: vars

      vars promise by 'localvar' (implicit) if context is any

             string => literal string       if body context any
            Promise (version 1.2.3) belongs to bundle 'access_rules' (type server) in file '../tests/units/unit_selectservers.cf' near line 108


   TYPE: access

      access promise by 'This is a $(localvar) for remote access' (implicit) if context is any

             handle => test_scalar       if body context any
         resource_type => literal       if body context any
              admit =>  {'127.0.0.1'}       if body context any
            Promise (version 1.2.3) belongs to bundle 'access_rules' (type server) in file '../tests/units/unit_selectservers.cf' near line 114


   }




All Bodies

control body for type common(no parameters)
   {
   bundlesequence =>  {'test'} if sub-body context any
   }

always body for type action(no parameters)
   {
   ifelapsed => 0 if sub-body context any
   }

control body for type common(no parameters)
   {
   bundlesequence =>  {'testbundle'} if sub-body context any
   version => 1.2.3 if sub-body context any
   }

control body for type server(no parameters)
   {
   allowconnects =>  {'127.0.0.1','::1'} if sub-body context any
   allowallconnects =>  {'127.0.0.1','::1'} if sub-body context any
   trustkeysfrom =>  {'127.0.0.1','::1'} if sub-body context any
   allowusers =>  {'mark'} if sub-body context any
   }

