From 70646dab3ec780011e18b6c1496ec5c11997dc87 Mon Sep 17 00:00:00 2001 From: nhertz <nhertz@nrao.edu> Date: Thu, 8 Oct 2020 15:06:41 -0600 Subject: [PATCH] Added CapabilityEventType enum that keeps track of the type a capability event can have; its values correspond to the capability step that would await that event --- shared/workspaces/src/workspaces/helpers.py | 24 ++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/shared/workspaces/src/workspaces/helpers.py b/shared/workspaces/src/workspaces/helpers.py index d8f48c591..1d1236e94 100644 --- a/shared/workspaces/src/workspaces/helpers.py +++ b/shared/workspaces/src/workspaces/helpers.py @@ -67,11 +67,11 @@ class CapabilityStepType(Enum): Enum that specifies the types of CapabilitySteps that are possible """ PrepareAndRunWorkflow = 0 - AwaitQA = auto() - AwaitWorkflow = auto() - AwaitProduct = auto() - AwaitParameter = auto() - AwaitLargeAllocApproval = auto() + AwaitQA = 1 + AwaitWorkflow = 2 + AwaitProduct = 3 + AwaitParameter = 4 + AwaitLargeAllocApproval = 5 @classmethod def from_string(cls, string: str) -> CapabilityStepType: @@ -86,6 +86,20 @@ class CapabilityStepType(Enum): return strings[string] +class CapabilityEventType(Enum): + """ + Enum that specifies the type of CapabilityEvents possible to send + """ + WorkflowComplete = 0 + QaApproval = 1 + QaDenial = 1 + WorkflowReady = 2 + ProductReady = 3 + ParameterReady = 4 + LargeAllocApproval = 5 + LargeAllocDenial = 5 + + class RequestState(Enum): """ Enum that specifies the states that a capability request can be in -- GitLab