Bug 1449361

Summary: Automate method to order an Ansible Playbook Service from a button
Product: Red Hat CloudForms Management Engine Reporter: mkanoor
Component: AutomateAssignee: mkanoor
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, dajohnso, dmisharo, gmccullo, jhardy, mkanoor, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: TestOnly
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: automate:ansible:playbook:service:button
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1450485 (view as bug list) Environment:
Last Closed: 2018-03-06 15:18:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1450485    
Attachments:
Description Flags
Button none

Description mkanoor 2017-05-09 19:17:47 UTC
Created attachment 1277424 [details]
Button

Description of problem:
An Ansible Service Playbook can be ordered from a Custom Button

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

How reproducible:
100%

Steps to Reproduce:
1. Create a Custom Button pointing to an Ansible Playbook Service Dialog
3. In the Attribute/Value Pairs section for the button set the service_template_name
2. In the Object Details Section set the System/Process/Request set request to OrderAnsiblePlaybook

Actual results:
Not implemented

Expected results:
The Automate Method should order the service

Additional info:

Comment 3 Dave Johnson 2017-05-10 19:57:39 UTC
Dmitry, can you watch for this one to land in a nightly and start testing this asap please.  we do not want to wait for next weeks build to find any issues with this one.

Comment 4 Dmitry Misharov 2017-05-11 06:26:23 UTC
Yes, I will watch for this BZ.

Comment 5 CFME Bot 2017-05-12 17:13:29 UTC
New commit detected on ManageIQ/manageiq-content/master:
https://github.com/ManageIQ/manageiq-content/commit/00f4a4633f11495ed8ec911464af713d882cabcb

commit 00f4a4633f11495ed8ec911464af713d882cabcb
Author:     mkanoor <mkanoor>
AuthorDate: Wed May 10 12:17:27 2017 -0400
Commit:     mkanoor <mkanoor>
CommitDate: Wed May 10 12:17:27 2017 -0400

    Order Ansible Playbook from a Custom Button using a Method
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1449361

 .../__methods__/order_ansible_playbook.rb          |  76 +++++++++++++
 .../__methods__/order_ansible_playbook.yaml        |  12 ++
 .../Request.class/order_ansible_playbook.yaml      |  12 ++
 .../__methods__/order_ansible_playbook_spec.rb     | 126 +++++++++++++++++++++
 4 files changed, 226 insertions(+)
 create mode 100644 content/automate/ManageIQ/System/Request.class/__methods__/order_ansible_playbook.rb
 create mode 100644 content/automate/ManageIQ/System/Request.class/__methods__/order_ansible_playbook.yaml
 create mode 100644 content/automate/ManageIQ/System/Request.class/order_ansible_playbook.yaml
 create mode 100644 spec/content/automate/ManageIQ/System/Request.class/__methods__/order_ansible_playbook_spec.rb

Comment 7 Dmitry Misharov 2017-10-13 07:50:32 UTC
Verified in 5.9.0.2.20171010190026_0413a06. Service successfully ordered from custom button, Request instance should be called Order_Ansible_Playbook.