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
No related merge requests found
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -62,6 +59,10 @@
# Setup skins\n
context.ERP5Site_setupUpgraderSkinSelection()\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
if len(context.ERP5Site_upgradeGlobalPropertyList()) > 0:\n
return True\n
......@@ -137,9 +138,10 @@ return False\n
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>len</string>
<string>alarm_dict</string>
<string>True</string>
<string>False</string>
<string>len</string>
</tuple>
</value>
</item>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -58,6 +55,10 @@
"""\n
Here we make sure the installed products are the right ones\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
return len(context.ERP5Site_upgradeProductPath()) > 0\n
......@@ -99,9 +100,12 @@ return len(context.ERP5Site_upgradeProductPath()) > 0\n
<value>
<tuple>
<string>kw</string>
<string>len</string>
<string>_getattr_</string>
<string>context</string>
<string>alarm_dict</string>
<string>True</string>
<string>False</string>
<string>len</string>
</tuple>
</value>
</item>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -59,6 +56,10 @@
Here we make sure the all required system libraries are installed in\n
appropriate version.\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
if len(context.ERP5Site_upgradePythonExecutable()) > 0:\n
return True\n
......@@ -107,11 +108,12 @@ return False\n
<value>
<tuple>
<string>kw</string>
<string>len</string>
<string>_getattr_</string>
<string>context</string>
<string>alarm_dict</string>
<string>True</string>
<string>False</string>
<string>len</string>
</tuple>
</value>
</item>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -61,6 +58,10 @@
# Setup skins\n
context.ERP5Site_setupUpgraderSkinSelection()\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
activate = context.portal_activities.activate\n
# Group Messages into the same active process.\n
......@@ -133,6 +134,9 @@ return message_list\n
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>alarm_dict</string>
<string>True</string>
<string>False</string>
<string>portal_alarms</string>
<string>activate</string>
<string>active_process</string>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -59,8 +56,20 @@
The release signature is a kind of declarative\n
specification of an upgrader.\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
DESTINATION_RELEASE = \'5.4.7\'\n
DESTINATION_RELEASE = \'5.4.6\'\n
\n
ZOPE_VERSION = "2.8.11"\n
\n
......@@ -527,8 +536,10 @@ UPGRADE_OBJECT_CLASS_LIST = ( (\'portal_gadgets\', \n
\n
# Wrap everything into a 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
\'release\': DESTINATION_RELEASE\n
, \'release\': DESTINATION_RELEASE\n
# Defines the default version for zope\n
, \'zope\': ZOPE_VERSION\n
# Defines the default version for python\n
......@@ -608,6 +619,8 @@ else:\n
<value>
<tuple>
<string>item</string>
<string>True</string>
<string>ALARM_DICT</string>
<string>DESTINATION_RELEASE</string>
<string>ZOPE_VERSION</string>
<string>PYTHON_VERSION</string>
......
531
\ No newline at end of file
532
\ 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