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

slapos_jio_api_style: rationalise output of jIOWebSection_createComputeNode

* Use the same data structure as the rest of the API
parent bc5f9d18
...@@ -38,15 +38,12 @@ response.setHeader('Content-Type', "application/json") ...@@ -38,15 +38,12 @@ response.setHeader('Content-Type', "application/json")
return json.dumps({ return json.dumps({
"$schema": context.getPortalObject().portal_types.restrictedTraverse(compute_node.getPortalType()).absolute_url() "$schema": context.getPortalObject().portal_types.restrictedTraverse(compute_node.getPortalType()).absolute_url()
+ "/getTextContent", + "/getTextContent",
"title" : compute_node.getTitle(), "compute_node_id" : compute_node.getReference(),
"id" : compute_node.getRelativeUrl(),
"reference": compute_node.getReference(),
"access_token": "V2/" + compute_node.getId() + "/" + access_token_id, "access_token": "V2/" + compute_node.getId() + "/" + access_token_id,
"certificate_url_access": request_url, "certificate_url_access": request_url,
"initialisation_comand": compute_node_install_command_line, "initialisation_comand": compute_node_install_command_line,
"slapos_master_web": slapos_master_web_url, "slapos_master_web": slapos_master_web_url,
"slapos_master_api": slapos_master_api, "slapos_master_api": slapos_master_api,
"modification_date": compute_node.getModificationDate().HTML4(),
# Kept for backward compatibility # Kept for backward compatibility
"command_line": compute_node_install_command_line, "command_line": compute_node_install_command_line,
}, 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