github.com/technosophos/deis@v1.7.1-0.20150915173815-f9005256004b/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