Skip to content

Commit

Permalink
serial: adds field kerberos to schema
Browse files Browse the repository at this point in the history
Signed-off-by: Rokas Maciulaitis <rokas.maciulaitis@cern.ch>
  • Loading branch information
Rokas Maciulaitis committed Aug 21, 2019
1 parent a4691db commit a6e516a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion reana_commons/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def submit(self,
workflow_workspace='',
job_name='',
cvmfs_mounts='false',
compute_backend=None):
compute_backend=None,
kerberos=False):
"""Submit a job to RJC API.
:param job_name: Name of the job.
Expand All @@ -81,6 +82,7 @@ def submit(self,
:workflow_workspace: Path to the workspace of the workflow.
:cvmfs_mounts: String with CVMFS volumes to mount in job pods.
:compute_backend: Job compute backend.
:kerberos: Decides if kerberos should be provided for job container.
:return: Returns a dict with the ``job_id``.
"""
job_spec = {
Expand All @@ -98,6 +100,9 @@ def submit(self,
if compute_backend:
job_spec['compute_backend'] = compute_backend

if kerberos:
job_spec['kerberos'] = kerberos

response, http_response = self._client.jobs.create_job(job=job_spec).\
result()
if http_response.status_code == 400:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
"job_name": {
"type": "string"
},
"kerberos": {
"type": "boolean"
},
"prettified_cmd": {
"default": "",
"type": "string"
Expand Down
5 changes: 5 additions & 0 deletions reana_commons/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
"type": "string",
"enum": ["kubernetes", "htcondorcern"],
},
"kerberos": {
"$id": "#/properties/steps/properties/kerberos",
"type": "boolean",
"default": "false",
},
"commands": {
"$id": "#/properties/steps/properties/commands",
"type": "array",
Expand Down

0 comments on commit a6e516a

Please sign in to comment.