api responses nested properties are JSON strings

Bug #1609402 reported by Jiri Tomasek
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Triaged
Low
Unassigned

Bug Description

Every Mistral api response returns an object with properties and all of the values of those properties are json strings. It would be better if it was nested objects.

example: http://paste.openstack.org/show/545045/
{
  "state_info": null,
  "created_at": null,
  "name": "tripleo.update_capabilities",
  "tags": null,
  "workflow_name": null,
  "task_execution_id": null,
  "updated_at": null,
  "state": null,
  "output": "{\"result\": \"Failed to run action [action_ex_id=None, action_cls='<class 'mistral.actions.action_factory.UpdateCapabilitiesAction'>', attributes='{}', params='{u'container': u'overcloud1', u'environments': {u'environments/neutron-ml2-cisco-nexus-ucsm.yaml': False, u'environments/mongodb-nojournal.yaml': False, u'environments/net-single-nic-with-vlans.yaml': False, u'environments/network-isolation.yaml': False, u'environments/cinder-netapp-config.yaml': False, u'overcloud-resource-registry-puppet.yaml': True, u'environments/overcloud-steps.yaml': False, u'environments/neutron-ml2-cisco-n1kv.yaml': False, u'environments/neutron-ml2-bigswitch.yaml': False, u'environments/puppet-ceph-devel.yaml': False, u'environments/puppet-pacemaker.yaml': False, u'environments/net-bond-with-vlans.yaml': False, u'environments/docker.yaml': False, u'environments/config-debug.yaml': False, u'environments/storage-environment.yaml': False, u'environments/puppet-ceph-external.yaml': False}}']\\n 'bool' object has no attribute 'get'\"}",
  "input": "{\"container\": \"overcloud1\", \"environments\": {\"environments/neutron-ml2-cisco-nexus-ucsm.yaml\": false, \"environments/mongodb-nojournal.yaml\": false, \"environments/net-single-nic-with-vlans.yaml\": false, \"environments/network-isolation.yaml\": false, \"environments/cinder-netapp-config.yaml\": false, \"overcloud-resource-registry-puppet.yaml\": true, \"environments/overcloud-steps.yaml\": false, \"environments/neutron-ml2-cisco-n1kv.yaml\": false, \"environments/neutron-ml2-bigswitch.yaml\": false, \"environments/puppet-ceph-devel.yaml\": false, \"environments/puppet-pacemaker.yaml\": false, \"environments/net-bond-with-vlans.yaml\": false, \"environments/docker.yaml\": false, \"environments/config-debug.yaml\": false, \"environments/storage-environment.yaml\": false, \"environments/puppet-ceph-external.yaml\": false}}",
  "accepted": null,
  "id": null,
  "description": null
}

Working with such API response is problematic because client needs to parse the nested properties first, e.g. JSON.parse(response.output), JSON.parse(response.input)...

Changed in mistral:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.