Commit c1b8dfd7 authored by Jérome Perrin's avatar Jérome Perrin

*: remove references to old style of configuring cloudooo

We now use URL only, old address + port way is obsolete.
parent f76db368
Pipeline #1518 skipped
......@@ -13,14 +13,10 @@ for document in portal.portal_catalog(portal_type=bt.getTemplatePortalTypeRoleLi
document.updateLocalRolesOnSecurityGroups()
conversion_server_url = portal.portal_preferences.getPreferredDocumentConversionServerUrl()
conversion_server_hostname = portal.portal_preferences.getPreferredOoodocServerAddress()
conversion_server_port = portal.portal_preferences.getPreferredOoodocServerPortNumber()
for preference_id in ["default_configurator_preference", "default_configurator_system_preference"]:
preference = getattr(portal.portal_preferences, preference_id)
if preference.getPortalType() == "System Preference":
preference.setPreferredDocumentConversionServerUrl(conversion_server_url)
preference.setPreferredOoodocServerPortNumber(conversion_server_port)
preference.setPreferredOoodocServerAddress(conversion_server_hostname)
if isTransitionPossible(preference, "enable"):
preference.enable()
......
......@@ -187,10 +187,6 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
""" Check System Preference"""
system_preference = self.portal.portal_catalog.getResultValue(portal_type="System Preference")
conversion_dict = _getConversionServerDict()
self.assertEqual(system_preference.getPreferredOoodocServerPortNumber(),
conversion_dict['port'])
self.assertEqual(system_preference.getPreferredOoodocServerAddress(),
conversion_dict['hostname'])
self.assertEqual(system_preference.getPreferredDocumentConversionServerUrl(),
conversion_dict['url'])
......
......@@ -377,11 +377,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
preference_tool.getPreferredAccountingTransactionGap())
# on Business Configuration
#self.assertEqual('localhost', preference_tool.getPreferredOoodocServerAddress())
#self.assertEqual(8011, preference_tool.getPreferredOoodocServerPortNumber())
#self.assertEqual('http://localhost:8011', preference_tool.getPreferredDocumentConversionServerUrl())
# accounting
self.assertEqual('group/my_group',
preference_tool.getPreferredAccountingTransactionSectionCategory())
......
......@@ -21,12 +21,6 @@ default_site_preference.setPreferredHtmlStyleAccessTab('1')
previous_conversion_server_url = portal.portal_preferences.getPreferredDocumentConversionServerUrl()
default_site_preference.setPreferredDocumentConversionServerUrl(previous_conversion_server_url)
previous_conversion_server_address = portal.portal_preferences.getPreferredOoodocServerAddress()
default_site_preference.setPreferredOoodocServerAddress(previous_conversion_server_address)
previous_conversion_port = portal.portal_preferences.getPreferredOoodocServerPortNumber()
default_site_preference.setPreferredOoodocServerPortNumber(previous_conversion_port)
if default_site_preference.getPreferenceState() != 'global':
default_site_preference.enable()
......
......@@ -213,10 +213,6 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
""" Check System Preference"""
system_preference = self.portal.portal_catalog.getResultValue(portal_type="System Preference")
conversion_dict = _getConversionServerDict()
self.assertEqual(system_preference.getPreferredOoodocServerPortNumber(),
conversion_dict['port'])
self.assertEqual(system_preference.getPreferredOoodocServerAddress(),
conversion_dict['hostname'])
self.assertEqual(system_preference.getPreferredDocumentConversionServerUrl(),
conversion_dict['url'])
......
......@@ -25,7 +25,5 @@ if ung_system_preference is None:
ung_system_preference = portal.portal_preferences.newContent(portal_type='System Preference',
id='ung_system_preference',
title='UNG System Preference')
ung_system_preference.setPreferredOoodocServerAddress('localhost')
ung_system_preference.setPreferredOoodocServerPortNumber('8008')
ung_system_preference.setPreferredDocumentConversionServerUrl('http://localhost:8008')
ung_system_preference.enable()
portal = context.getPortalObject()
MARKER = (None, '',)
url = portal.portal_preferences.getPreferredDocumentConversionServerUrl()
address = portal.portal_preferences.getPreferredOoodocServerAddress()
port = portal.portal_preferences.getPreferredOoodocServerPortNumber()
# make sure cloudoo is available. this check is required ONLY due to
# unit test nature where a bt5 with a data content which is to be reindexed
# is installed BEFORE the real cloudoo is setup in preferences.
if url not in MARKER or (address not in MARKER and port not in MARKER):
if portal.portal_preferences.getPreferredDocumentConversionServerUrl():
for index_uid in range(len(uid)):
document_relative_url = getRelativeUrl[index_uid]
document = portal.restrictedTraverse(document_relative_url)
......
......@@ -77,8 +77,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
default_pref = portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
default_pref.setPreferredDocumentFileNameRegularExpression(FILE_NAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if default_pref.getPreferenceState() != 'global':
......
......@@ -454,8 +454,6 @@ class TestUNG(ERP5TypeTestCase):
system_preference = portal_preferences.newContent(portal_type='System Preference')
conversion_dict = _getConversionServerDict()
system_preference.setPreferredDocumentConversionServerUrl(conversion_dict["url"])
system_preference.setPreferredOoodocServerAddress(conversion_dict["hostname"])
system_preference.setPreferredOoodocServerPortNumber(conversion_dict["port"])
system_preference.enable()
self.tic()
document_path, filename = self.getDocumentPath()
......
......@@ -123,8 +123,6 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'):
default_pref.enable()
return default_pref
......
......@@ -1020,8 +1020,6 @@ class TestCRMMailSend(BaseTestCRM):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
default_pref.setPreferredDocumentFilenameRegularExpression(FILENAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if default_pref.getPreferenceState() == 'disabled':
......
......@@ -70,8 +70,6 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
preference = preference_list[0]
conversion_dict = _getConversionServerDict()
preference.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
preference.setPreferredOoodocServerAddress(conversion_dict['hostname'])
preference.setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(preference, 'enable'):
preference.enable()
......
......@@ -154,8 +154,6 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'):
default_pref.enable()
return default_pref
......
......@@ -96,10 +96,6 @@ class TestWebCrawler(ERP5TypeTestCase):
portal_type='System Preference')
conversion_dict = _getConversionServerDict()
system_preference.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
system_preference.\
setPreferredOoodocServerAddress(conversion_dict['hostname'])
system_preference.\
setPreferredOoodocServerPortNumber(conversion_dict['port'])
system_preference.setPreferredDocumentFilenameRegularExpression(
FILENAME_REGULAR_EXPRESSION)
system_preference.setPreferredDocumentReferenceRegularExpression(
......
......@@ -132,8 +132,6 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
preference = preference_list[0]
conversion_dict = _getConversionServerDict()
preference.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
preference.setPreferredOoodocServerAddress(conversion_dict['hostname'])
preference.setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(preference, 'enable'):
preference.enable()
......
......@@ -51,8 +51,6 @@ class TestFormPrintoutMixin(ERP5TypeTestCase):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
#default_pref.setPreferredConversionCacheFactory('document_cache_factory')
if default_pref.getPreferenceState() != 'global':
default_pref.enable()
......
......@@ -124,8 +124,6 @@ class TestDocumentMixin(ERP5TypeTestCase):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
default_pref.setPreferredDocumentFilenameRegularExpression(FILENAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'):
......
......@@ -141,8 +141,6 @@ class TestIngestion(ERP5TypeTestCase):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
default_pref.setPreferredDocumentFilenameRegularExpression(FILENAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if default_pref.getPreferenceState() != 'global':
......
......@@ -59,8 +59,6 @@ class TestOOoImportMixin(ERP5TypeTestCase):
portal_type='System Preference')
conversion_dict = _getConversionServerDict()
self.pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
self.pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
self.pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
self.pref.setPriority(Priority.SITE)
self.pref.enable()
......
......@@ -90,8 +90,6 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'):
default_pref.enable()
return default_pref
......
......@@ -151,8 +151,6 @@ class TestERP5DocumentSyncMLMixin(TestERP5SyncMLMixin):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredDocumentConversionServerUrl(conversion_dict['url'])
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
default_pref.setPreferredDocumentFileNameRegularExpression(FILENAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if default_pref.getPreferenceState() == 'disabled':
......
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