Exemplo n.º 1
0
def QueuePauseAction(interface, paused, reason=None, queue=None):
    return BaseAction('QueuePause', [
        ('Interface', interface),
        ('Paused', paused),
        ('Queue', queue),
        ('Reason', reason),
    ])
Exemplo n.º 2
0
def QueueAddAction(queue,
                   interface,
                   member_name=None,
                   state_interface=None,
                   penalty=None,
                   skills=None):
    return BaseAction('QueueAdd', [
        ('Queue', queue),
        ('Interface', interface),
        ('MemberName', member_name),
        ('StateInterface', state_interface),
        ('Penalty', penalty),
        ('Skills', skills),
    ])
Exemplo n.º 3
0
def QueuePenaltyAction(interface, penalty, queue=None):
    return BaseAction('QueuePenalty', [
        ('Interface', interface),
        ('Penalty', penalty),
        ('Queue', queue),
    ])
Exemplo n.º 4
0
def LoginAction(username, password):
    return BaseAction('Login', [
        ('Username', username),
        ('Secret', password),
    ])
Exemplo n.º 5
0
def UserEventAction(user_event, headers):
    params = [('UserEvent', user_event)]
    params.extend(headers)
    return BaseAction('UserEvent', params)
Exemplo n.º 6
0
def DBDelAction(family, key):
    return BaseAction('DBDel', [
        ('Family', family),
        ('Key', key),
    ])
Exemplo n.º 7
0
def QueueRemoveAction(queue, interface):
    return BaseAction('QueueRemove', [
        ('Queue', queue),
        ('Interface', interface),
    ])
Exemplo n.º 8
0
def DBPutAction(family, key, value):
    return BaseAction('DBPut', [
        ('Family', family),
        ('Key', key),
        ('Val', value),
    ])
Exemplo n.º 9
0
 def _new_action(self, action='Foo', headers=None):
     if headers is None:
         headers = []
     return BaseAction(action, headers)