Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json_outputs for idds #181

Merged
merged 2 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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