Commit da124627 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Romain Courteaud

slapos_jio_api_style: Update returned data in update Software Installation

parent 6b463acb
...@@ -31,8 +31,40 @@ ...@@ -31,8 +31,40 @@
<item> <item>
<key> <string>output_schema</string> </key> <key> <string>output_schema</string> </key>
<value> <string>{\n <value> <string>{\n
"title": "bar"\n "$schema": "http://json-schema.org/draft-07/schema#",\n
}</string> </value> "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>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
......
...@@ -47,7 +47,9 @@ if "error_status" in data_dict: ...@@ -47,7 +47,9 @@ if "error_status" in data_dict:
return json.dumps({ return json.dumps({
"$schema": json_form.absolute_url().strip() + "/getOutputJSONSchema", "$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()), "date": str(DateTime()),
"portal_type": "Software Installation",
"success": "Done" "success": "Done"
}, indent=2) }, 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