Skip to content

Commit

Permalink
grouper_admin: Add group_active stem option #72
Browse files Browse the repository at this point in the history
  • Loading branch information
astrochun committed Oct 5, 2020
1 parent e3ca412 commit b0406fb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions requiam/grouper_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ class GrouperAPI:
get_group_list(group_type)
Retrieve list of groups in a Grouper stem
group_type must be 'portal', 'quota', 'test' or ''
group_type must be 'portal', 'quota', 'test', 'group_active' or ''
Note: Some of these groups (e.g., group_active does not exists for production=True)
See: https://spaces.at.internet2.edu/display/Grouper/Get+Groups
but with a different implementation using the stem find
Expand All @@ -66,14 +67,14 @@ class GrouperAPI:
check_group_exists(group, group_type)
Check whether a Grouper group exists within a Grouper stem
group_type must be 'portal', 'quota', 'test' or ''
group_type must be 'portal', 'quota', 'test', 'group_active' or ''
group is simply the group name
See: https://spaces.at.internet2.edu/display/Grouper/Find+Groups
add_group(group, group_type, description)
Create Grouper group within a Grouper stem
group_type must be 'portal', 'quota', or 'test'
group_type must be 'portal', 'quota', 'group_active' or 'test'
See: https://spaces.at.internet2.edu/display/Grouper/Group+Save
Expand Down Expand Up @@ -108,7 +109,7 @@ def url(self, endpoint):
def get_group_list(self, group_type):
"""Retrieve list of groups in a Grouper stem"""

if group_type not in ['portal', 'quota', 'test', '']:
if group_type not in ['portal', 'quota', 'test', 'group_active', '']:
raise ValueError("Incorrect [group_type] input")

endpoint = self.url('groups')
Expand Down Expand Up @@ -147,7 +148,7 @@ def get_group_details(self, group):
def check_group_exists(self, group, group_type):
"""Check whether a Grouper group exists within a Grouper stem"""

if group_type not in ['portal', 'quota', 'test', '']:
if group_type not in ['portal', 'quota', 'test', 'group_active', '']:
raise ValueError("Incorrect [group_type] input")

result = self.get_group_list(group_type)
Expand All @@ -167,7 +168,7 @@ def add_group(self, group, group_type, description):

endpoint = self.url("groups")

if group_type not in ['portal', 'quota', 'test']:
if group_type not in ['portal', 'quota', 'test', 'group_active']:
raise ValueError("Incorrect [group_type] input")

grouper_name = figshare_group(group, group_type,
Expand Down

0 comments on commit b0406fb

Please sign in to comment.