diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2018-11-20 11:19:55 -0500 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2018-11-26 14:07:15 -0500 |
commit | b7c4d286ffa618be0e95b15f3883e2f6920a3fb1 (patch) | |
tree | 930e9b9282b8f50e671844b2a1e7f39dc5d6035d /src/workflow/workflow_factory.py | |
parent | 6a90796de1df8d74c79415c39c867ffe6cd80fd0 (diff) |
Fix all flake8 errors
The flake8 command in test.sh finds no longer finds any errors.
This may form a basis of a jenkins verify job as a sort of 'weak compile-time checks'
The flake8 command will not complain about line length, and will not complain about
django's manage.py file
Change-Id: Ic47cb4fc7ada55e64485661ab6881aef475018ff
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/workflow/workflow_factory.py')
-rw-r--r-- | src/workflow/workflow_factory.py | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/src/workflow/workflow_factory.py b/src/workflow/workflow_factory.py index 7c0dcb9..9a42d86 100644 --- a/src/workflow/workflow_factory.py +++ b/src/workflow/workflow_factory.py @@ -8,30 +8,33 @@ ############################################################################## -from workflow.booking_workflow import * -from workflow.resource_bundle_workflow import * -from workflow.sw_bundle_workflow import * -from workflow.snapshot_workflow import * -from workflow.models import Workflow, Repository +from workflow.booking_workflow import Booking_Resource_Select, SWConfig_Select, Booking_Meta +from workflow.resource_bundle_workflow import Define_Hardware, Define_Nets, Resource_Meta_Info +from workflow.sw_bundle_workflow import Config_Software, Define_Software, SWConf_Resource_Select +from workflow.snapshot_workflow import Select_Host_Step, Image_Meta_Step import uuid import logging logger = logging.getLogger(__name__) + class BookingMetaWorkflow(object): workflow_type = 0 color = "#0099ff" is_child = False + class ResourceMetaWorkflow(object): workflow_type = 1 color = "#ff6600" + class ConfigMetaWorkflow(object): workflow_type = 2 color = "#00ffcc" + class MetaRelation(object): def __init__(self, *args, **kwargs): self.color = "#cccccc" @@ -47,8 +50,8 @@ class MetaRelation(object): 'depth': self.depth, } + class MetaStep(object): - #valid = 0 #0 is not checked, 1 is invalid, 2 is valid UNTOUCHED = 0 INVALID = 100 @@ -89,37 +92,37 @@ class MetaStep(object): def __ne__(self, other): return self.id.int != other.id.int + class WorkflowFactory(): - #def __init__(self, *args, **kwargs): booking_steps = [ - Booking_Resource_Select, - SWConfig_Select, - Booking_Meta - ] + Booking_Resource_Select, + SWConfig_Select, + Booking_Meta + ] resource_steps = [ - Define_Hardware, - Define_Nets, - Resource_Meta_Info, - ] + Define_Hardware, + Define_Nets, + Resource_Meta_Info, + ] config_steps = [ - SWConf_Resource_Select, - Define_Software, - Config_Software, - ] + SWConf_Resource_Select, + Define_Software, + Config_Software, + ] snapshot_steps = [ - Select_Host_Step, - Image_Meta_Step - ] + Select_Host_Step, + Image_Meta_Step + ] def conjure(self, workflow_type=None, repo=None): workflow_types = [ - self.booking_steps, - self.resource_steps, - self.config_steps, - self.snapshot_steps, + self.booking_steps, + self.resource_steps, + self.config_steps, + self.snapshot_steps, ] steps = self.make_steps(workflow_types[workflow_type], repository=repo) |