Ejemplo n.º 1
0
    def func(**params):
        """Generated function that backs up to a ZMQ call to control server.

        :returns: Dict result returned by server.

        """
        ctrl_sock.send_json(msgs.call_req(obj_name, method, params))
        return ctrl_sock.recv_json()
Ejemplo n.º 2
0
    def func(**params):
        """Generated function that backs up to a ZMQ call to control server.

        :returns: Dict result returned by server.

        """
        ctrl_sock.send_json(msgs.call_req(obj_name, method, params))
        return ctrl_sock.recv_json()
Ejemplo n.º 3
0
    def call(self, obj_name, method, params):
        """Call a remote API method by name.

        This is an alternate interface to the remote API, useful when
        calling the locally constructed methods would simply add an
        extra layer of name parsing. Most useful for text-based clients.

        :param obj_name: Remote object on which to call a method over ZMQ.
        :type obj_name: string
        :param method: Remote method to call over ZMQ.
        :type method: string
        :param params: Params to pass to remote method, called over ZMQ.
        :type params: dict
        :returns: Result dict returned by remote control server.

        """
        self.ctrl_sock.send_json(msgs.call_req(obj_name, method, params))
        return self.ctrl_sock.recv_json()
Ejemplo n.º 4
0
    def call(self, obj_name, method, params):
        """Call a remote API method by name.

        This is an alternate interface to the remote API, useful when
        calling the locally constructed methods would simply add an
        extra layer of name parsing. Most useful for text-based clients.

        :param obj_name: Remote object on which to call a method over ZMQ.
        :type obj_name: string
        :param method: Remote method to call over ZMQ.
        :type method: string
        :param params: Params to pass to remote method, called over ZMQ.
        :type params: dict
        :returns: Result dict returned by remote control server.

        """
        self.ctrl_sock.send_json(msgs.call_req(obj_name, method, params))
        return self.ctrl_sock.recv_json()