Bug 1164306

Summary: [RFE][M-5] need script to export custom buttons
Product: Red Hat CloudForms Management Engine Reporter: Josh Carter <jocarter>
Component: AutomateAssignee: drew uhlmann <duhlmann>
Status: CLOSED ERRATA QA Contact: Nikhil Dhandre <ndhandre>
Severity: medium Docs Contact:
Priority: high    
Version: 5.3.0CC: akarol, cpelland, duhlmann, gblomqui, gmccullo, jocarter, kmorey, lavenel, mfeifer, mkanoor, nstephan, obarenbo, simaishi, tfitzger, xlecauch
Target Milestone: MVPKeywords: FutureFeature, RFE
Target Release: 5.10.0   
Hardware: All   
OS: All   
Whiteboard: custom:button
Fixed In Version: 5.10.0.11 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 23:02: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: 1555371, 1591579    

Comment 2 Dave Johnson 2015-02-09 22:52:50 UTC
We are in the process of re-evaluating all RFEs, for the short-term, anything in unspecified is getting set to a low priority.  In the coming weeks, these will all be reviewed and re-prioritized to something that closer reflects reality.

Comment 10 Greg McCullough 2018-05-04 17:57:49 UTC
Brad - Can you confirm this request apply only to Automate -> Customization -> Buttons.  I do not think this would include custom buttons for Service Templates.

Erik - Here is an example from the rh-consulting scripts that we can evaluate for this purpose:
https://github.com/rhtconsulting/cfme-rhconsulting-scripts/blob/master/rhconsulting_buttons.rake

Comment 11 bascar 2018-05-14 12:59:32 UTC
Correct, buttons on service templates should be in another request.

Comment 13 Greg McCullough 2018-07-18 21:57:55 UTC
Brad - Question on the implementation: If a existing custom button already exists in the database should we update or skip as the default action during import?  (The same question applies to the group.)

Comment 14 bascar 2018-07-19 13:11:50 UTC
I would like for the script to have an overwrite option. Default does not overwrite however if the flag is there then overwrite.

Comment 15 drew uhlmann 2018-07-31 12:49:14 UTC
https://github.com/ManageIQ/manageiq/pull/17699 got merged, so just waiting on final comments on 17726

Comment 16 drew uhlmann 2018-08-06 12:22:50 UTC
Need to address the overwrite option in subsequent PRs but closing this as post because the two PRs needed for the main functionality have been merged

Comment 17 Nikhil Dhandre 2018-09-27 08:19:07 UTC
I tested it with 5.10 latest

steps:

1. Create custom buttons with different object types
2. Verify buttons and respective groups
3. ssh appliance
4. create one temp dir (suppose /tmp/custom_buttons)

5. export with the following command:
   rake evm:export:custom_buttons -- --directory /tmp/custom_buttons

6. either delete available buttons and groups or just take a new appliance and transfer file created in the temp dir

7. ssh to the new appliance

8. Import with the following command:
    rake evm:import:custom_buttons -- --source /tmp/custom_button/exported_custom_buttons.yaml

9. Check for all exported customs button comes in UI or not.


It's working awesome.

Comment 20 errata-xmlrpc 2019-02-07 23:02:13 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://access.redhat.com/errata/RHSA-2019:0212