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
Lorenzo Martinico
slapos
Commits
c6f988c4
Commit
c6f988c4
authored
Jul 11, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_bootstrap: Trying to correct template.read() bug
parent
5e5300ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
43 deletions
+40
-43
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
+40
-43
No files found.
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
View file @
c6f988c4
...
@@ -64,50 +64,47 @@ if scalability:
...
@@ -64,50 +64,47 @@ if scalability:
print "Scalability case"
print "Scalability case"
# Here check if configurator is available
# Here check if configurator is available
configurator_available = False
configurator_available = False
cancel_url = "https%3A%2F%2F192.168.241.110%3A2153%2Ferp5%2FERP5Site_viewCheckConsistency"
if not configurator_available:
if not configurator_available:
if is_scalability_case:
import os
import os
# Fix site consistency
# Fix site consistency
if protocol == 'https':
if protocol == 'https':
zope_connection = httplib.HTTPSConnection(host)
zope_connection = httplib.HTTPSConnection(host)
elif protocol == 'http':
elif protocol == 'http':
zope_connection = httplib.HTTPConnection(host)
zope_connection = httplib.HTTPConnection(host)
else:
else:
raise ValueError("Protocol not implemented")
raise ValueError("Protocol not implemented")
zope_connection.request(
zope_connection.request(
'POST', '/ERP5Site_updateConfigurationConsistency',
'POST', '/ERP5Site_updateConfigurationConsistency',
urllib.urlencode({
urllib.urlencode({
'update_method': 'ERP5Site_updateConfigurationConsistency',
'update_method': 'ERP5Site_updateConfigurationConsistency',
'dialog_id':'ERP5Site_viewCheckConsistency',
'dialog_id':'ERP5Site_viewCheckConsistency',
'dialog_method':'ERP5Site_fixConfigurationConsistency',
'cancel_url':cancel_url,
'dialog_category':'None',
'dialog_method':'ERP5Site_fixConfigurationConsistency',
'object_path':'/erp5',
'dialog_category':'None',
'form_id':'view',
'object_path':'%2Ferp5',
'select_favorite':'',
'form_id':'view',
'select_module':'',
'select_favorite':'',
'select_language':'en',
'select_module':'',
'all_languages':'1',
'select_language':'en',
'field_your_search_text':'Search',
'all_languages':'1',
'default_field_your_enable_alarm;int':'0',
'field_your_search_text':'Search',
'field_your_enable_alarm':'on',
'default_field_your_enable_alarm%3Aint':'0',
'list_selection_name':'erp5_site_check_consistency_selection',
'field_your_enable_alarm':'on',
'listbox_list_selection_name':'erp5_site_check_consistency_selection',
'list_selection_name':'erp5_site_check_consistency_selection',
'md5_object_uid_list':'d751713988987e9331980363e24189ce',
'listbox_list_selection_name':'erp5_site_check_consistency_selection',
'listbox_title':'',
'md5_object_uid_list':'d751713988987e9331980363e24189ce',
'uids;list':'598',
'listbox_title':'',
'listbox_uid;list':'598',
'uids%3Alist':'598',
'listbox_uid;list':'595',
'listbox_uid%3Alist':'598',
'listbox_uid;list':'599',
'listbox_uid%3Alist':'595',
'Base_callDialogMethod;method':'',
'listbox_uid%3Alist':'599',
}),
'Base_callDialogMethod%3Amethod':'',
headers=header_dict)
}),
headers=header_dict)
print "POST sent"
result = zope_connection.getresponse()
print "POST sent"
print result.read()
result = zope_connection.getresponse()
print "POST read"
print result.read()
print "POST read"
# Here check if configurator is available
# Here check if configurator is available
...
...
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