Beispiel #1
0
 def get_msg(self, message: Any) -> AcsMsgAndTransition:
     resp = models.GetRPCMethodsResponse()
     resp.MethodList = models.MethodList()
     RPC_METHODS = ['Inform', 'GetRPCMethods', 'TransferComplete']
     resp.MethodList.arrayType = 'xsd:string[%d]' \
                                       % len(RPC_METHODS)
     resp.MethodList.string = RPC_METHODS
     return AcsMsgAndTransition(resp, self.done_transition)
Beispiel #2
0
    def get_msg(self, message: Any) -> AcsMsgAndTransition:
        """
        Return empty message response if care about this
        message type otherwise return empty RPC methods response.
        """
        if not self._is_rpc_request:
            resp = models.DummyInput()
            return AcsMsgAndTransition(msg=resp, next_state=None)

        resp = models.GetRPCMethodsResponse()
        resp.MethodList = models.MethodList()
        RPC_METHODS = ['Inform', 'GetRPCMethods', 'TransferComplete']
        resp.MethodList.arrayType = 'xsd:string[%d]' \
                                    % len(RPC_METHODS)
        resp.MethodList.string = RPC_METHODS
        # Don't transition to next state wait for the empty HTTP post
        return AcsMsgAndTransition(msg=resp, next_state=None)