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

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/p/y/pyon-HEAD/pyon/core/governance/policy/policy_interceptor.py   pyon(Download)
    def annotate_denied_message(self, invocation):
        #TODO - Fix this to use the proper annotation reference and figure out special cases
        if invocation.headers.has_key('op') and invocation.headers['op'] != 'start_rel_from_url':
            invocation.message_annotations[GovernanceDispatcher.POLICY__STATUS_ANNOTATION] = GovernanceDispatcher.STATUS_REJECT
 

src/p/y/pyon-HEAD/pyon/core/governance/governance_controller.py   pyon(Download)
 
            #Stop processing message if an issue with the message was found by an interceptor.
            if ( invocation.message_annotations.has_key(GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION) and invocation.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] == GovernanceDispatcher.STATUS_REJECT) or\
               ( invocation.message_annotations.has_key(GovernanceDispatcher.POLICY__STATUS_ANNOTATION) and invocation.message_annotations[GovernanceDispatcher.POLICY__STATUS_ANNOTATION] == GovernanceDispatcher.STATUS_REJECT) :
                break

src/p/y/pyon-HEAD/pyon/core/governance/conversation/conversation_monitor_interceptor.py   pyon(Download)
                (msg_correct, error, should_pop)= self._is_msg_correct(invocation, fsm, transition)
                if not msg_correct:
                    self._report_error(invocation, GovernanceDispatcher.STATUS_REJECT, error)
                    return
 
            (msg_correct, error, should_pop)= self._is_msg_correct(invocation, fsm, transition)
            if not msg_correct:
                self._report_error(invocation, GovernanceDispatcher.STATUS_REJECT, error)
 
            # Stop monitoring if msg is wrong or this is the response of the request that had started the conversation

src/p/y/pyon-HEAD/pyon/ion/test/test_conversation.py   pyon(Download)
        def handle_outgoing_message(*args, **kwargs):
            inv  = args[1]
            if inv.message_annotations.has_key(GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION) and\
               inv.message_annotations[GovernanceDispatcher.CONVERSATION__STATUS_ANNOTATION] == GovernanceDispatcher.STATUS_REJECT:
                    raise WrongMessageAssertion("Monitor detected an error")