Skip to content

Commit

Permalink
Merge pull request #181 from tmaeno/master
Browse files Browse the repository at this point in the history
json_outputs for idds
  • Loading branch information
tmaeno authored Feb 6, 2023
2 parents 5cecda4 + 88f1cce commit 34d6bd9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PandaPkgInfo.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release_version = "0.0.48"
release_version = "0.0.49"
9 changes: 7 additions & 2 deletions pandaserver/userinterface/UserIF.py
Original file line number Diff line number Diff line change
Expand Up @@ -2559,7 +2559,7 @@ def decode_idds_enum(d):


# relay iDDS command
def relay_idds_command(req, command_name, args=None, kwargs=None, manager=None):
def relay_idds_command(req, command_name, args=None, kwargs=None, manager=None, json_outputs=None):
tmpLog = LogWrapper(_logger, 'relay_idds_command-{}'.format(datetime.datetime.utcnow().isoformat('/')))
# check security
if not isSecure(req):
Expand Down Expand Up @@ -2598,6 +2598,9 @@ def relay_idds_command(req, command_name, args=None, kwargs=None, manager=None):
kwargs = json.loads(kwargs, object_hook=decode_idds_enum)
else:
kwargs = {}
# json outputs
if json_outputs and manager:
c.setup_json_outputs()
# set original username
dn = req.subprocess_env.get('SSL_CLIENT_S_DN')
if dn:
Expand All @@ -2617,7 +2620,7 @@ def relay_idds_command(req, command_name, args=None, kwargs=None, manager=None):


# relay iDDS workflow command with ownership check
def execute_idds_workflow_command(req, command_name, kwargs=None):
def execute_idds_workflow_command(req, command_name, kwargs=None, json_outputs=None):
try:
tmpLog = LogWrapper(_logger, 'execute_idds_workflow_command-{}'.format(datetime.datetime.utcnow().isoformat('/')))
if kwargs:
Expand All @@ -2642,6 +2645,8 @@ def execute_idds_workflow_command(req, command_name, kwargs=None):
return json.dumps((False, tmpMsg))
# check owner
c = iDDS_ClientManager(idds_host)
if json_outputs:
c.setup_json_outputs()
dn = req.subprocess_env.get('SSL_CLIENT_S_DN')
if check_owner:
# requester
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def run (self):
'psutil>=5.4.8',
'idds-common',
'idds-client',
'idds-workflow>=1.0.6',
'idds-workflow>=1.1.0',
'idds-doma',
'idds-atlas',
'ruamel.yaml',
Expand Down

0 comments on commit 34d6bd9

Please sign in to comment.