plugin/builder: sync status enum with upstream
Align our status enums with the one from upstream, i.e. composer's koji API openAPI spec as of commit 8ccbde8.
This commit is contained in:
parent
6b4632385a
commit
790462e967
1 changed files with 4 additions and 10 deletions
|
|
@ -122,23 +122,17 @@ class ComposeRequest:
|
||||||
|
|
||||||
class ImageStatus(enum.Enum):
|
class ImageStatus(enum.Enum):
|
||||||
SUCCESS = "success"
|
SUCCESS = "success"
|
||||||
FAILED = "failed"
|
FAILURE = "failure"
|
||||||
PENDING = "pending"
|
PENDING = "pending"
|
||||||
BUILDING = "building"
|
BUILDING = "building"
|
||||||
UPLOADING = "uploading"
|
UPLOADING = "uploading"
|
||||||
WAITING = "waiting"
|
|
||||||
FINISHED = "finished"
|
|
||||||
RUNNING = "running"
|
|
||||||
|
|
||||||
|
|
||||||
class ComposeStatus:
|
class ComposeStatus:
|
||||||
SUCCESS = "success"
|
SUCCESS = "success"
|
||||||
FAILED = "failed"
|
FAILURE = "failure"
|
||||||
PENDING = "pending"
|
PENDING = "pending"
|
||||||
RUNNING = "running"
|
|
||||||
WAITING = "waiting"
|
|
||||||
REGISTERING = "registering"
|
REGISTERING = "registering"
|
||||||
FINISHED = "finished"
|
|
||||||
|
|
||||||
def __init__(self, status: str, images: List, koji_task_id: str):
|
def __init__(self, status: str, images: List, koji_task_id: str):
|
||||||
self.status = status
|
self.status = status
|
||||||
|
|
@ -156,11 +150,11 @@ class ComposeStatus:
|
||||||
def is_finished(self):
|
def is_finished(self):
|
||||||
if self.is_success:
|
if self.is_success:
|
||||||
return True
|
return True
|
||||||
return self.status in [self.FAILED]
|
return self.status in [self.FAILURE]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_success(self):
|
def is_success(self):
|
||||||
return self.status in [self.SUCCESS, self.FINISHED]
|
return self.status in [self.SUCCESS]
|
||||||
|
|
||||||
|
|
||||||
class Client:
|
class Client:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue