Skip to content

Commit

Permalink
Merge pull request opensciencegrid#2272 from matyasselmeci/pr/osg-ori…
Browse files Browse the repository at this point in the history
…gin-authfile-public

Add --public flag to osg-origin-authfile
  • Loading branch information
matyasselmeci authored Feb 10, 2022
2 parents d04e0ef + a1f5a2b commit 99f5853
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bin/osg-origin-authfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
A script to generate Authfiles for XCaches in the OSG
"""

import argparse
import os
import sys

Expand All @@ -16,9 +16,8 @@ if __name__ == "__main__" and __package__ is None:
import webapp.models
import stashcache

import argparse

parser = argparse.ArgumentParser(description="Generate an Xrootd Authfile appropriate for a given origin.")
parser.add_argument("--public", action="store_true", help="Generate a public origin Authfile")
parser.add_argument("fqdn", metavar="Origin_FQDN", nargs=1, help="FQDN of the origin for Authfile generation.")

args = parser.parse_args()
Expand All @@ -28,6 +27,6 @@ global_data = webapp.models.GlobalData()
VOData = global_data.get_vos_data()
ResourceGroups = global_data.get_topology().get_resource_group_list()

authfile = stashcache.generate_origin_authfile(args.fqdn[0], VOData, ResourceGroups, suppress_errors=False)
authfile = stashcache.generate_origin_authfile(args.fqdn[0], VOData, ResourceGroups, suppress_errors=False, public_only=args.public)

print(authfile, end="")

0 comments on commit 99f5853

Please sign in to comment.