From 5aad664f785dc1aaccf2baee39f04853ce26ca1b Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Thu, 10 Feb 2011 08:33:53 +0000 Subject: [PATCH] clean up. we no longer use 'release' and 'product' in upgrade signature. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43260 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ERP5Site_getUpgraderSignature.xml | 8 -- .../ERP5Site_verifyBT5UpgradeIntegrity.xml | 111 ------------------ .../TestTemplateItem/testLiveUpgrader.py | 2 - bt5/erp5_upgrader/bt/revision | 2 +- 4 files changed, 1 insertion(+), 122 deletions(-) delete mode 100644 bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyBT5UpgradeIntegrity.xml diff --git a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml index 7f91cbe67a..836cf48a21 100644 --- a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml +++ b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml @@ -64,9 +64,6 @@ ALARM_DICT = {\n "finalize_upgrader" : True\n }\n \n -# The destination release provided by this upgrader\n -DESTINATION_RELEASE = \'5.4.7\'\n -\n # A list of bt5 which the upgrader can upgrade\n # ie. a bt5 not in this list will not be upgraded\n # by having an explicit list we can handle dedicate\n @@ -254,7 +251,6 @@ CATALOG_FILTER_DICT = None\n #\n \n INTEGRITY_VERIFICATION_SCRIPT_ID_LIST = (\'ERP5Site_verifyUpgradeIntegrity\',\n - \'ERP5Site_verifyBT5UpgradeIntegrity\',\n \'ERP5Site_verifyMemcachedIntegrity\',\n \'ERP5Site_verifySQLCatalogFilterIntegrity\',\n \'ERP5Site_verifyActivityIntegrity\')\n @@ -309,10 +305,6 @@ RECATALOG = False\n signature_dict = {\n # Defines the alarms enabled for the upgrade\n \'alarm_dict\' : ALARM_DICT\n - # Defines the default release for bt5\n - , \'release\': DESTINATION_RELEASE\n - # Defines the default release for products\n - , \'product\': DESTINATION_RELEASE\n # Provides a snapshot of how workflow chains should be configured\n , \'workflow_chain_dict\': WORKFLOW_CHAIN_DICT\n # Provides a list of required bt5 (without which upgrader wont\'t work)\n diff --git a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyBT5UpgradeIntegrity.xml b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyBT5UpgradeIntegrity.xml deleted file mode 100644 index a174ce4eec..0000000000 --- a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_verifyBT5UpgradeIntegrity.xml +++ /dev/null @@ -1,111 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>Script_magic</string> </key> - <value> <int>3</int> </value> - </item> - <item> - <key> <string>_bind_names</string> </key> - <value> - <object> - <klass> - <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>_asgns</string> </key> - <value> - <dictionary> - <item> - <key> <string>name_container</string> </key> - <value> <string>container</string> </value> - </item> - <item> - <key> <string>name_context</string> </key> - <value> <string>context</string> </value> - </item> - <item> - <key> <string>name_m_self</string> </key> - <value> <string>script</string> </value> - </item> - <item> - <key> <string>name_subpath</string> </key> - <value> <string>traverse_subpath</string> </value> - </item> - </dictionary> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>_body</string> </key> - <value> <string>"""\n - Verify if this instance is a properly configured one.\n - This script could be used in functional tests\n -"""\n -portal = context.getPortalObject()\n -message_list = []\n -\n -def assertEquals(value1, value2):\n - if value1 == value2:\n - return True\n - return False\n -\n -def assertNotEquals(value1, value2):\n - if value1 != value2:\n - return True\n - return False\n - \n -\n -# BT5 must contain a minimum set of installed ones having current ERP5 instance version\n -# Hardcoded Version from now.\n -signature = context.ERP5Site_getUpgraderSignature()\n -erp5_instance_version = signature[\'release\']\n -# XXX It should be generic at someday in future and use Signature Script.\n -\n -\n -minimum_bt5_title_list = list(signature[\'required_bt5_id_list\']) + \\\n - [\'express_customisation\']\n -\n -for bt5_title in minimum_bt5_title_list:\n - bt5 = portal.portal_templates.getInstalledBusinessTemplate(bt5_title)\n - if bt5 is not None:\n - if not assertEquals(bt5.getVersion(), erp5_instance_version):\n - message_list.append("False %s (%s != %s)" % (bt5_title, bt5.getVersion(), erp5_instance_version)) \n - else:\n - message_list.append("False (bt5 %s not found)" % (bt5_title))\n -\n -return [ i for i in message_list if i is not True]\n -</string> </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>_proxy_roles</string> </key> - <value> - <tuple> - <string>Manager</string> - </tuple> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>ERP5Site_verifyBT5UpgradeIntegrity</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_upgrader/TestTemplateItem/testLiveUpgrader.py b/bt5/erp5_upgrader/TestTemplateItem/testLiveUpgrader.py index 045ce567e5..8405c110e3 100644 --- a/bt5/erp5_upgrader/TestTemplateItem/testLiveUpgrader.py +++ b/bt5/erp5_upgrader/TestTemplateItem/testLiveUpgrader.py @@ -74,8 +74,6 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase): or change API Definition. """ signature_key_list = ('alarm_dict', - 'release', - 'product', 'workflow_chain_dict', 'required_bt5_id_list', 'upgradable_bt5_id_list', diff --git a/bt5/erp5_upgrader/bt/revision b/bt5/erp5_upgrader/bt/revision index 99fd4575a5..9d0f8afde3 100644 --- a/bt5/erp5_upgrader/bt/revision +++ b/bt5/erp5_upgrader/bt/revision @@ -1 +1 @@ -577 \ No newline at end of file +578 \ No newline at end of file -- 2.30.9