File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -276,6 +276,22 @@ def provision_group(gid):
276276 return call_api3 (POST , path , data )
277277
278278
279+ def provision_group_members (gid ):
280+ prov_id = options .prov_id
281+ data = {
282+ "RequestType" : "CoPersonProvisioning" ,
283+ "Version" : "1.0" ,
284+ "Synchronous" : True
285+ }
286+ responses = {}
287+ for member in get_co_group_members (gid )["CoGroupMembers" ]:
288+ if member ["Person" ]["Type" ] == "CO" :
289+ pid = member ["Person" ]["Id" ]
290+ path = f"co_provisioning_targets/provision/{ prov_id } /copersonid:{ pid } .json"
291+ responses [pid ] = call_api3 (POST , path , data )
292+ return responses
293+
294+
279295def fixup_unixcluster_group (gid ):
280296 group = get_co_group (gid )
281297 oldname = group ["Name" ]
@@ -291,6 +307,7 @@ def fixup_unixcluster_group(gid):
291307 delete_identifier (id_ )
292308
293309 provision_group (gid )
310+ provision_group_members (gid )
294311
295312 # http errors raise exceptions, so at this point we apparently succeeded
296313 print (":thumbsup:" )
You can’t perform that action at this time.
0 commit comments