Skip to content

Commit db6aa4e

Browse files
committed
add option for ldap provisioning target id (SOFTWARE-5187)
Turns out there is no way to get this provisioning target id (for a given group) from the rest api, nor to list the available provisioning targets. as far as i can tell, these can only be found on the cilogon web interface. Well, at least there is only a single provisioning target ("Primary LDAP") for the entire CO.
1 parent 93bd0ec commit db6aa4e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

group_fixup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
ENDPOINT = "https://registry.cilogon.org/registry/"
1515
USER = "co_7.group_fixup"
1616
OSG_CO_ID = 7
17+
LDAP_PROV_ID = 6
1718

1819
GET = "GET"
1920
PUT = "PUT"
@@ -31,6 +32,7 @@
3132
-f passfile specify path to file to open and read PASS
3233
-e ENDPOINT specify REST endpoint
3334
(default = {ENDPOINT})
35+
-p LDAP_PROV_ID LDAP Provisioning Target ID (default = {LDAP_PROV_ID})
3436
-a show all UnixCluster autogroups, not just misnamed ones
3537
-i COGroupId show fixup info for a specific CO Group
3638
-x COGroupId run UnixCluster Group fixups for given CO Group Id
@@ -60,6 +62,7 @@ def usage(msg=None):
6062
class Options:
6163
endpoint = ENDPOINT
6264
osg_co_id = OSG_CO_ID
65+
prov_id = LDAP_PROV_ID
6366
user = USER
6467
authstr = None
6568
fix_gid = None
@@ -300,7 +303,7 @@ def fixup_all_unixcluster_groups():
300303

301304
def parse_options(args):
302305
try:
303-
ops, args = getopt.getopt(args, 'u:c:d:f:e:x:i:ah', ["fix-all"])
306+
ops, args = getopt.getopt(args, 'u:c:d:f:e:x:i:p:ah', ["fix-all"])
304307
except getopt.GetoptError:
305308
usage()
306309

@@ -319,6 +322,7 @@ def parse_options(args):
319322
if op == '-e': options.endpoint = arg
320323
if op == '-x': options.fix_gid = int(arg)
321324
if op == '-i': options.info_gid = int(arg)
325+
if op == '-p': options.prov_id = int(arg)
322326
if op == '-a': options.showall = True
323327

324328
if op == '--fix-all': options.fix_all = True

0 commit comments

Comments
 (0)