Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos
Commits
2f3cc83e
Commit
2f3cc83e
authored
Jul 11, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo
parent
1dd50804
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
35 deletions
+33
-35
slapos/recipe/erp5_bootstrap/__init__.py
slapos/recipe/erp5_bootstrap/__init__.py
+4
-4
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
+29
-31
No files found.
slapos/recipe/erp5_bootstrap/__init__.py
View file @
2f3cc83e
...
...
@@ -36,7 +36,7 @@ class Recipe(GenericBaseRecipe):
Input:
mysql-url
mysql url, must contain connexion informations.
mysql url, must contain connexion informations.
zope-url (optional)
Url of zope, this url will be parsed to get these values:
...
...
@@ -70,7 +70,7 @@ class Recipe(GenericBaseRecipe):
Boolean, default value: "False"
If true erp5 site will fix the site consistency and
will use configurator to automaticlly install a
small and medium buisiness.
small and medium buisiness.
"""
def
install
(
self
):
...
...
@@ -86,7 +86,7 @@ class Recipe(GenericBaseRecipe):
# Init zope configuration
zope_username
=
None
zope_password
=
None
zope_password
=
None
zope_hostname
=
None
zope_port
=
None
zope_protocol
=
None
...
...
@@ -105,7 +105,7 @@ class Recipe(GenericBaseRecipe):
if
self
.
options
.
get
(
'zope-port'
):
zope_port
=
self
.
options
[
'zope-port'
]
elif
self
.
options
.
get
(
'zope-url'
):
zope_port
=
zope_parsed
.
port
zope_port
=
str
(
zope_parsed
.
port
)
else
:
zope_port
=
"8080"
# Zope username and password
...
...
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
View file @
2f3cc83e
...
...
@@ -10,7 +10,7 @@ host = "%(host)s"
site_id = "%(site_id)s"
mysql_url = "%(sql_connection_string)s"
protocol = "%(protocol)s"
scalability =
True
scalability =
"%(scalability)s" == "True"
erp5_catalog_storage = 'erp5_mysql_innodb_catalog'
...
...
@@ -20,7 +20,7 @@ header_dict = {'Authorization': 'Basic %%s' %% \
if protocol == 'https':
zope_connection = httplib.HTTPSConnection(host)
elif protocol == 'http':
zope_connection = httplib.HTTPConnection(host)
zope_connection = httplib.HTTPConnection(host)
else:
raise ValueError("Protocol not implemented")
...
...
@@ -35,9 +35,9 @@ if result.status == 204: # and (result.read() == "False"):
if protocol == 'https':
zope_connection = httplib.HTTPSConnection(host)
elif protocol == 'http':
zope_connection = httplib.HTTPConnection(host)
zope_connection = httplib.HTTPConnection(host)
else:
raise ValueError("Protocol
pot implemented")
raise ValueError("Protocol
not implemented")
# Create the expected ERP5 instance
zope_connection.request(
...
...
@@ -53,8 +53,8 @@ if result.status == 204: # and (result.read() == "False"):
# been done by the same script.
result = zope_connection.getresponse()
# Read result make sure the site really finished to
#created the ERP5 site.
# Read result make sure the site really finished to
#
created the ERP5 site.
result.read()
print "ERP5 site created."
...
...
@@ -72,35 +72,35 @@ if scalability:
if protocol == 'https':
zope_connection = httplib.HTTPSConnection(host)
elif protocol == 'http':
zope_connection = httplib.HTTPConnection(host)
zope_connection = httplib.HTTPConnection(host)
else:
raise ValueError("Protocol not implemented")
zope_connection.request(
'POST', '/ERP5Site_updateConfigurationConsistency',
urllib.urlencode({
'update_method': 'ERP5Site_updateConfigurationConsistency',
'dialog_id'
=
'ERP5Site_viewCheckConsistency',
'cancel_url'
=
cancel_url,
'dialog_method'
=
'ERP5Site_fixConfigurationConsistency',
'dialog_category'
=
'None',
'object_path'
=
'%2Ferp5',
'form_id'
=
'view',
'select_favorite'
=
'',
'select_module'
=
'',
'select_language'
=
'en',
'all_languages'
=
'1',
'field_your_search_text'
=
'Search',
'default_field_your_enable_alarm%3Aint'
=
'0',
'field_your_enable_alarm'
=
'on',
'list_selection_name'
=
'erp5_site_check_consistency_selection',
'listbox_list_selection_name'
=
'erp5_site_check_consistency_selection',
'md5_object_uid_list'
=
'd751713988987e9331980363e24189ce',
'listbox_title'
=
'',
'uids%3Alist'
=
'598',
'listbox_uid%3Alist'
=
'598',
'listbox_uid%3Alist'
=
'595',
'listbox_uid%3Alist'
=
'599',
'Base_callDialogMethod%3Amethod'
=
'',
'dialog_id'
:
'ERP5Site_viewCheckConsistency',
'cancel_url'
:
cancel_url,
'dialog_method'
:
'ERP5Site_fixConfigurationConsistency',
'dialog_category'
:
'None',
'object_path'
:
'%2Ferp5',
'form_id'
:
'view',
'select_favorite'
:
'',
'select_module'
:
'',
'select_language'
:
'en',
'all_languages'
:
'1',
'field_your_search_text'
:
'Search',
'default_field_your_enable_alarm%3Aint'
:
'0',
'field_your_enable_alarm'
:
'on',
'list_selection_name'
:
'erp5_site_check_consistency_selection',
'listbox_list_selection_name'
:
'erp5_site_check_consistency_selection',
'md5_object_uid_list'
:
'd751713988987e9331980363e24189ce',
'listbox_title'
:
'',
'uids%3Alist'
:
'598',
'listbox_uid%3Alist'
:
'598',
'listbox_uid%3Alist'
:
'595',
'listbox_uid%3Alist'
:
'599',
'Base_callDialogMethod%3Amethod'
:
'',
}),
headers=header_dict)
...
...
@@ -117,5 +117,3 @@ if scalability:
if configurator_available and not configurator_already_applied:
# install small and medium business via configurator
pass
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment