Esempio n. 1
0
class StoreSet(Command):
    """
    Adding a key (permissioned, recursive)
    Adding a key (permissionless, non-recursive)
    """
    """
    sends: object
    recieves: lifetime, signature


    PUBLISH TYPE foobar HASH abc AUTHOR author OBJECT object SIGNATURE sig
    [ 2016-10-11 20:10:10, signature ]
    sends: object
    recieves: lifetime, signature


    DEPLOY TYPE foobar HASH abc AUTHOR author OBJECT object SIGNATURE sig
    [ 2016-10-11 20:10:10, signature ]
    """
    arguments = [
        (b'author', String()),
        # permissioned + recursive || permissionless + unrecursive
        (b'authority', Boolean()),
        (b'hash', String()),
        (b'signature', String()),
        (b'object', String()),
        (b'type', String())
    ]
    response = [(b'lifetime', DateTime()), (b'signature', String())]
    arguments = [(b'blob', ObjBlob()), (b'type', String())]
    # should be providing auths
    Responses = [(b'done', Boolean()), (b'ttl', DateTime())]
    """
class Run(Command):
    """
    Run a test.
    """

    arguments = [(b"testCase", NativeString())]
    response = [(b"success", Boolean())]
Esempio n. 3
0
class JMSetup(JMCommand):
    """Communicates which of "MAKER" or "TAKER"
    roles are to be taken by this client; for MAKER
    role, passes initial offers for announcement (for TAKER, this data is "none")
    """
    arguments = [(b'role', Unicode()), (b'initdata', JsonEncodable()),
                 (b'use_fidelity_bond', Boolean())]
Esempio n. 4
0
class QueryStatus(Command):
    arguments = []
    response = [('fix', Boolean()), ('lat', Float()), ('lon', Float()),
                ('gps_heading', Float()), ('gps_speed', Float()),
                ('altitude', Float()), ('num_sat', Integer()),
                ('timestamp', String()), ('datestamp', String()),
                ('compass_heading', Float()), ('temperature', Float())]
class Start(Command):
    """
    Set up the worker process, giving the running directory.
    """

    arguments = [(b"directory", NativeString())]
    response = [(b"success", Boolean())]
Esempio n. 6
0
class Configure(Command):
    """
    Configure the upgrade helper process.
    """

    arguments = [("filename", String()), ("appropriateStoreClass", String()),
                 ("merge", Boolean())]
Esempio n. 7
0
class StoreGet(Command):
    """
    Geting a key (permissioned, recursive)
    Geting a key (permissionless, non-recursive)
    """
    """
    MONITOR TYPE foobar HASH hash READER reader SIGNATURE sig
    [ Results[], 2016-10-11 20:10:10, signature ]
    SUBSCRIBE TYPE foobar HASH hash READER reader SIGNATURE sig
    [ Results[], 2016-10-11 20:10:10, signature ]
    """

    arguments = [
        (b'reader', String()),
        # permissioned + recursive || permissionless + unrecursive
        (b'authority', Boolean()),
        (b'hash', String()),
        (b'signature', String()),
        (b'object', String()),
        (b'type', String())
    ]
    response = [(b'lifetime', DateTime()), (b'signature', String())]
    arguments = [(b'hash', ObjHash()), (b'type', String())]
    # should be providing auths
    Responses = [(b'blob', ObjBlob()), (b'ttl', DateTime())]
    """
class TestWrite(Command):
    """
    Write test log.
    """

    arguments = [(b"out", NativeString())]
    response = [(b"success", Boolean())]
Esempio n. 9
0
class AddExpectedFailure(Command):
    """
    Add an expected failure.
    """
    arguments = [(b'testName', String()), (b'error', String()),
                 (b'todo', String())]
    response = [(b'success', Boolean())]
class AddSuccess(Command):
    """
    Add a success.
    """

    arguments = [(b"testName", NativeString())]
    response = [(b"success", Boolean())]
class AddSkip(Command):
    """
    Add a skip.
    """

    arguments = [(b"testName", NativeString()), (b"reason", NativeString())]
    response = [(b"success", Boolean())]
Esempio n. 12
0
class AddFailure(Command):
    """
    Add a failure.
    """
    arguments = [(b'testName', String()), (b'fail', String()),
                 (b'failClass', String()), (b'frames', ListOf(String()))]
    response = [(b'success', Boolean())]
Esempio n. 13
0
class AddError(Command):
    """
    Add an error.
    """
    arguments = [(b'testName', String()), (b'error', String()),
                 (b'errorClass', String()), (b'frames', ListOf(String()))]
    response = [(b'success', Boolean())]
Esempio n. 14
0
class SeekGet(Command):
    """
    Grab starting at a hash and moving backwards, with an offset and object count
    Grab starting at a hash and moving forward on the list, with an offset and object count
    Grab from the latest of the list, with an offset and object count
    """
    """
    type : hash : [list]
    foos : bar : [ abc, def, ghi, jkl, mno, pqr, stu, vwx, yz ]

    GET PAST foo stu OFFSET 1 COUNT 3
    GET FUTURE foo ghi OFFSET 2 COUNT 2
    GET CURRENT foo bar OFFSET 5 COUNT 2

    """
    arguments = [
        (b'type', String()),
        (b'direction', String()),  # Forward || reverse
        (b'hash', String()),  # hash || "latest"
        (b'offset', Integer()),
        (b'count', Integer())
    ]
    response = [(b'hashes', String())]  # list of strings...
    arguments = [(b'keyspace', ObjHash()), (b'count', Integer()),
                 (b'forward', Boolean())]
    # should be providing auths
    Responses = [(b'hashes', ListOf(ObjHash()))]
    """
class AddUnexpectedSuccess(Command):
    """
    Add an unexpected success.
    """

    arguments = [(b"testName", NativeString()), (b"todo", NativeString())]
    response = [(b"success", Boolean())]
class JMMsgSignatureVerify(JMCommand):
    """A response to a request to verify the bitcoin signature
    of a message-channel layer message from the daemon
    """
    arguments = [(b'verif_result', Boolean()),
                 (b'nick', Unicode()),
                 (b'fullmsg', Unicode()),
                 (b'hostid', Unicode())]
class AddExpectedFailure(Command):
    """
    Add an expected failure.
    """

    arguments = [
        (b"testName", NativeString()),
        (b"error", NativeString()),
        (b"todo", NativeString()),
    ]
    response = [(b"success", Boolean())]
class AddError(Command):
    """
    Add an error.
    """

    arguments = [
        (b"testName", NativeString()),
        (b"error", NativeString()),
        (b"errorClass", NativeString()),
        (b"frames", ListOf(NativeString())),
    ]
    response = [(b"success", Boolean())]
class AddFailure(Command):
    """
    Add a failure.
    """

    arguments = [
        (b"testName", NativeString()),
        (b"fail", NativeString()),
        (b"failClass", NativeString()),
        (b"frames", ListOf(NativeString())),
    ]
    response = [(b"success", Boolean())]
Esempio n. 20
0
class SetPump(Command):
    """
    This will increase or decrease pump flow
    """
    arguments = [('pumpId', Integer()), ('level', Integer())]
    response = [('response', Boolean())]
Esempio n. 21
0
class AddSkip(Command):
    """
    Add a skip.
    """
    arguments = [(b'testName', String()), (b'reason', String())]
    response = [(b'success', Boolean())]
Esempio n. 22
0
class AddUnexpectedSuccess(Command):
    """
    Add an unexpected success.
    """
    arguments = [(b'testName', String()), (b'todo', String())]
    response = [(b'success', Boolean())]
Esempio n. 23
0
class EarthQuake(Command):
    """
    This is the earth quake!!!
    """
    arguments = [('length', Integer())]
    response = [('response', Boolean())]
Esempio n. 24
0
class ReportEnergy(Command):
    """
    This will report the energy produced
    """
    arguments = [('produced', Integer())]
    response = [('response', Boolean())]
Esempio n. 25
0
class AddSuccess(Command):
    """
    Add a success.
    """
    arguments = [(b'testName', String())]
    response = [(b'success', Boolean())]
Esempio n. 26
0
class JMCommand(Command):
    #a default response type
    response = [(b'accepted', Boolean())]
Esempio n. 27
0
class TestWrite(Command):
    """
    Write test log.
    """
    arguments = [(b'out', String())]
    response = [(b'success', Boolean())]
Esempio n. 28
0
class SetRod(Command):
    """
    This will raise or lower the rods
    """
    arguments = [('level', Integer())]
    response = [('response', Boolean())]
Esempio n. 29
0
class JMFillResponse(JMCommand):
    """Returns ioauth data from MAKER if successful.
    """
    arguments = [(b'success', Boolean()), (b'ioauth_data', Unicode())]
Esempio n. 30
0
class SetValve(Command):
    """
    This will either turn a valve on or off
    """
    arguments = [('valveId', Integer()), ('state', Boolean())]
    response = [('response', Boolean())]