Skip to content

Commit

Permalink
Merge branch 'release-v3.0.2'
Browse files Browse the repository at this point in the history
* release-v3.0.2:
  Add get_group_entities method
  • Loading branch information
rastern committed May 10, 2019
2 parents 1227cbb + 7f388cf commit 709cdf0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vmtconnect/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

__title__ = 'vmtconnect'
__description__ = 'Turbonomic API Client'
__version__ = '3.0.1'
__version__ = '3.0.2'
__author__ = 'R.A. Stern'
__author_email__ = '[email protected]'
__license__ = 'Apache 2.0'
Expand Down
16 changes: 13 additions & 3 deletions vmtconnect/vmtconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,15 +845,25 @@ def get_group_by_name(self, name):
if grp['displayName'] == name:
return [grp]

def get_group_entities(self, uuid):
"""Returns a detailed list of member entities that belong to the group.
Args:
uuid (str): Group UUID.
Returns:
A list containing all members of the group and their related consumers.
"""
return self.request('groups/{}/entities'.format(uuid))

def get_group_members(self, uuid):
"""Returns a list of member entities that belong to the group.
"""Returns a list of members that belong to the group.
Args:
uuid (str): Group UUID.
Returns:
A list containing all members of the group, of the appropriate group
type.
A list containing all members of the group.
"""
return self.request('groups/{}/members'.format(uuid))

Expand Down

0 comments on commit 709cdf0

Please sign in to comment.