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
configurator level, by providing a list of
alarms to be invoked always.
All post configurations have to be placed as Constraints.
"""
alarm_to_solve_list = ['promise_certificate_autority_tool',
'promise_conversion_server',
'promise_kumofs_server',
'promise_mailhost_configuration',
'promise_memcached_server']
with context.portal_activities.defaultActivateParameterDict({}, placeless=True):
active_process = context.portal_activities.newActiveProcess(activate_kw={})
for alarm in context.portal_alarms.contentValues():
alarm_id = alarm.getId()
if alarm_id.startswith("promise_slapos") or \
alarm_id in alarm_to_solve_list:
context.log("Solve %s" % alarm_id)
alarm.solve()
context.ERP5Site_checkUpgraderConsistency(fixit=1,
active_process=active_process,
filter_dict={"constraint_type": "post_upgrade"})
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