Commit 792b60bf authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Addition information when generate the token

parent 9ee80ebb
......@@ -15,7 +15,18 @@ access_token = portal.access_token_module.newContent(
)
access_token.validate()
slapos_master_api = web_site.getLayoutProperty(
"configuration_slapos_master_api", "https://slap.vifib.com")
computer_install_command_line = web_site.getLayoutProperty(
"configuration_computer_install_command_line",
"wget https://deploy.erp5.net/slapos ; bash slapos")
request = context.REQUEST
response = request.RESPONSE
response.setHeader('Content-Type', "application/json")
return json.dumps({'access_token': access_token.getId()})
return json.dumps({'access_token': access_token.getId(),
'command_line': computer_install_command_line,
'slapos_master_web': web_site.absolute_url(),
'slapos_master_api': slapos_master_api})
......@@ -25,4 +25,5 @@ access_token.validate()
request = context.REQUEST
response = request.RESPONSE
response.setHeader('Content-Type', "application/json")
return json.dumps({'access_token': access_token.getId()})
return json.dumps({'access_token': access_token.getId(),
'command_line': "slapos configure client"})
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