Bug 1595259

Summary: [RFE] Have the ability to export a generic object definition as well as namespace to be able to import
Product: Red Hat CloudForms Management Engine Reporter: Cyril Coupel <ccoupel>
Component: UI - OPSAssignee: Patrik Kománek <pkomanek>
Status: CLOSED ERRATA QA Contact: John Dupuy <jdupuy>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9.0CC: cpelland, gmccullo, hkataria, jdupuy, lavenel, mfeifer, mpovolny, obarenbo, simaishi, smallamp
Target Milestone: GAKeywords: FutureFeature
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:33:51 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:

Description Cyril Coupel 2018-06-26 12:46:02 UTC
Description of problem:
A generic object class is based on 2 main elemnts:
- the class definiton in /automate/generic objects
- automate namespace genericObjects

It will be very usefull to be able to have an export of a specific generic object which will include the definition and the namespace.
And then the ability to import it, this way, we can have a library of generic objects that we can share.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Greg McCullough 2019-03-13 13:14:19 UTC
There is a pattern setup that you can follow based on the work by Brant Evans.  See https://github.com/ManageIQ/manageiq/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3Abranic+

Comment 4 Patrik Kománek 2019-05-22 12:25:00 UTC
fixed in PR: https://github.com/ManageIQ/manageiq/pull/18688

Comment 6 John Dupuy 2019-06-03 15:13:15 UTC
Marking this as verified after testing on 5.11.0.6.20190528170806_83cadf2

Steps of verification:
1) Create a generic object class via UI
2) ssh into appliance
3) navigate to "/var/www/miq/vmdb"
4) Run "mkdir tmp/generic_object_definitions"
5) Run "bin/rake evm:export:generic_object_definitions -- --directory tmp/generic_object_definitions"
6) Verified that the exported yaml file was created with the correct details/properties. 
7) Delete the generic object class via the UI
8) Run "bin/rake evm:import:generic_object_definitions -- --source tmp/generic_object_definitions"
9) Verified that the generic object was present in the UI and the details were correct.

Comment 10 errata-xmlrpc 2019-12-12 13:33:51 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/RHBA-2019:4199