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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
5d54ce6c
Commit
5d54ce6c
authored
Dec 21, 2022
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: only create upgrade decision for SOftware Instance for now
parent
a17a061f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
...al_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
+9
-1
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
View file @
5d54ce6c
...
@@ -23,12 +23,19 @@ if software_product is None:
...
@@ -23,12 +23,19 @@ if software_product is None:
# No way to upgrade, if we can find which Software Product to upgrade
# No way to upgrade, if we can find which Software Product to upgrade
return
return
node
=
None
compute_
node
=
None
root_instance_list
=
[
root_instance_list
=
[
q
for
q
in
instance_tree
.
getSuccessorValueList
(
portal_type
=
[
"Software Instance"
,
"Slave Instance"
])
q
for
q
in
instance_tree
.
getSuccessorValueList
(
portal_type
=
[
"Software Instance"
,
"Slave Instance"
])
if
q
.
getSlapState
()
!=
'destroy_requested'
]
if
q
.
getSlapState
()
!=
'destroy_requested'
]
if
len
(
root_instance_list
)
!=
0
:
if
len
(
root_instance_list
)
!=
0
:
root_instance
=
root_instance_list
[
0
]
root_instance
=
root_instance_list
[
0
]
if
root_instance
.
getPortalType
()
==
'Slave Instance'
:
# XXX do not upgrade Slave Instance for now
# should check Instance Node or allocation on same tree
return
partition
=
root_instance
.
getAggregateValue
()
if
partition
is
not
None
:
compute_node
=
partition
.
getParentValue
()
person
=
context
.
getDestinationSectionValue
()
person
=
context
.
getDestinationSectionValue
()
# Search if the product with the same type
# Search if the product with the same type
...
@@ -38,6 +45,7 @@ allocation_cell_list = software_product.getFollowUpValue().Project_getSoftwarePr
...
@@ -38,6 +45,7 @@ allocation_cell_list = software_product.getFollowUpValue().Project_getSoftwarePr
software_product_type
=
software_type
,
software_product_type
=
software_type
,
#software_product_release=software_release,
#software_product_release=software_release,
destination_value
=
person
,
destination_value
=
person
,
node_value
=
compute_node
,
predicate_portal_type
=
'Allocation Supply Cell'
predicate_portal_type
=
'Allocation Supply Cell'
)
)
...
...
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