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

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/p/y/pyon-HEAD/pyon/core/governance/governance_controller.py   pyon(Download)
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
from pyon.core.exception import NotFound, Unauthorized
    def initialize_from_config(self, config):
 
        self.governance_dispatcher = GovernanceDispatcher()
 
        self.policy_decision_point_manager = PolicyDecisionPointManager(self)

src/p/y/pyon-HEAD/pyon/core/governance/policy/test/test_policy_decision.py   pyon(Download)
from mock import Mock, MagicMock
import unittest
from pyon.core.governance.policy.policy_decision import PolicyDecisionPointManager
from pyon.core.exception import NotFound
from pyon.util.unit_test import PyonTestCase
    def test_resource_policies(self):
        gc = Mock()
        resource_id = 'resource_key'
        pdpm = PolicyDecisionPointManager(gc)
        # see that the PDP for resource is empty
    def test_service_policies(self):
        gc = Mock()
        service_key = 'service_key'
        pdpm = PolicyDecisionPointManager(gc)
        # see that the PDP for service is the default
        service_key = 'service_key'
        resource_id = 'resource_id'
        pdpm = PolicyDecisionPointManager(gc)
        invocation = Mock()
        mock_header = Mock()