Beispiel #1
0
class CheckIPs(amp.Command):
    """Check IP addresses already in-use.

    :since: 2.7
    """

    arguments = [(
        b"ip_addresses",
        AmpList([
            (b"ip_address", amp.Unicode()),
            (b"interface", amp.Unicode(optional=True)),
        ]),
    )]
    response = [(
        b"ip_addresses",
        AmpList([
            (b"ip_address", amp.Unicode()),
            (b"interface", amp.Unicode(optional=True)),
            (b"used", amp.Boolean()),
            (b"mac_address", amp.Unicode(optional=True)),
        ]),
    )]
    errors = {}
Beispiel #2
0
class UpdateChunk(amp.Command):
    arguments = [(b'chunk', amp.Unicode())]
    response = [(b'result', amp.Boolean())]
Beispiel #3
0
class UpdateUserPosition(amp.Command):
    arguments = [(b'user', amp.Unicode()), (b'x', amp.Float()),
                 (b'y', amp.Float())]
    response = [(b'result', amp.Boolean())]
Beispiel #4
0
class UpdateMaterial(amp.Command):
    arguments = [(b'x', amp.Integer()), (b'y', amp.Integer()),
                 (b'material', amp.Integer())]
    response = [(b'result', amp.Boolean())]
Beispiel #5
0
class ShowAdj(amp.Command):
    arguments = [('show', amp.Boolean())]
    response = []
Beispiel #6
0
class JobEnded(amp.Command):
    arguments = [
            ('arg_tuple_pickle', amp.String())
            ]
    response = [('ok', amp.Boolean())]
Beispiel #7
0
class FindNode(amp.Command):
    arguments = [('key', amp.String())]
    response = [('node', amp.String()), ('address', amp.String()),
                ('port', amp.Integer()), ('my_key', amp.Boolean())]
Beispiel #8
0
class Count(amp.Command):
    arguments = [(b'n', amp.Integer())]
    response = [(b'ok', amp.Boolean())]
Beispiel #9
0
class Join(amp.Command):
    arguments = [('name', amp.String())]
    response = [('result', amp.Boolean())]
Beispiel #10
0
class FlushCommand(amp.Command):
    arguments = []
    response = [
        ('flush', amp.Boolean()),
    ]
Beispiel #11
0
class PacketBulletUpdate(amp.Command):
    requiresAnswer = False
    arguments = [(b'id', amp.Integer()), (b'position_x', amp.Float()),
                 (b'position_y', amp.Float()), (b'velocity_x', amp.Float()),
                 (b'velocity_y', amp.Float()), (b'active', amp.Boolean())]
    response = []
Beispiel #12
0
class PacketShipInput(amp.Command):
    requiresAnswer = False
    arguments = [(b'id', amp.Integer()), (b'up', amp.Boolean()),
                 (b'down', amp.Boolean()), (b'left', amp.Boolean()),
                 (b'right', amp.Boolean()), (b'fire', amp.Boolean())]
    response = []
Beispiel #13
0
class FetchChickenPlaceCommand(amp.Command):
    response = [('has_chicken', amp.Boolean()), ('place', amp.String()),
                ('id', amp.Integer())]

    arguments = [('id', amp.Integer()), ('info', amp.String())]
Beispiel #14
0
class HandshakeHandler(amp.Command):
    arguments = [(b'asked', amp.Boolean())]

    response = [(b'id', amp.String())]

    errors = {ConnectionError: b'Could not send'}
Beispiel #15
0
class SecuredPing(amp.Command):
    # XXX TODO: actually make this refuse to send over an insecure connection
    response = [('pinged', amp.Boolean())]
Beispiel #16
0
class GetNextMutation(amp.Command):
    arguments = []
    response = [('offset', amp.Integer()), ('mutation_index', amp.Integer()),
                ('stop', amp.Boolean()), ('pause', amp.Boolean())]
Beispiel #17
0
class ApplicationServer_RegisterNewUser(Command):
    arguments = [(b'user_id', amp.Integer()), (b'password', amp.Unicode())]
    response = [(b'ok', amp.Boolean())]
    errors = {Exception: b'Exception'}
Beispiel #18
0
class EndRemote(amp.Command):
    arguments = []
    response = [('bResult', amp.Boolean())]
    """
Beispiel #19
0
class Set(amp.Command):
    arguments = [('key', amp.String()), ('value', amp.String())]
    response = [('status', amp.Boolean())]
Beispiel #20
0
class SendMsg(amp.Command):
    arguments = [('sMsg', amp.String()), ('iTimestamp', amp.Integer())]
    response = [('bResult', amp.Boolean())]
    errors = {SlotErrorNotification: 'SLOT_ERROR_NOTIFICATION'}
    """
Beispiel #21
0
class NewPrev(amp.Command):
    arguments = [('node', amp.String()), ('address', amp.String()),
                 ('port', amp.Integer())]
    response = [('status', amp.Boolean())]
Beispiel #22
0
class TransmitPipegraph(amp.Command):
    arguments = [
            ('jobs', amp.String())
            ]
    response = [('ok', amp.Boolean()), ('exception', amp.String())]