Commit 477a4db4 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: drop hardcoded url

parent f75631c1
...@@ -2,6 +2,19 @@ portal = context.getPortalObject() ...@@ -2,6 +2,19 @@ portal = context.getPortalObject()
person = portal.portal_membership.getAuthenticatedMember().getUserValue() person = portal.portal_membership.getAuthenticatedMember().getUserValue()
web_site = context.getWebSiteValue() web_site = context.getWebSiteValue()
slapos_master_api = web_site.getLayoutProperty(
"configuration_slapos_master_api", None)
if slapos_master_api is None:
return context.Base_redirect(
keep_items={
'portal_status_message': 'configuration_slapos_master_api is not configured',
'portal_status_level': 'error'
}
)
# This url is only used to call 1 (one) python script.
# it could be whatever url able to reach erp5
slapos_master_web_url = web_site.getLayoutProperty( slapos_master_web_url = web_site.getLayoutProperty(
"configuration_slapos_master_web_url", "configuration_slapos_master_web_url",
default=web_site.absolute_url() default=web_site.absolute_url()
...@@ -29,9 +42,6 @@ access_token = portal.access_token_module.newContent( ...@@ -29,9 +42,6 @@ access_token = portal.access_token_module.newContent(
access_token_id = access_token.getId() access_token_id = access_token.getId()
access_token.validate() access_token.validate()
slapos_master_api = web_site.getLayoutProperty(
"configuration_slapos_master_api", "https://slap.vifib.com")
compute_node_install_command_line = web_site.getLayoutProperty( compute_node_install_command_line = web_site.getLayoutProperty(
"configuration_compute_node_install_command_line", "configuration_compute_node_install_command_line",
"wget https://deploy.erp5.net/slapos ; bash slapos") "wget https://deploy.erp5.net/slapos ; bash slapos")
......
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