Bug 1203426

Summary: [RFE] Automate: Identify if a class is a State Machine
Product: Red Hat CloudForms Management Engine Reporter: mkanoor
Component: AutomateAssignee: mkanoor
Status: CLOSED ERRATA QA Contact: Dave Johnson <dajohnso>
Severity: low Docs Contact:
Priority: low    
Version: 5.4.0CC: gmccullo, jhardy, mkanoor, obarenbo, sshveta, tfitzger
Target Milestone: GAKeywords: FutureFeature
Target Release: 5.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-16 12:54:04 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: 1205453    

Description mkanoor 2015-03-18 19:13:22 UTC
Description of problem:
For Service Provisioning and Retirement we provide the user with an option to pick the entry state machine. When the UI displays the classes it doesn't know if the user is pointing to a state machine instance or a regular instance.

Version-Release number of selected component (if applicable):
New Feature

How reproducible:
New feature

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
This ticket relates to making changes in the backend for adding a new ae_class_type column for MiqAeClass with the value state_machine. The UI changes to limit the scope to State Machine classes is not included in this ticket.

Comment 2 CFME Bot 2015-03-19 22:01:08 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/1d5713e014062bcdaa2dacb158727aba1aae0ea8

commit 1d5713e014062bcdaa2dacb158727aba1aae0ea8
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Thu Mar 19 15:39:53 2015 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Thu Mar 19 15:39:53 2015 -0400

    Function to check if a class machine is state_machine
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1203426
    
    A class is a state machine class if it has atleast one
    state field defined.

 vmdb/app/models/miq_ae_class.rb       |  4 ++++
 vmdb/spec/models/miq_ae_class_spec.rb | 37 +++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

Comment 3 CFME Bot 2015-03-19 22:01:12 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/0395a5bee8a28ff90f22d4300e57d815e1e48985

commit 0395a5bee8a28ff90f22d4300e57d815e1e48985
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Thu Mar 19 16:46:18 2015 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Thu Mar 19 16:46:18 2015 -0400

    Function to check if a class is a state_machine
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1203426

 vmdb/app/models/miq_ae_class.rb       |  2 +-
 vmdb/spec/models/miq_ae_class_spec.rb | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

Comment 4 mkanoor 2015-03-19 22:10:37 UTC
This is only the backend changes, it can't be tested till the UI is changed for Service Catalog Item. That UI screen allows the end user to select an Entry point for Provisioning/Retirement/Reconfigure a Service. The current list of instances are any instance in the DB, the plan is to have the UI to only allow those instances which are part of State Machine class.

Comment 6 Shveta 2015-04-23 22:42:37 UTC
Only statemachines are shown in entry point fields.
Verified in 5.4.0.0.22.20150420163946_26004d1

Comment 8 errata-xmlrpc 2015-06-16 12:54:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1100.html