Bug 1616078

Summary: [RFE] Add state_machine_phase attribute to transformation state machines
Product: Red Hat CloudForms Management Engine Reporter: Fabien Dupont <fdupont>
Component: AutomateAssignee: Fabien Dupont <fdupont>
Status: CLOSED CURRENTRELEASE QA Contact: Kedar Kulkarni <kkulkarn>
Severity: low Docs Contact:
Priority: medium    
Version: 5.9.4CC: fdupont, mkanoor, obarenbo, simaishi, smallamp, tfitzger
Target Milestone: GAKeywords: FutureFeature, TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.11 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1623559 (view as bug list) Environment:
Last Closed: 2019-02-12 16:52:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1623559    

Description Fabien Dupont 2018-08-14 21:48:55 UTC
When refactoring Transformation - PowerOn method, we made it generic by checking in which phase we are: either transformation, or cleanup. We do it by checking whether we have service_template_transformation_plan_task or service_template_plan_task_id as attribute of $evm.root. However, both attributes are really close in spelling and the check doesn't express the intent.

It would be great to add an attribute to the transformation state machines to explicitly state that it is a transformation or cleanup state machine. This would ease the check in methods that can be used in both phases.

Comment 2 Fabien Dupont 2018-08-14 21:50:04 UTC
Associated PR: https://github.com/ManageIQ/manageiq-content/pull/402

Comment 6 Kedar Kulkarni 2018-10-02 17:26:47 UTC
I validated that following Attributes and Values are present in Automate code on 5.10.0.17:

1. The state machines in /Transformation/StateMachines/VMTransformation have an attribute name 'state_machine_phase'
2. This attribute for state machine /Transformation/StateMachines/VMTransformation/Transformation has a value of 'transformation'
3. This attribute for state machine /Transformation/StateMachines/VMTransformation/TransformationCleanup has a value of 'cleanup'