Commit 8eefb574 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slapos_jio_api_style: Update returned data in update Software Installation

parent dc3334bf
......@@ -31,8 +31,40 @@
<item>
<key> <string>output_schema</string> </key>
<value> <string>{\n
"title": "bar"\n
}</string> </value>
"$schema": "http://json-schema.org/draft-07/schema#",\n
"title": "Software Installation Updated",\n
"description": "Response when the software installation is updated",\n
"type": "object",\n
"properties": {\n
"software_release_uri": {\n
"title": "Software Release URI",\n
"type": "string",\n
"format": "uri-reference"\n
},\n
"compute_node_id": {\n
"title": "Compute Node ID",\n
"type": "string",\n
"description": "The Id of the compute node, example: COMP-1234"\n
},\n
"portal_type": {\n
"title": "Portal Type",\n
"const": "Software Installation",\n
"type": "string"\n
},\n
"date": {\n
"title": "Date",\n
"description": "Date and Time of the operation",\n
"type": "string",\n
"format": "date-time"\n
},\n
"success": {\n
"title": "Success Message",\n
"type": "string",\n
"description": "Success Message"\n
},\n
}\n
}\n
</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -47,7 +47,9 @@ if "error_status" in data_dict:
return json.dumps({
"$schema": json_form.absolute_url().strip() + "/getOutputJSONSchema",
"id": software_installation.getRelativeUrl(),
"software_release_uri": software_installation.getUrlString(),
"compute_node_id": software_installation.getAggregateReference(),
"date": str(DateTime()),
"portal_type": "Software Installation",
"success": "Done"
}, indent=2)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment