Bug 1411424 - Expose miq_groups to Automate
Summary: Expose miq_groups to Automate
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 5.8.0
Assignee: mkanoor
QA Contact: Dmitry Misharov
URL:
Whiteboard:
Depends On:
Blocks: 1411473
TreeView+ depends on / blocked
 
Reported: 2017-01-09 16:58 UTC by Satoe Imaishi
Modified: 2018-06-01 13:21 UTC (History)
5 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1411473 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:34:55 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Satoe Imaishi 2017-01-09 16:58:55 UTC
From PR https://github.com/ManageIQ/manageiq/pull/12294:

This PR exposes a user's groups to the Automate engine, addressing a use case presented on ManageIQ Talk: http://talk.manageiq.org/t/how-to-get-multi-groups-of-a-user-in-automation/1799

Steps for Testing/QA

Display a user's groups in an Automate method:
  groups = $evm.vmdb(:user).first.miq_groups
  $evm.log(:info, "Displaying the user's groups: #{groups.inspect}")

Comment 3 Milan Falešník 2017-03-03 13:17:40 UTC
Verified in 5.8.0.3

<AEMethod [/qqq/System/Request/mytest]> Starting 
<AEMethod mytest> Displaying the user's groups: [#<MiqAeServiceMiqGroup:0x107f2f0 @object=#<MiqGroup id: 2, description: "EvmGroup-super_administrator", group_type: "system", sequence: 1, created_on: "2017-03-03 03:20:03", updated_on: "2017-03-03 03:20:03", settings: nil, tenant_id: 1>, @virtual_columns=["allocated_memory", "allocated_storage", "allocated_vcpu", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "miq_user_role_name", "provisioned_storage", "read_only", "region_description", "region_number", "user_count"], @associations=["tenant", "users", "vms"]>]
<AEMethod [/qqq/System/Request/mytest]> Ending


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