Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose miq_groups to Automate #12294

Merged
merged 2 commits into from Dec 2, 2016

Conversation

@shaneboulden
Copy link
Contributor

shaneboulden commented Oct 31, 2016

This PR exposes a user's groups to the Automate engine, addressing a use case presented on ManageIQ Talk.

Links

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}")
Expose miq_groups to Automate
This commit exposes a user's groups to the Automate engine, addressing a use case from ManageIQ Talk:
http://talk.manageiq.org/t/how-to-get-multi-groups-of-a-user-in-automation/1799
@@ -3,6 +3,7 @@ class MiqAeServiceUser < MiqAeServiceModelBase
expose :current_group, :association => true
expose :current_tenant, :association => true
expose :vms, :association => true
expose :miq_groups, :association => true

This comment has been minimized.

Copy link
@mkanoor

mkanoor Nov 1, 2016

Contributor

@jrafanie
Would this conflict with the new entitlement changes that you are working on?

This comment has been minimized.

Copy link
@jrafanie

jrafanie Nov 1, 2016

Member

I don't believe so. The only thing that might be different is that miq_groups no longer have the filters as that "entitlement" concept was promoted to an actual Entitlement model in #8102. cc @chrisarcand

This comment has been minimized.

Copy link
@chrisarcand

chrisarcand Nov 1, 2016

Member

Yes; however as long as it goes through MiqGroup#get_filters (which is delegated to the entitlement) I think we're fine. We'll probably deprecate the MiqGroup method in the future.

@miq-bot

This comment has been minimized.

Copy link
Member

miq-bot commented Nov 2, 2016

Checked commits shaneboulden/manageiq@bef42fa~...41d70cc with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
2 files checked, 0 offenses detected
Everything looks good. 👍

@shaneboulden

This comment has been minimized.

Copy link
Contributor Author

shaneboulden commented Nov 2, 2016

Hey ManageIQ team, thanks for looking at this. I've just added the spec.

@mkanoor mkanoor added this to the Sprint 50 Ending Dec 5, 2016 milestone Nov 30, 2016

@mkanoor mkanoor added the euwe/yes label Nov 30, 2016

@mkanoor mkanoor merged commit 4a180b5 into ManageIQ:master Dec 2, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 36.898%
Details
@simaishi

This comment has been minimized.

Copy link
Contributor

simaishi commented Jan 9, 2017

simaishi added a commit that referenced this pull request Jan 9, 2017

@simaishi

This comment has been minimized.

Copy link
Contributor

simaishi commented Jan 9, 2017

Euwe backport details:

$ git log -1
commit 87be796a7d168790c32b8128c9eccd38d0b7ac68
Author: Madhu Kanoor <mkanoor@redhat.com>
Date:   Fri Dec 2 11:49:17 2016 -0500

    Merge pull request #12294 from jockey10/expose-miq-groups
    
    Expose miq_groups to Automate
    (cherry picked from commit 4a180b5254cc338dd9f62d7176433970ea401243)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1411473

@simaishi simaishi added euwe/backported and removed euwe/yes labels Jan 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.