Bug #10935

Updated by Peter Amstutz almost 5 years ago

<pre>
{
"name": "workflow",
"state": "Uncommitted",
"command": ["echo"],
"container_image": "arvados/jobs",
"output_path": "/",
"mounts": {
"foo": {
"kind": "json",
"content": {
"a": [],
"b": {}
}
}
}
}
</pre>

<pre>
>>> import arvados
>>> api = arvados.api()
>>> import json
>>> f = open("blah.json")
>>> js = json.load(f)
>>> js
{u'name': u'workflow', u'mounts': {u'foo': {u'content': {u'a': [], u'b': {}}, u'kind': u'json'}}, u'state': u'Uncommitted', u'output_path': u'/', u'container_image': u'arvados/jobs', u'command': [u'echo']}
>>> api.container_requests().create(body={"container_request":js}).execute()
{u'command': [u'echo'],
u'container_count': 0,
u'container_count_max': 3,
u'container_image': u'arvados/jobs',
u'container_uuid': None,
u'created_at': u'2017-01-19T17:06:42.107923671Z',
u'cwd': u'.',
u'description': None,
u'environment': {},
u'etag': u'dxdbdb25u2pdpaf6q9upvlhxu',
u'expires_at': None,
u'filters': None,
u'href': u'/container_requests/962eh-xvhdp-riqoa9p44s6whuf',
u'kind': u'arvados#containerRequest',
u'log_uuid': None,
u'modified_at': u'2017-01-19T17:06:42.106385000Z',
u'modified_by_client_uuid': u'962eh-ozdt8-lm5x8emraox8epg',
u'modified_by_user_uuid': u'962eh-tpzed-000000000000000',
u'mounts': {u'foo': {u'content': {u'a': None, u'b': {}}, u'kind': u'json'}},
u'name': u'workflow',
u'output_name': None,
u'output_path': u'/',
u'output_uuid': None,
u'owner_uuid': u'962eh-tpzed-000000000000000',
u'priority': None,
u'properties': {},
u'requesting_container_uuid': None,
u'runtime_constraints': {},
u'scheduling_parameters': {},
u'state': u'Uncommitted',
u'use_existing': True,
u'uuid': u'962eh-xvhdp-riqoa9p44s6whuf'}
</pre>

Note in the response: mounts[foo][content][a] is "None" instead of an empty list [].

Back