Commit bac9c822 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slapos_cloud: Software Instance clean asJSON Text add full_ip_list and remove relative_url

parent 8eefb574
......@@ -331,26 +331,28 @@ class SoftwareInstance(Item, JSONType):
result = {
"$schema": self.getPortalObject().portal_types.restrictedTraverse(self.getPortalType()).absolute_url()
+ "/getTextContent",
"reference": self.getReference().decode("UTF-8"),
"title": self.getTitle().decode("UTF-8"),
"connection_parameters": self.getConnectionXmlAsDict(),
"parameters": self.getInstanceXmlAsDict(),
"node": self.getSlaXmlAsDict(),
"state": state,
"id": self.getRelativeUrl(),
"reference": self.getReference().decode("UTF-8"),
"software_release_uri": self.getUrlString(),
"software_type": self.getSourceReference().decode("UTF-8"),
"compute_node_id": parameter_dict.get("slap_computer_id"),
"compute_partition_id": parameter_dict.get("slap_computer_partition_id"),
"sla_parameters": self.getSlaXmlAsDict(),
"access_status_message": self.getTextAccessStatus(),
"processing_timestamp": parameter_dict.get("timestamp"),
"state": state,
"connection_parameters": self.getConnectionXmlAsDict(),
"parameters": self.getInstanceXmlAsDict(),
"shared": False,
"root_instance_title": parameter_dict.get("root_instance_title"),
"ip_list": parameter_dict.get("ip_list"),
"full_ip_list": parameter_dict.get("full_ip_list"),
"X509": {
"key": self.getSslKey(),
"certificate": self.getSslCertificate(),
},
"sla_parameters": self.getSlaXmlAsDict(),
"compute_node_id": parameter_dict.get("slap_computer_id"),
"compute_partition_id": parameter_dict.get("slap_computer_partition_id"),
"processing_timestamp": parameter_dict.get("timestamp"),
"access_status_message": self.getTextAccessStatus(),
"portal_type": self.getPortalType(),
}
result.update(parameter_dict)
self.REQUEST.response.setHeader('Cache-Control',
'private, max-age=0, must-revalidate')
self.REQUEST.response.setHeader('Vary',
......
......@@ -134,6 +134,17 @@
}\n
}\n
},\n
"full_ip_list": {\n
"title": "Full IP List",\n
"type": "array",\n
"descritpion": "XXXX List of IPs usable by the Software Instance on the partition",\n
"items": {\n
"type": "array",\n
"items": {\n
"type": "string"\n
}\n
}\n
},\n
"X509": {\n
"title": "X509 Certificates",\n
"description": "X509 Certificates used by the instance to authentify itself on master",\n
......@@ -208,11 +219,6 @@
"title": "Portal Type",\n
"const": "Software Instance",\n
"type": "string"\n
},\n
"id": {\n
"title": "ID",\n
"type": "string",\n
"description": "Unique Id of the object. It is not editable."\n
}\n
}\n
}\n
......
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