Commit 91d81266 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_configurator: Invoke Post Upgrade Constraints instead Alarms.

parent 85cc8909
""" """
Solve all alarms which starts with id as "promise_vifib*". Invoke all post upgrades in order to finish the slapos master configuration.
(rafael): This approach could be generalized on All post configurations have to be placed as Constraints.
configurator level, by providing a list of
alarms to be invoked always.
""" """
alarm_to_solve_list = ['promise_certificate_autority_tool', with context.portal_activities.defaultActivateParameterDict({}, placeless=True):
'promise_conversion_server', active_process = context.portal_activities.newActiveProcess(activate_kw={})
'promise_kumofs_server',
'promise_mailhost_configuration',
'promise_memcached_server']
for alarm in context.portal_alarms.contentValues(): context.ERP5Site_checkUpgraderConsistency(fixit=1,
alarm_id = alarm.getId() active_process=active_process,
if alarm_id.startswith("promise_slapos") or \ filter_dict={"constraint_type": "post_upgrade"})
alarm_id in alarm_to_solve_list:
context.log("Solve %s" % alarm_id)
alarm.solve()
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