diff --git a/master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_updateFromJSON.xml b/master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_updateFromJSON.xml index 0cfa34921c6252e886c72262e3fec5fc262a308d..2a473a5aed20f64e217cff908f51b41b20be9573 100644 --- a/master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_updateFromJSON.xml +++ b/master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_updateFromJSON.xml @@ -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 diff --git a/master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py b/master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py index dfcd995a6bb0aa83ae5fac80861f1cee3a278d8e..b9a57835ea7e1a9133eb629dc006477a4d96a6f3 100644 --- a/master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py +++ b/master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py @@ -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)