github.com/spg/deis@v1.7.3/controller/scheduler/states.py (about) 1 import enum 2 3 4 class TransitionError(Exception): 5 """Raised when a transition from one state to another is illegal""" 6 7 def __init__(self, prev, next, msg): 8 self.prev = prev 9 self.next = next 10 self.msg = msg 11 12 13 class JobState(enum.Enum): 14 initialized = 1 15 created = 2 16 up = 3 17 down = 4 18 destroyed = 5 19 crashed = 6 20 error = 7