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
19
Merge Requests
19
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
859ed207
Commit
859ed207
authored
Aug 31, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Simplify search by using free_for_request
parent
4686f6bc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
.../slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
+7
-12
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
View file @
859ed207
kw
[
'portal_type'
]
=
'Software Installation'
kw
[
'validation_state'
]
=
'validated'
kw
[
'url_string'
]
=
context
.
getUrlString
()
portal
=
context
.
getPortalObject
()
software_installation_list
=
context
.
portal_catalog
(
**
kw
)
compute_node_list
=
[]
allocation_scope_list
=
[
'open/personal'
,
'open/public'
]
for
software_installation
in
software_installation_list
:
compute_node
=
software_installation
.
getAggregateValue
()
if
software_installation
.
getSlapState
()
==
'start_requested'
and
\
compute_node
.
getAllocationScope
()
in
allocation_scope_list
:
compute_node_list
.
append
(
compute_node
)
compute_partition_list
=
portal
.
portal_catalog
(
software_release_url
=
context
.
getUrlString
(),
free_for_request
=
1
,
group_by
=
(
"parent_uid"
,)
)
return
compute_node_list
return
[
c
.
getParentValue
()
for
c
in
compute_partition_list
]
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