Exemplo n.º 1
0
class CeleryTaskRunLogState(IntegerChoicesEnum):

    ACTIVE = Choice(1, _('Active'))
    SUCCEEDED = Choice(2, _('Succeeded'))
    FAILED = Choice(3, _('Failed'))
    RETRIED = Choice(4, _('Retried'))
    EXPIRED = Choice(5, _('Expired'))
Exemplo n.º 2
0
class CeleryTaskLogState(ChoiceEnum):

    WAITING = Choice(1, _('Waiting'))
    ACTIVE = Choice(2, _('Active'))
    SUCCEEDED = Choice(3, _('Succeeded'))
    FAILED = Choice(4, _('Failed'))
    RETRIED = Choice(5, _('Retried'))
Exemplo n.º 3
0
class RequestLogState(IntegerChoicesEnum):

    INCOMPLETE = Choice(0, _('Incomplete'))
    DEBUG = Choice(10, _('Debug'))
    INFO = Choice(20, _('Info'))
    WARNING = Choice(30, _('Warning'))
    ERROR = Choice(40, _('Error'))
Exemplo n.º 4
0
class CeleryTaskInvocationLogState(IntegerChoicesEnum):

    WAITING = Choice(1, _('Waiting'))
    TRIGGERED = Choice(7, _('Triggered'))
    ACTIVE = Choice(2, _('Active'))
    SUCCEEDED = Choice(3, _('Succeeded'))
    FAILED = Choice(4, _('Failed'))
    EXPIRED = Choice(6, _('Expired'))
    TIMEOUT = Choice(8, _('Timeout'))
    IGNORED = Choice(9, _('Ignored'))
    DUPLICATE = Choice(10, _('Duplicate'))
Exemplo n.º 5
0
class LoggedRequestStatus(ChoiceEnum):

    INCOMPLETE = Choice(0, _('Incomplete'))
    DEBUG = Choice(10, _('Debug'))
    INFO = Choice(20, _('Info'))
    WARNING = Choice(30, _('Warning'))
    ERROR = Choice(40, _('Error'))
    CRITICAL = Choice(50, _('Critical'))
Exemplo n.º 6
0
class InputLoggedRequestType(ChoiceEnum):

    COMMON_REQUEST = Choice(1, _('Common request'))
    THROTTLED_REQUEST = Choice(2, _('Throttled request'))
    SUCCESSFUL_LOGIN_REQUEST = Choice(3, _('Successful login request'))
    UNSUCCESSFUL_LOGIN_REQUEST = Choice(4, _('Unsuccessful login request'))
    SUCCESSFUL_2FA_CODE_VERIFICATION_REQUEST = Choice(5, _('Successful two factor code verification request'))
    UNSUCCESSFUL_2FA_CODE_VERIFICATION_REQUEST = Choice(6, _('Unsuccessful two factor code verification request'))
Exemplo n.º 7
0
class Color(ChoiceEnum):
    __order__ = 'RED GREEN BLUE'

    RED = Choice('r', 'Reddish')
    GREEN = 'g'
    BLUE = Choice('b', ugettext_lazy('bluë'))
Exemplo n.º 8
0
class StateFlow(NumChoiceEnum):
    START = Choice(4, 'start', next={'PROCESSING'})
    PROCESSING = Choice(5, 'processing', next={'END'}, initial=False)
    END = Choice(6, 'end', next=set(), initial=False)
Exemplo n.º 9
0
class StateFlowAnyFirst(NumChoiceEnum):
    START = Choice(0, 'start', next={'PROCESSING'})
    PROCESSING = Choice(1, 'processing', next={'END'})
    END = Choice(2, 'end', next=set())
Exemplo n.º 10
0
class IntegerAutoEnum(IntegerChoicesEnum):
    A = auto()
    B = auto(), 'b'
    C = Choice(auto(), 'c')
Exemplo n.º 11
0
class LabeledEnum(ChoiceEnum):
    FOO = Choice('foo', 'Foo')
    BAR = Choice('bar', 'Bar')
    FOOBAR = Choice('foobar', 'Foo')  # this is intentional. see test_nonunique_label
Exemplo n.º 12
0
class IntegerEnum(NumChoiceEnum):
    A = Choice(0, 'foo')
    B = 1
    C = 2
Exemplo n.º 13
0
class CommandState(IntegerChoicesEnum):

    ACTIVE = Choice(1, _('Active'))
    SUCCEEDED = Choice(2, _('Succeeded'))
    FAILED = Choice(3, _('Failed'))
Exemplo n.º 14
0
class TextAutoEnum(TextChoicesEnum):
    A = auto()
    B = auto(), 'b'
    C = Choice(auto(), 'c')
Exemplo n.º 15
0
 class DuplicateEnum(TextChoicesEnum):
     A = Choice(1, 'a')
     B = Choice(1, 'b')
Exemplo n.º 16
0
class SubIntegerEnum(NumChoiceEnum):
    C = Choice(0, 'C', parents=(IntegerEnum.A, IntegerEnum.B))
    D = Choice(1, 'D', parents=(IntegerEnum.B,))
Exemplo n.º 17
0
class LegalReasonState(ChoiceEnum):

    ACTIVE = Choice(1, _('Active'))
    EXPIRED = Choice(2, _('Expired'))
    DEACTIVATED = Choice(3, _('Deactivated'))
Exemplo n.º 18
0
class IntegerEnum(IntegerChoicesEnum):
    A = Choice(0, 'foo')
    B = 1
    C = 2