def QueuePauseAction(interface, paused, reason=None, queue=None): return BaseAction('QueuePause', [ ('Interface', interface), ('Paused', paused), ('Queue', queue), ('Reason', reason), ])
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), ])
def __init__(self, family, key): BaseAction.__init__(self, 'DBGet', [ ('Family', family), ('Key', key), ]) self._val = None
def QueuePenaltyAction(interface, penalty, queue=None): return BaseAction('QueuePenalty', [ ('Interface', interface), ('Penalty', penalty), ('Queue', queue), ])
def LoginAction(username, password): return BaseAction('Login', [ ('Username', username), ('Secret', password), ])
def UserEventAction(user_event, headers): params = [('UserEvent', user_event)] params.extend(headers) return BaseAction('UserEvent', params)
def DBDelAction(family, key): return BaseAction('DBDel', [ ('Family', family), ('Key', key), ])
def QueueRemoveAction(queue, interface): return BaseAction('QueueRemove', [ ('Queue', queue), ('Interface', interface), ])
def DBPutAction(family, key, value): return BaseAction('DBPut', [ ('Family', family), ('Key', key), ('Val', value), ])
def _new_action(self, action='Foo', headers=None): if headers is None: headers = [] return BaseAction(action, headers)