Commit 01e31a37 authored by Benjamin Blanc's avatar Benjamin Blanc

erp5_bootstrap: for relooping

parent b78e6cbc
...@@ -126,50 +126,53 @@ if result.status == 204: # and (result.read() == "False"): ...@@ -126,50 +126,53 @@ if result.status == 204: # and (result.read() == "False"):
# Scalability case # Scalability case
if scalability: if scalability:
# Fix site consistency while True:
if not testIfExist("/%%s/portal_configurator/" %%site_id):
print "Going to fix site consistency..." # Fix site consistency
zope_connection = getConnection() if not testIfExist("/%%s/portal_configurator/" %%site_id):
zope_connection.request( print "Going to fix site consistency..."
'GET', '/%%s/ERP5Site_launchFixConfigurationConsistency' %%(site_id), zope_connection = getConnection()
headers=header_dict zope_connection.request(
) 'GET', '/%%s/ERP5Site_launchFixConfigurationConsistency' %%(site_id),
result = zope_connection.getresponse() headers=header_dict
print "Check consistency..." )
print result.read() result = zope_connection.getresponse()
# Wait activities print "Check consistency..."
waitFor0PendingActivities() print result.read()
print "Site consistency checking: done." # Wait activities
waitFor0PendingActivities()
# Install testing scalability business configuration if not exists print "Site consistency checking: done."
if testIfExist("/%%s/portal_configurator/" %%site_id) \
and not testIfExist("/%%s/sale_order_module/" %%site_id): # Install testing scalability business configuration if not exists
print "Going to install testing scalability business configuration.." if testIfExist("/%%s/portal_configurator/" %%site_id) \
zope_connection = getConnection() and not testIfExist("/%%s/sale_order_module/" %%site_id):
zope_connection.request( print "Going to install testing scalability business configuration.."
'GET', '/%%s/business_configuration_module/1/build' %%site_id, zope_connection = getConnection()
headers=header_dict zope_connection.request(
) 'GET', '/%%s/business_configuration_module/1/build' %%site_id,
result = zope_connection.getresponse() headers=header_dict
print "Build scalability business configuration..." )
print result.read() result = zope_connection.getresponse()
# Wait activities print "Build scalability business configuration..."
waitFor0PendingActivities() print result.read()
print "Scalability business configuration building: done." # Wait activities
waitFor0PendingActivities()
# Create scalability users print "Scalability business configuration building: done."
if testIfExist("/%%s/person_module/scalability_user/getTitle" %%site_id) \
and not testIfExist("/%%s/person_module/scalability_user_0/getTitle" %%site_id): # Create scalability users
print "Going to create scalability users.." if testIfExist("/%%s/person_module/scalability_user/getTitle" %%site_id) \
zope_connection = getConnection() and not testIfExist("/%%s/person_module/scalability_user_0/getTitle" %%site_id):
zope_connection.request( print "Going to create scalability users.."
'GET', '/%%s/init_scalability' %%site_id, zope_connection = getConnection()
headers=header_dict zope_connection.request(
) 'GET', '/%%s/init_scalability' %%site_id,
result = zope_connection.getresponse() headers=header_dict
print "Creating scalaiblity users..." )
assert(result.read()=="1") result = zope_connection.getresponse()
# Wait activities print "Creating scalaiblity users..."
waitFor0PendingActivities() assert(result.read()=="1")
print "Scalability users creation: done." # Wait activities
waitFor0PendingActivities()
print "Scalability users creation: done."
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