Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1328905 - [RFE] Expose an 'Account' Active Record as a Service Model, with an association from MiqAeServiceVm
[RFE] Expose an 'Account' Active Record as a Service Model, with an associati...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.5.0
Unspecified Unspecified
high Severity high
: GA
: 5.6.0
Assigned To: Lucy Fu
Matouš Mojžíš
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-20 10:22 EDT by Peter McGowan
Modified: 2016-06-29 11:51 EDT (History)
9 users (show)

See Also:
Fixed In Version: 5.6.0.5
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-29 11:51:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 14:50:04 EDT

  None (edit)
Description Peter McGowan 2016-04-20 10:22:54 EDT
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 14:37:45 EDT
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 19:15:40 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2a7d26df597d79bf25cc192af7949ac672c77df5

commit 2a7d26df597d79bf25cc192af7949ac672c77df5
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Tue Apr 26 15:57:50 2016 -0400
Commit:     Lucy Fu <lufu@redhat.com>
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 19:15:45 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3e8dfa998d5d886d32fda6b53d0722edafcd1677

commit 3e8dfa998d5d886d32fda6b53d0722edafcd1677
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Tue Apr 26 15:58:36 2016 -0400
Commit:     Lucy Fu <lufu@redhat.com>
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 11:49:18 EDT
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 11:51:47 EDT
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.