Bug 1616078 - [RFE] Add state_machine_phase attribute to transformation state machines
Summary: [RFE] Add state_machine_phase attribute to transformation state machines
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.10.0
Assignee: Fabien Dupont
QA Contact: Kedar Kulkarni
Depends On:
Blocks: 1623559
TreeView+ depends on / blocked
Reported: 2018-08-14 21:48 UTC by Fabien Dupont
Modified: 2019-02-12 16:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1623559 (view as bug list)
Last Closed: 2019-02-12 16:52:38 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)

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

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'

Note You need to log in before you can comment on or make changes to this bug.