Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
91d81266
Commit
91d81266
authored
Oct 17, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_configurator: Invoke Post Upgrade Constraints instead Alarms.
parent
85cc8909
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
master/bt5/slapos_configurator/SkinTemplateItem/portal_skins/slapos_configurator/BusinessConfiguration_invokeSlapOSMasterPromiseAlarmList.py
...sinessConfiguration_invokeSlapOSMasterPromiseAlarmList.py
+7
-15
No files found.
master/bt5/slapos_configurator/SkinTemplateItem/portal_skins/slapos_configurator/BusinessConfiguration_invokeSlapOSMasterPromiseAlarmList.py
View file @
91d81266
"""
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"
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment