Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/p/y/pyon-HEAD/pyon/core/governance/governance_controller.py   pyon(Download)
from pyon.util.log import log
from pyon.ion.resource import RT, OT
from pyon.core.governance import get_system_actor_header, get_system_actor
from pyon.core.governance.policy.policy_decision import PolicyDecisionPointManager
from pyon.ion.event import EventSubscriber
            if system_actor is not None:
                self.system_actor_id = system_actor._id
                self.system_actor_user_header = get_system_actor_header()
 
        log.info("Policy event callback received: %s" % policy_event)
            if system_actor is not None:
                self.system_actor_id = system_actor._id
                self.system_actor_user_header = get_system_actor_header()
 
        if process_instance._proc_type == SERVICE_PROCESS_TYPE:

src/p/y/pyon-HEAD/pyon/core/governance/test/test_governance.py   pyon(Download)
from pyon.ion.resource import PRED, RT
from pyon.core.governance import ORG_MANAGER_ROLE, ORG_MEMBER_ROLE, ION_MANAGER, GovernanceHeaderValues
from pyon.core.governance import find_roles_by_actor, get_actor_header, get_system_actor_header, get_role_message_headers, get_valid_resource_commitments
from interface.services.examples.hello.ihello_service  import HelloServiceProcessClient
from pyon.util.context import LocalContextMixin
        actor_id, _ = self.rr.create(actor)
 
        system_actor_header = get_system_actor_header()
        self.assertDictEqual(system_actor_header['ion-actor-roles'],{'ION': [ORG_MEMBER_ROLE]})