Refactor DB shema for task results
* Task table changed to reflect new schema * Subtask table introduced * TaskResults renamed to Workload and now contains a bunch of separate attributes rather then fields in dicts. * TaskResults 'raw' data are now stored in a separate table WorkloadData. * Tag table introduced * Store hooks result in workload model Co-Authored-By: Illia Khudoshyn <ikhudoshyn@mirantis.com> Co-Authored-By: Roman Vasilets <rvasilets@mirantis.com> Co-Authored-By: Anton Studenov <astudenov@mirantis.com> Change-Id: I80ac8942eec123e734bf465133397408be5ba88e
This commit is contained in:
parent
b3381fa830
commit
d7e45313e0
@ -49,6 +49,19 @@ JSON_SCHEMA = "http://json-schema.org/draft-04/schema"
|
||||
|
||||
|
||||
class _TaskStatus(utils.ImmutableMixin, utils.EnumMixin):
|
||||
# TODO(ikhudoshyn): new statuses
|
||||
# INIT = "init"
|
||||
# VALIDATING = "validating"
|
||||
# VALIDATED = "validated"
|
||||
# VALIDATION_FAILED = "validation_failed"
|
||||
# ABORTING = "aborting"
|
||||
# SOFT_ABORTING = "soft_aborting"
|
||||
# ABORTED = "aborted"
|
||||
# CRASHED = "crashed"
|
||||
# RUNNING = "running"
|
||||
# FINISHED = "finished"
|
||||
|
||||
# TODO(ikhudoshyn): deprecated statuses
|
||||
INIT = "init"
|
||||
VERIFYING = "verifying"
|
||||
SETTING_UP = "setting up"
|
||||
@ -62,6 +75,12 @@ class _TaskStatus(utils.ImmutableMixin, utils.EnumMixin):
|
||||
PAUSED = "paused"
|
||||
|
||||
|
||||
class _SubtaskStatus(utils.ImmutableMixin, utils.EnumMixin):
|
||||
RUNNING = "running"
|
||||
FINISHED = "finished"
|
||||
CRASHED = "crashed"
|
||||
|
||||
|
||||
class _DeployStatus(utils.ImmutableMixin, utils.EnumMixin):
|
||||
DEPLOY_INIT = "deploy->init"
|
||||
DEPLOY_STARTED = "deploy->started"
|
||||
@ -188,7 +207,13 @@ class _HookStatus(utils.ImmutableMixin, utils.EnumMixin):
|
||||
VALIDATION_FAILED = "validation_failed"
|
||||
|
||||
|
||||
class _TagType(utils.ImmutableMixin, utils.EnumMixin):
|
||||
TASK = "task"
|
||||
SUBTASK = "subtask"
|
||||
|
||||
|
||||
TaskStatus = _TaskStatus()
|
||||
SubtaskStatus = _SubtaskStatus()
|
||||
DeployStatus = _DeployStatus()
|
||||
EndpointPermission = _EndpointPermission()
|
||||
ServiceType = _ServiceType()
|
||||
@ -197,3 +222,4 @@ EndpointType = _EndpointType()
|
||||
TempestTestsAPI = _TempestTestsAPI()
|
||||
TempestTestsSets = _TempestTestsSets()
|
||||
HookStatus = _HookStatus()
|
||||
TagType = _TagType()
|
||||
|
Loading…
x
Reference in New Issue
Block a user