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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
isaak yansane-sisk
slapos
Commits
277170a2
Commit
277170a2
authored
Jul 10, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bootstrap: scalability: Hack to fix site consistency
parent
ccec64c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
slapos/recipe/erp5_bootstrap/__init__.py
slapos/recipe/erp5_bootstrap/__init__.py
+1
-0
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
+46
-0
No files found.
slapos/recipe/erp5_bootstrap/__init__.py
View file @
277170a2
...
...
@@ -103,6 +103,7 @@ class Recipe(GenericBaseRecipe):
host
=
"%s:%s"
%
(
zope_hostname
,
zope_port
),
protocol
=
zope_protocol
,
sql_connection_string
=
mysql_connection_string
,
scalability
=
self
.
options
.
get
(
'scalability'
,
'False'
),
)
# Runners
...
...
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
View file @
277170a2
...
...
@@ -55,3 +55,49 @@ if result.status == 204: # and (result.read() == "False"):
#created the ERP5 site.
result.read()
print "ERP5 site created."
# Scalability: Install and configure small buisiness
is_scalability_case = %(scalability)%
if is_scalability_case:
# Here check if configurator is available
configurator_available = False
if not configurator_available:
if is_scalability_case:
import os
# Fix site consistency
if protocol == 'https':
zope_connection = httplib.HTTPSConnection(host)
elif protocol == 'http':
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',
'dialog_method': 'ERP5Site_fixConfigurationConsistency',
'field_your_enable_alarm': 'on',
'object_path': os.path.join('/', site_id),
'uids;list':'598',
'listbox_uid;list':'598',
'uids;list':'595',
'listbox_uid;list':'595',
'uids;list':'599',
'listbox_uid;list':'599',
}),
headers=header_dict)
result = zope_connection.getresponse()
result.read()
# Here check if configurator is available
configurator_available = False
# Here check if S&MB not already installed
configurator_already_applied = False
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