Commit c5204244 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_upgrader: Call more upgrades automatically

   Invoke extra expected steps, commonly used during upgrade via activities to accelerate the administrator actions while upgrading.
parent 32ecbfd4
template_tool = context.getPortalObject().portal_templates
portal = context.getPortalObject()
template_tool = portal.portal_templates
template_tool.updateRepositoryBusinessTemplateList(
template_tool.getRepositoryList())
......@@ -13,3 +14,16 @@ method_kw = {'bt5_list': ['erp5_core'],
template_tool.upgradeSite(**method_kw)
if skip_upgrader:
return "Skipped to upgrade slapos_upgrader"
# Use activities to ensure that it done on another transaction
tag = "upgrader:ERP5Site_upgradeUpgraderBusinessTemplate"
template_tool.activate(
tag=tag).ERP5Site_upgradeUpgraderBusinessTemplate()
if skip_alarm:
return "Skipped to call portal_alarms.promise_check_upgrade.activeSense"
portal.portal_alarms.promise_check_upgrade.activate(
tag="upgrader:promise_check_upgrade", after_tag=tag).activeSense()
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>skip_upgrader=None, skip_alarm=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
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