Page Tools

    Developing with ADAGE

    Communicating with the daemon

    The adage daemon can support various communication protocols. Currently, two protocols have been implemented: the command line and a basic socket based protocols.

    Command line protocol

    This protocol is internal to ADAGE. It build the command to the adage daemon based on the arguments given on the command line. In particular, the daemon is ended when all commands have been executed.

    Basic socket protocol

    This simple protocol is based on a request-answer based protocol, both being string based. By default, ADAGE listen to the port 35000, or the first available open greater than it.

    Request format

    The request is a string ended by the sequence EOT\012\015. The various elements of the string are separated by a single space.

      * loglevel=INT       : level of verbosity (...., 3: info, 4: debug)
      * appl=STRING        : path to the application description file
      * replaceappl=STRING : path to the application description file to replace (redeployment)
      * res=STRING         : path to the resource description file
      * ctrl=STRING        : path to the control parameter description file
      * dryrun             : simulate a deployment
      * run                : execute a deployment


    There is a PYTHON class to simplify the communication with the daemon:

    class Adage:
        def __init__(self, host="localhost", port=35000)
        def connect(self)
        def disconnect(self)
        def setLogLevel(self, level) # to be called before startRequest
        def startRequest(self)
        def setAppl(self, appl):
        def setReplaceAppl(self, appl)
        def setCtrl(self, ctrl)
        def setRes(self, res)
        def setDryRun(self)
        def setRun(self)
        def sendAndWaitRequest(self)

    Example of use


    Powered by Heliovista - Création site internet