Previous: Brick ArchitectureUp: Addanc Tech SpecsNext: <none>

Addanc Reference Manual
Addanc Tech Specs

Addanc HomeIndexTable of Contents

Brick/Commander xmlrpc Interface


Brick/Commander jabber/xmlrpc Interface

  1. The Brick/Commander command channel is implemented using the Jabber xmlrpc interface. Thus, both the Commander and the Brick must have network access to a jabber server and accounts on that server. 
  2. The AddancCommander issues commands to the AddancBrick, identified to the AddancCommander via the resource ID or Brick ID of the AddancBrick's jabber account/login.
  3. The Brick registers the following xmlrpc command handlers:
    AddancBrickrpc Interface
    def rpc_halt(self):
        """
        HALT: Stop generating load NOW (PANIC STOP.)

        Possible Return Values:
            return "ok"
        """
    def rpc_stop(self):
        """
        STOP: Stop generating load according to RUNOUT flag.

        Possible Return Values:
            return "ok"
        """
    def rpc_script(self, pickeledScript):
        """
        SCRIPT <Script> Recieve a script specification (in pickled XML format),
                        and create a new script object to be used for the
                        next test (New script will be loaded into thenVC Factory
                        immediatly.)

        Possible Return Values:
            return "ok"
            return "error:arg"
        """
    def rpc_rate(self, vcsPerMin):
        """
        RATE <VCs/min> A. Specify the arrival rate for the test, or
                       B. Change the arrival rate for the currently
                           running test
        <vcsPerMin> should be a float() or a string that returns a
                    non-error when evaluated by float()

        Possible Return Values:
            return "ok"
            return "error:arg"
        """
    def rpc_schedule(self, startTime):
         """
        SCHEDULE <start time>  Start a test at <start time>
        <start time> is a string containing a date/time specification

        Possible Return Values:
            return "ok"
            return "error:arg"
        """
    def rpc_instrumentation(self, fileName):
        """
        INSTRUMENTATION <filename>  Specify the instrumentation file.
        <filename> is a string containing a path/filename

        Possible Return Values:
            return "ok"
            return "error:arg"
        """
    def rpc_enableRunout(self, value=True):
        """
        ENABLE RUNOUT Allow VC to complete script at end of test
        <value> if True, enable run out for scripts,
                if False, disable runout, abort VCs at end of test

        Possible Return Values:
            return "ok"
        """
    def rpc_returnInstrumentation(self):
        """
        RETURN INSTRUMENTATION Send back the collected instrumentation data

        Possible Return Values:
            return "ok"
        """
    RECOMEND: Defer Implementation, needs additional detail and/or justification - EJG
    def rpc_resetInstrumentation(self):
        """
        RESET INSTRUMENTATION Start new set of measurements,
                              discard previous instrumentation data

        Possible Return Values:
            return "ok"
        """
    RECOMEND: Defer Implementation,needs additional detail and/or justification - EJG
    def rpc_status(self):
        """
        STATUS Return status information

        Possible Return Values:
            return messageDict  where
                   messageDict = {
                    'resource': string w/ brickID
                    'state': string with brick state
                    'activevcs': integer with number of Active VCs
                    'arrivalrate' : float with specified arrival rate
                    'arrivalrate_generated_all': float with measured "arrival rate"
                      as generated by this brick
                    'arrivalrate_generated_last5min': float with measured "arrival
                      rate" as generated by this brick during the last 5 minutes
                    'arrivalrate_generated_last1min': float with measured "arrival
                      rate" as generated by this brickduring the last minute
                    'bsent_all': integer sent byte count for all transactions
                      during the test
                    'bsent_last5min': integer sent byte count for all transactions
                      during the last 5 minutes
                    'bsent_last1min': integer sent byte count for all transactions
                      during the last minute
                    'brecv_all': integer recvbyte count for all transactions
                      during the test
                    'brecv_last5min':integer recvbyte count for all transactions
                      during the last 5 minutes
                    'brecv_last1min': integer recv byte count for all transactions
                      during the last minute
                            }
        """ 
    Note: This message response is not currently implemented. Requesting feedback.

  4. Current HEARTBEAT message sent to AddancCommander by an AddancBrick (to add VC accounting into the HEARTBEAT message.):
    Current AddancBrick HEARTBEAT Interface
        messageDict = {
          'resource':self._jabberConnection._brickID,
          'state':self._state,
          'newvcqueuedepth':self._newVCQ.qsize(),
          'runqueuedepth':self._runQ.qsize(),
          'processqueuedepth':self._processQ.qsize(),
          'waitqueuedepth':self._waitQ.qsize(),
          'internalwaitqueuedepth':self._vcWaitQProcessor.getWaitQDepth(),
          'selectsend':len(self._vcTxnGenerator._sendPendingVCs),
          'selectreceive':len(self._vcTxnGenerator._recvPendingVCs
          'vc_active': activeVCcount # integer count of currently active VCs
          'vc_new': vcStartAccounting #integer count of new/started VCs
          'vc_success': suc #integer count of successful script completions
          'vc_fail': fail #integer count of failed Vcs
          'vc_abort': abort #integer count of aborted VCs
          }

        Message dispatched via:
        jabberConnection.sendXMLMessageTo(jid=.commanderJID,
                                          xml=xmlrpclib.dumps((messageDict,)))

Previous: Brick Architecture Up: Addanc Tech Specs Next: <none>
Page Updated: 09/14/2003