|
|
Line 1: |
Line 1: |
| An AMQP message body may contain 1 or more QMF messages
| | For the xmlrpc part: |
|
| |
|
| | The server.py defines the |
| | [1]class XmlRpcInterface() |
| | ----- |
| | #def _setpu_handlers |
| | #def list_modules |
| | #def list_methods |
| | #def inventory |
| | #def get_dispatch_method |
|
| |
|
| The Request-Response Pattern
| |
|
| |
|
| In the request-response pattern, a requestor sends a request message to one of its peers. The peer then does one of two things: If the request can be successfully processed, a single response message is sent back to the requestor. This response contains the requested results and serves as the positive acknowledgement that the request was successfully completed.
| | [2]FuncApiMethod |
| | #def __log_exc (Log an exception) |
| | #def __call__ () |
| | #def serve() (code for starting the XMLRPC service) |
|
| |
|
| If the request cannot be successfully completed, the peer sends a command complete message back to the requestor with an error code and error text describing what went wrong.
| |
|
| |
|
| The sequence number in the response or command complete message is the same as the sequence number in the request.
| | [3]FuncXMLRPCServer |
|
| |
|
| Requestor Peer
| | [4]FuncSSLXMLRPCServer * |
| | |
| | #def __init__ |
| | --- Request (seq) ------------------------------------------> |
| | #def _dispatch(self,method,params): |
| | |
| | #def auth_cb |
| | <----------------------------------------- Response (seq) --- |
| | #def excepthook |
| | |
| | #def main(argv) |
|
| |
|
| Requestor Peer
| |
| | |
| |
| | --- Request (seq) ------------------------------------------> |
| |
| | |
| |
| | <-------------------------- Command Complete (seq, error) --- |
| |
| | |
| |
|
| |
|
|
| |
|
| | The AuthedXMLRPCServer.py defines |
|
| |
|
| | [1]class AuthedSimpleXMLRPCRequestHandler |
| | protocol_version = "HTTP/1.1" |
|
| |
|
| Broker Request Message
| | #def setup(self) |
| | #def do_POST(self) |
|
| |
|
| When a management console first establishes contact with the broker, it sends a Broker Request message to initiate the exchange.
| | [2]class BaseAuthedXMLRPCServer |
| | #def __init__ |
| | #def get_authinfo |
|
| |
|
| routing_key: broker
| | [3]class AuthedSSLXMLRPCServer |
| +-----+-----+-----+-----+-----------------------+
| |
| | 'A' | 'M' | '2' | 'B' | 0 |
| |
| +-----+-----+-----+-----+-----------------------+
| |
|
| |
|
| The Broker Request message has no payload.
| | [4]class AuthedXMLRPCServer |
| Broker Response Message
| |
| | |
| When the broker receives a Broker Request message, it responds with a Broker Response message. This message contains an identifier unique to the broker.
| |
| | |
| routing_key: <reply_to from request>
| |
| +-----+-----+-----+-----+-----------------------+
| |
| | 'A' | 'M' | '2' | 'b' | 0 |
| |
| +-----+-----+-----+-----+-----------------------+----------------------------+
| |
| | brokerId (uuid) |
| |
| +----------------------------------------------------------------------------+
| |
| | |
| Command Completion Message
| |
| | |
| routing_key: <reply_to from request>
| |
| +-----+-----+-----+-----+-----------------------+
| |
| | 'A' | 'M' | '2' | 'z' | seq |
| |
| +-----+-----+-----+-----+----+------------------+
| |
| | Completion Code (uint32) |
| |
| +----------------------------+------------------------------------+
| |
| | Completion Text (str8) |
| |
| +-----------------------------------------------------------------+
| |
| | |
| Class Query
| |
| | |
| routing_key: broker
| |
| +-----+-----+-----+-----+-----------------------+
| |
| | 'A' | 'M' | '2' | 'Q' | seq |
| |
| +-----+-----+-----+-----+-----------------------+----------+
| |
| | package name (str8) |
| |
| +----------------------------------------------------------+
| |
| | |
| Class Indication
| |
| | |
| routing_key: <reply_to from request> (if in reply to a request)
| |
| schema.package (if unsolicited)
| |
| +-----+-----+-----+-----+-----------------------+
| |
| | 'A' | 'M' | '2' | 'q' | seq |
| |
| +-----+-----+-----+-----+---------------+-------+
| |
| | class kind (uint8) 1=Object, 2=Event |
| |
| +---------------------------------------+------------------+
| |
| | package name (str8) |
| |
| +----------------------------------------------------------+
| |
| | class name (str8) |
| |
| +----------------------------------------------------------+
| |
| | schema hash (bin128) |
| |
| +----------------------------------------------------------+
| |
| | |
| Schema Request
| |
| | |
| routing_key: broker
| |
| +-----+-----+-----+-----+-----------------------+
| |
| | 'A' | 'M' | '2' | 'S' | seq |
| |
| +-----+-----+-----+-----+-----------------------+----------+
| |
| | packageName (str8) |
| |
| +----------------------------------------------------------+
| |
| | className (str8) |
| |
| +----------------------------------------------------------+
| |
| | schema-hash (bin128) |
| |
| +----------------------------------------------------------+
| |
| | |
| Schema Response
| |
| | |
| routing_key: <reply_to from request> (if in reply to a request)
| |
| schema.package (if unsolicited)
| |
| +-----+-----+-----+-----+-----------------------+
| |
| | 'A' | 'M' | '2' | 's' | seq |
| |
| +-----+-----+-----+-----+------------+----------+
| |
| | kind (uint8) 1=Object, 2=Event |
| |
| +------------------------------------+---------------------+
| |
| | packageName (str8) |
| |
| +----------------------------------------------------------+
| |
| | className (str8) |
| |
| +----------------------------------------------------------+
| |
| | schema-hash (bin128) |
| |
| +-----------------------------------------------+----------+
| |
| | propCount (uint16) |
| |
| +-----------------------------------------------+
| |
| | statCount (uint16) |
| |
| +-----------------------------------------------+
| |
| | methodCount (uint16) |
| |
| +-----------------------------------------------+----------------------------+
| |
| | propCount property records |
| |
| +----------------------------------------------------------------------------+
| |
| | statCount statistic records |
| |
| +----------------------------------------------------------------------------+
| |
| | methodCount method records |
| |
| +----------------------------------------------------------------------------+
| |
| | |
| Each property record is an AMQP map with the following fields. Optional fields may optionally be omitted from the map.
| |