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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos.core
Commits
9c2b697c
Commit
9c2b697c
authored
Sep 24, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: Cancel Upgrade Decision if the SR is already running the proper version
parent
27df5117
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/UpgradeDecision_tryToCancel.py
...em/portal_skins/slapos_pdm/UpgradeDecision_tryToCancel.py
+9
-0
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/UpgradeDecision_tryToCancel.py
View file @
9c2b697c
...
...
@@ -8,9 +8,18 @@ if simulation_state in require_state_list:
if
not
current_release
:
# This upgrade decision is not valid
return
False
instance_tree
=
upgrade_decision
.
UpgradeDecision_getInstanceTree
()
if
instance_tree
is
not
None
:
current_instance_tree_release
=
instance_tree
.
getUrlString
()
if
current_instance_tree_release
==
new_url_string
:
if
simulation_state
in
cancellable_state_list
:
upgrade_decision
.
cancel
()
return
True
if
current_release
.
getUrlString
()
==
new_url_string
:
# Cannot cancel because the software releases are the same
return
False
if
simulation_state
in
cancellable_state_list
:
upgrade_decision
.
cancel
()
return
True
...
...
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