Commit a2f68b71 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Titouan Soulard

slapos_jio_api_style: Add requested instance list to update instance

parent bdc07edc
......@@ -90,6 +90,14 @@
"const": "Software Instance",\n
"type": "string"\n
},\n
"requested_instance_list": {\n
"title": "Requested Instance List",\n
"type": "array",\n
"description": "List of the instances references requested by this instance. This is used to garbage collect instances that are no longer requested by this instance.",\n
"items": {\n
"type": "string"\n
}\n
},\n
"title": {\n
"title": "New Title",\n
"type": "string",\n
......
......@@ -35,6 +35,9 @@ if "reported_state" in data_dict:
error_message="Unexcepected Reported State: %s" % reported_state,
)
if "requested_instance_list":
software_instance.updateRequestedInstanceList(data_dict["requested_instance_list"])
if "title" in data_dict and data_dict["title"] != software_instance.getTitle():
software_instance.rename(
new_name=data_dict["title"],
......@@ -45,6 +48,6 @@ return json.dumps({
"$schema": json_form.absolute_url().strip() + "/getOutputJSONSchema",
"reference": software_instance.getReference(),
"portal_type": "Software Instance",
"date": str(DateTime()),
"date": DateTime().HTML4(),
"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