Bug 1363774

Summary: Reset Automate Datastore text misleading
Product: Red Hat CloudForms Management Engine Reporter: Christian Jung <cbolz>
Component: AutomateAssignee: Patrik Kománek <pkomanek>
Status: CLOSED ERRATA QA Contact: Milan Falešník <mfalesni>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: benglish, gmccullo, hkataria, jhardy, mfalesni, mkanoor, mpovolny, obarenbo, simaishi, tfitzger
Target Milestone: GA   
Target Release: 5.7.0   
Hardware: All   
OS: Linux   
Whiteboard: automate
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-04 12:58:53 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 Christian Jung 2016-08-03 14:07:10 UTC
Description of problem:
When you navigate to Automate, Import/Export you can click on "Reset all Datastore custom classes and instances to default" - although it says so, it only resets the ManageIQ and Red Hat domain and doesn't touch any custom domains.

This was true when we didn't have the multiple domains in very old versions. 

Version-Release number of selected component (if applicable):
5.6, but earlier versions too

How reproducible:
always

Steps to Reproduce:
1. navigate to Automate, Export/Import
2. Reset all Datastore custom classes and instances to default
3.

Actual results:
It actually doesn't reset the "custom classes", it only reset the ManageIQ and Red Hat Domains - it doesn't change anything on custom (aka. user created) domains.


Expected results:
The text should be less confusing

Additional info:
it's not obvious you have to click on the arror icon to actually perform this action. There should be an easy to identify button.

Comment 3 Greg McCullough 2016-08-04 15:11:26 UTC
Suggested change: "Reset all components in the following domains: XXX, YYY"

We will need a method in the MiqAeDatastore model to return the names which need to be read from the YAML files stored in fixtures/ae_datastore directory.

Comment 5 Greg McCullough 2016-08-08 13:11:20 UTC
Patrik - I would like to refactor the code in reset_to_defaults to create a new method that yields the domain_file.  This new method can then be used in reset_to_defaults as well as a new method that returns the Domain name that is stored in the domain_file (which is yaml).

The code I am referring to is here: https://github.com/ManageIQ/manageiq/blob/master/lib/miq_automation_engine/models/miq_ae_datastore.rb#L167

Comment 6 Patrik Kománek 2016-09-05 15:30:35 UTC
solved in PR: https://github.com/ManageIQ/manageiq/pull/10899

Comment 7 Greg McCullough 2016-09-07 17:30:04 UTC
*** Bug 1373996 has been marked as a duplicate of this bug. ***

Comment 8 Milan Falešník 2016-09-29 12:31:48 UTC
Verified in 5.7.0.1

The text is now more descriptive.

Comment 10 errata-xmlrpc 2017-01-04 12:58:53 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-2017-0012.html