Commit 8b0fedc3 authored by Rafael Monnerat's avatar Rafael Monnerat

Allow alarm_dict on upgrader signature to disable some alarms.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39070 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3b8f4430
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -62,6 +59,10 @@ ...@@ -62,6 +59,10 @@
# Setup skins\n # Setup skins\n
context.ERP5Site_setupUpgraderSkinSelection()\n context.ERP5Site_setupUpgraderSkinSelection()\n
\n \n
alarm_dict = context.ERP5Site_getUpgraderSignature("alarm_dict")\n
if not alarm_dict.get(context.getId(), True):\n
return False\n
\n
# Verify if is required upgrade Global Site Properties. \n # Verify if is required upgrade Global Site Properties. \n
if len(context.ERP5Site_upgradeGlobalPropertyList()) > 0:\n if len(context.ERP5Site_upgradeGlobalPropertyList()) > 0:\n
return True\n return True\n
...@@ -137,9 +138,10 @@ return False\n ...@@ -137,9 +138,10 @@ return False\n
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>len</string> <string>alarm_dict</string>
<string>True</string> <string>True</string>
<string>False</string> <string>False</string>
<string>len</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -58,6 +55,10 @@ ...@@ -58,6 +55,10 @@
"""\n """\n
Here we make sure the installed products are the right ones\n Here we make sure the installed products are the right ones\n
"""\n """\n
alarm_dict = context.ERP5Site_getUpgraderSignature("alarm_dict")\n
if not alarm_dict.get(context.getId(), True):\n
return False\n
\n
# check if upgrade is needed\n # check if upgrade is needed\n
return len(context.ERP5Site_upgradeProductPath()) > 0\n return len(context.ERP5Site_upgradeProductPath()) > 0\n
...@@ -99,9 +100,12 @@ return len(context.ERP5Site_upgradeProductPath()) > 0\n ...@@ -99,9 +100,12 @@ return len(context.ERP5Site_upgradeProductPath()) > 0\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>len</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>alarm_dict</string>
<string>True</string>
<string>False</string>
<string>len</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -59,6 +56,10 @@ ...@@ -59,6 +56,10 @@
Here we make sure the all required system libraries are installed in\n Here we make sure the all required system libraries are installed in\n
appropriate version.\n appropriate version.\n
"""\n """\n
alarm_dict = context.ERP5Site_getUpgraderSignature("alarm_dict")\n
if not alarm_dict.get(context.getId(), True):\n
return False\n
\n
# Verify if upgrade is required for Python\n # Verify if upgrade is required for Python\n
if len(context.ERP5Site_upgradePythonExecutable()) > 0:\n if len(context.ERP5Site_upgradePythonExecutable()) > 0:\n
return True\n return True\n
...@@ -107,11 +108,12 @@ return False\n ...@@ -107,11 +108,12 @@ return False\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>len</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>alarm_dict</string>
<string>True</string> <string>True</string>
<string>False</string> <string>False</string>
<string>len</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -61,6 +58,10 @@ ...@@ -61,6 +58,10 @@
# Setup skins\n # Setup skins\n
context.ERP5Site_setupUpgraderSkinSelection()\n context.ERP5Site_setupUpgraderSkinSelection()\n
\n \n
alarm_dict = context.ERP5Site_getUpgraderSignature("alarm_dict")\n
if not alarm_dict.get(context.getId(), True):\n
return False\n
\n
portal_alarms = context.getPortalObject().portal_alarms\n portal_alarms = context.getPortalObject().portal_alarms\n
activate = context.portal_activities.activate\n activate = context.portal_activities.activate\n
# Group Messages into the same active process.\n # Group Messages into the same active process.\n
...@@ -133,6 +134,9 @@ return message_list\n ...@@ -133,6 +134,9 @@ return message_list\n
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>alarm_dict</string>
<string>True</string>
<string>False</string>
<string>portal_alarms</string> <string>portal_alarms</string>
<string>activate</string> <string>activate</string>
<string>active_process</string> <string>active_process</string>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -59,8 +56,20 @@ ...@@ -59,8 +56,20 @@
The release signature is a kind of declarative\n The release signature is a kind of declarative\n
specification of an upgrader.\n specification of an upgrader.\n
"""\n """\n
\n
# Alarm dict is used to enable/disable upgrade alarms.\n
# ie.: If you don\'t want upgrade products in some environments\n
# you can just define \'product_upgrader\' : False.\n
\n
ALARM_DICT = {\n
"system_upgrader" : True,\n
"product_upgrader" : True,\n
"bt5_upgrader" : True,\n
"finalize_upgrader" : True\n
}\n
\n
# The destination release provided by this upgrader\n # The destination release provided by this upgrader\n
DESTINATION_RELEASE = \'5.4.7\'\n DESTINATION_RELEASE = \'5.4.6\'\n
\n \n
ZOPE_VERSION = "2.8.11"\n ZOPE_VERSION = "2.8.11"\n
\n \n
...@@ -527,8 +536,10 @@ UPGRADE_OBJECT_CLASS_LIST = ( (\'portal_gadgets\', \n ...@@ -527,8 +536,10 @@ UPGRADE_OBJECT_CLASS_LIST = ( (\'portal_gadgets\', \n
\n \n
# Wrap everything into a dict\n # Wrap everything into a dict\n
signature_dict = {\n signature_dict = {\n
# Defines the alarms enabled for the upgrade\n
\'alarm_dict\' : ALARM_DICT\n
# Defines the default release for bt5\n # Defines the default release for bt5\n
\'release\': DESTINATION_RELEASE\n , \'release\': DESTINATION_RELEASE\n
# Defines the default version for zope\n # Defines the default version for zope\n
, \'zope\': ZOPE_VERSION\n , \'zope\': ZOPE_VERSION\n
# Defines the default version for python\n # Defines the default version for python\n
...@@ -608,6 +619,8 @@ else:\n ...@@ -608,6 +619,8 @@ else:\n
<value> <value>
<tuple> <tuple>
<string>item</string> <string>item</string>
<string>True</string>
<string>ALARM_DICT</string>
<string>DESTINATION_RELEASE</string> <string>DESTINATION_RELEASE</string>
<string>ZOPE_VERSION</string> <string>ZOPE_VERSION</string>
<string>PYTHON_VERSION</string> <string>PYTHON_VERSION</string>
......
531 532
\ No newline at end of file \ No newline at end of file
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