~cjohnston/uci-engine/1318774

« back to all changes in this revision

Viewing changes to ci-utils/ci_utils/ticket_states.py

  • Committer: Ubuntu CI Bot
  • Author(s): Andy Doan
  • Date: 2014-05-12 15:49:28 UTC
  • mfrom: (466.2.4 ts-model)
  • Revision ID: ubuntu_ci_bot-20140512154928-ng6cll5viw6ylgji
[r=PS Jenkins bot, Chris Johnston] ticket-api: simplify status values

Simplifies the TicketWorkflowStepStatus values to be consistent
and let the user infer the workflow-step using the "current_workflow_step"
attribute of a ticket.  from Andy Doan

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
 
69
69
class TicketWorkflowStepStatus(DBEnumeratedType):
70
 
 
71
 
    NEW = Item(000, "New")
72
 
    PENDING = Item(110, "Not started")
73
 
    PKG_BUILDING_WAITING = Item(210, "Not started")
74
 
    PKG_BUILDING_INPROGRESS = Item(220, "In progress")
75
 
    PKG_BUILDING_COMPLETED = Item(230, "Completed")
76
 
    PKG_BUILDING_FAILED = Item(240, "Package Building Failed")
77
 
    IMAGE_BUILDING_WAITING = Item(310, "Not started")
78
 
    IMAGE_BUILDING_INPROGRESS = Item(320, "In progress")
79
 
    IMAGE_BUILDING_COMPLETED = Item(330, "Completed")
80
 
    IMAGE_BUILDING_FAILED = Item(340, "Image Building Failed")
81
 
    IMAGE_TESTING_WAITING = Item(410, "Not started")
82
 
    IMAGE_TESTING_INPROGRESS = Item(420, "In progress")
83
 
    IMAGE_TESTING_PASSED = Item(430, "Passed")
84
 
    IMAGE_TESTING_FAILED = Item(440, "Image Testing Failed")
85
 
    PKG_PUBLISHING_COMPLETED = Item(510, "Completed")
86
 
    PKG_PUBLISHING_INPROGRESS = Item(520, "In progress")
87
 
    PKG_PUBLISHING_FAILED = Item(540, "Package Publishing Failed")
88
 
    COMPLETED = Item(1000, "Completed")
 
70
    QUEUED = Item(0, 'Not started')
 
71
    INPROGRESS = Item(100, 'In progress')
 
72
    COMPLETED = Item(200, 'Completed')
 
73
    FAILED = Item(300, 'Failed')
89
74
 
90
75
    def __str__(self):
91
76
        return str(self.value)