Skip to content

Commit 4afbd4c

Browse files
Add Unix cluster group provisioning after adding the user to the group
1 parent 2115261 commit 4afbd4c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

mass_person_create_modify.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def add_unix_cluster_account(co_person_record):
185185
co_person_record["UnixClusterAccount"].append(uca)
186186
else:
187187
co_person_record.update({"UnixClusterAccount" : [uca]})
188-
return co_person_record
188+
return co_person_record, default_group_id
189189

190190

191191
def main(args):
@@ -217,9 +217,11 @@ def main(args):
217217

218218
co_person_data = utils.core_api_co_person_read(user, options.osg_co_id, options.endpoint, options.authstr)
219219

220-
co_person_data = add_unix_cluster_account(co_person_data)
220+
co_person_data, gid = add_unix_cluster_account(co_person_data)
221221

222222
utils.core_api_co_person_update(user, options.osg_co_id, co_person_data, options.endpoint, options.authstr)
223+
224+
utils.provision_group(gid, options.provisioning_target, options.endpoint, options.authstr)
223225
except Exception as e:
224226
print(f"\tException for user {user}.")
225227
print(f"\t{e}")

0 commit comments

Comments
 (0)