|
12 | 12 | ENDPOINT = "https://registry-test.cilogon.org/registry/" |
13 | 13 | OSG_CO_ID = 8 |
14 | 14 | CLUSTER_ID = 10 |
| 15 | +LDAP_TARGET_ID = 9 |
15 | 16 | MINTIMEOUT = 5 |
16 | 17 | MAXTIMEOUT = 625 |
17 | 18 | TIMEOUTMULTIPLE = 5 |
|
31 | 32 | OPTIONS: |
32 | 33 | -u USER[:PASS] specify USER and optionally PASS on command line |
33 | 34 | -c OSG_CO_ID specify OSG CO ID (default = {OSG_CO_ID}) |
34 | | - -p CLUSTER_ID specify UNIX Cluster ID (default = {CLUSTER_ID}) |
| 35 | + -g CLUSTER_ID specify UNIX Cluster ID (default = {CLUSTER_ID}) |
| 36 | + -l LDAP_TARGET specify LDAP Provsion ID (defult = {LDAP_TARGET_ID}) |
35 | 37 | -d passfd specify open fd to read PASS |
36 | 38 | -f passfile specify path to file to open and read PASS |
37 | 39 | -e ENDPOINT specify REST endpoint |
@@ -62,6 +64,7 @@ class Options: |
62 | 64 | user = "co_8.william_test" |
63 | 65 | osg_co_id = OSG_CO_ID |
64 | 66 | unix_id = CLUSTER_ID |
| 67 | + provision_target = LDAP_TARGET_ID |
65 | 68 | outfile = None |
66 | 69 | authstr = None |
67 | 70 | min_timeout = MINTIMEOUT |
@@ -206,8 +209,10 @@ def parse_options(args): |
206 | 209 | options.user = arg |
207 | 210 | if op == "-c": |
208 | 211 | options.osg_co_id = int(arg) |
209 | | - if op == "-p": |
| 212 | + if op == "-g": |
210 | 213 | options.unix_id = int(arg) |
| 214 | + if op == "-l": |
| 215 | + options.provision_target = int(arg) |
211 | 216 | if op == "-d": |
212 | 217 | passfd = int(arg) |
213 | 218 | if op == "-f": |
@@ -238,7 +243,6 @@ def main(args): |
238 | 243 | unix_cluster_groups = call_api("unix_cluster/unix_cluster_groups.json", unix_cluster_id=options.unix_id) |
239 | 244 | clustered_group_ids = set(group["CoGroupId"] for group in unix_cluster_groups["UnixClusterGroups"]) |
240 | 245 | projects_needing_cluster_groups = set() |
241 | | - projects_needing_provisioning = set() |
242 | 246 |
|
243 | 247 | for group in co_groups: |
244 | 248 | gid = group["Id"] |
@@ -290,6 +294,10 @@ def main(args): |
290 | 294 | ) |
291 | 295 | print(f"project group {gid}: added UNIX Cluster Group") |
292 | 296 |
|
| 297 | + for project_gid in project_groups: |
| 298 | + #Provision all project groups |
| 299 | + call_api2(POST, f"co_provisioning_targets/provision/{options.provision_target}/cogroupid:{project_gid}.json") |
| 300 | + |
293 | 301 |
|
294 | 302 | if __name__ == "__main__": |
295 | 303 | try: |
|
0 commit comments