Project

General

Profile

Feature #21495

Feature #20874: FERRY APIs/URLs should go to config file

Review request [commit:b6b4431379405741e97eec44ad0ff5768029a61e: Took out commented code]

Added by Shreyas Bhat 11 months ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
JobSub Server RPM
Target version:
Start date:
12/06/2018
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

Added the ferry config options to jobsub.ini and changed the code in authutils.py to pull those in.

History

#1 Updated by Shreyas Bhat 11 months ago

  • Status changed from New to Closed

Feedback given, and will be incorporated in a new commit.

#2 Updated by Shreyas Bhat 11 months ago

For documentation, feedback was this:

Checking for a return values and supplying defaults is good in that it
documents intent, helping future maintainters and it makes the sysadmins
job a little easier, he doesn't have to do anything unless the ferry API
changes:

def getGridMapFile():
     prs = JobsubConfigParser()
     # We start with the same file as create_dn_user_roles_map()
     api = prs.get('default', 'ferry_dn_user_roles_map')
     if not api:
         api = 'getGridMapFile'
     gmf = {}
     for vo in prs.supportedGroups():
         # We'll do this substitution here because we're not generating
         # a file from it anyway
         fname = api
         append = prs.get('default', 'ferry_getGridMapFile'.lower())
         if append:
             fname = fname + append.format(vo)
         dat = _fetch_from_ferry(fname)
         if dat:
             gmf[vo] = dat
     return gmf



Also available in: Atom PDF