Commit 859ed207 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Simplify search by using free_for_request

parent 4686f6bc
kw['portal_type'] = 'Software Installation' portal = context.getPortalObject()
kw['validation_state'] = 'validated'
kw['url_string'] = context.getUrlString()
software_installation_list = context.portal_catalog(**kw) compute_partition_list = portal.portal_catalog(
compute_node_list = [] software_release_url=context.getUrlString(),
allocation_scope_list = ['open/personal', 'open/public'] free_for_request=1,
for software_installation in software_installation_list: group_by=("parent_uid",)
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)
return compute_node_list return [c.getParentValue() for c in compute_partition_list]
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