Bug 1328905 - [RFE] Expose an 'Account' Active Record as a Service Model, with an association from MiqAeServiceVm
Summary: [RFE] Expose an 'Account' Active Record as a Service Model, with an associati...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.6.0
Assignee: Lucy Fu
QA Contact: Matouš Mojžíš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-20 14:22 UTC by Peter McGowan
Modified: 2016-06-29 15:51 UTC (History)
9 users (show)

Fixed In Version: 5.6.0.5
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 15:51:47 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Peter McGowan 2016-04-20 14:22:54 UTC
Description of problem:

We would like to be able to access the list of users and groups returned from SmartState Analysis, from an Automate Method. This seems to be in the 'accounts' table, but there is no corresponding service model.

It would be extremely useful to be able to access this list of users and groups via an association from the VM service model object.

Comment 3 Greg McCullough 2016-04-22 18:37:45 UTC
Lucy - Please create the Account service model for automate and expose the accounts, users and groups relationships for the vm_or_template model.

They are exposed on the active_record model here:
https://github.com/ManageIQ/manageiq/blob/96d0d63389b57a530a31da7a69e0bc8877ac3b4d/app/models/vm_or_template.rb#L77

Comment 5 CFME Bot 2016-04-26 23:15:40 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2a7d26df597d79bf25cc192af7949ac672c77df5

commit 2a7d26df597d79bf25cc192af7949ac672c77df5
Author:     Lucy Fu <lufu>
AuthorDate: Tue Apr 26 15:57:50 2016 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Tue Apr 26 15:59:22 2016 -0400

    Expose Account to automate.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1328905

 lib/miq_automation_engine/service_models/miq_ae_service_account.rb | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_account.rb

Comment 6 CFME Bot 2016-04-26 23:15:45 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3e8dfa998d5d886d32fda6b53d0722edafcd1677

commit 3e8dfa998d5d886d32fda6b53d0722edafcd1677
Author:     Lucy Fu <lufu>
AuthorDate: Tue Apr 26 15:58:36 2016 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Tue Apr 26 15:59:22 2016 -0400

    Expose the accounts, users and groups relationships for the vm_or_template model to automate.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1328905

 .../service_models/miq_ae_service_vm_or_template.rb                   | 4 ++++
 1 file changed, 4 insertions(+)

Comment 7 Matouš Mojžíš 2016-05-11 15:49:18 UTC
Verified in: 5.6.0.5-beta2.4.20160503153816_1fb554f 
I was able to list vm.accounts, vm.users and vm.groups from rails console.

Comment 10 errata-xmlrpc 2016-06-29 15:51:47 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:1348


Note You need to log in before you can comment on or make changes to this bug.