Bug 1288120

Summary: Accessing the ae_domains association of an MiqAeServiceTenant object causes error "uninitialized constant MiqAeMethodService::MiqAeServiceMiqAeDomain"
Product: Red Hat CloudForms Management Engine Reporter: mkanoor
Component: AutomateAssignee: mkanoor
Status: CLOSED ERRATA QA Contact: Jan Krocil <jkrocil>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.5.0CC: cpelland, dajohnso, gmccullo, jhardy, jkrocil, jprause, mkanoor, obarenbo, pmcgowan, tfitzger
Target Milestone: GAKeywords: ZStream
Target Release: 5.5.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.2.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1287473 Environment:
Last Closed: 2016-02-10 15:21:28 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: 1287473    
Bug Blocks: 1288119    

Comment 3 CFME Bot 2015-12-07 19:33:55 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=6ebced3d619c040488b05a8e762197c64dae4b9e

commit 6ebced3d619c040488b05a8e762197c64dae4b9e
Merge: 2f5252e ff66e0b
Author:     Greg McCullough <gmccullo>
AuthorDate: Mon Dec 7 14:31:49 2015 -0500
Commit:     Greg McCullough <gmccullo>
CommitDate: Mon Dec 7 14:31:49 2015 -0500

    Merge branch 'bugzilla_1287473_5_5_z' into '5.5.z'
    
    Added Service Model for MiqAeDomain
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1288120
    
    Starting in 5.5 each domain is owned by a tenant, tenants have a
    relationship to domains. The Service Model for MiqAeDomain was not
    being defined. Added Service Model for MiqAeDomain & MiqAeNamespace
    
    Clean Cherry-Pick from PR https://github.com/ManageIQ/manageiq/pull/5689
    
    See merge request !574

 .../service_models/miq_ae_service_miq_ae_domain.rb         |  4 ++++
 .../service_models/miq_ae_service_miq_ae_namespace.rb      |  4 ++++
 .../lib/miq_automation_engine/miq_ae_service_model_spec.rb | 14 ++++++++++++++
 3 files changed, 22 insertions(+)

Comment 5 Jan Krocil 2016-01-20 16:57:20 UTC
Verified fixed in 5.2.2.1 - 5.5.2.1.20160114044944_395c086.

Note:
I used object_walker v1.7, added 'ae_domains' to the @walk_association_whitelist under the 'MiqAeServiceTenant' key and was able to inspect it without any issues.

[----] I, [2016-01-20T11:51:36.596142 #2935:fc7a5c4]  INFO -- : <AEMethod object_walker> object_walker#2B88EB7A:[2] $evm.root['tenant'].ae_domains.each do |ae_domain|
[----] I, [2016-01-20T11:51:36.599849 #2935:fc7a5c4]  INFO -- : <AEMethod object_walker> object_walker#2B88EB7A:[2] (object type: MiqAeServiceMiqAeDomain, object ID: 75)
[----] I, [2016-01-20T11:51:36.607394 #2935:fc7a5c4]  INFO -- : <AEMethod object_walker> object_walker#2B88EB7A:[3] --- attributes follow ---
[----] I, [2016-01-20T11:51:36.612649 #2935:fc7a5c4]  INFO -- : <AEMethod object_walker> object_walker#2B88EB7A:[3] ae_domain.created_on = 2016-01-20 15:34:21 UTC   (type: ActiveSupport::TimeWithZone)
[----] I, [2016-01-20T11:51:36.616392 #2935:fc7a5c4]  INFO -- : <AEMethod object_walker> object_walker#2B88EB7A:[3] ae_domain.description = asdas   (type: String)
[----] I, [2016-01-20T11:51:36.620143 #2935:fc7a5c4]  INFO -- : <AEMethod object_walker> object_walker#2B88EB7A:[3] ae_domain.display_name = nil
[----] I, [2016-01-20T11:51:36.623758 #2935:fc7a5c4]  INFO -- : <AEMethod object_walker> object_walker#2B88EB7A:[3] ae_domain.enabled = true   (type: TrueClass)
...etc...

Comment 6 errata-xmlrpc 2016-02-10 15:21:28 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-2016:0159