Commit 78d3a3e4 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: manually filter Allocation Supply by Compute Node

parent cf5bc4a6
......@@ -16,10 +16,7 @@ if software_product is not None:
if destination_value is None:
destination_value = portal.portal_membership.getAuthenticatedMember().getUserValue()
if node_value is not None:
tested_base_category_list.append('aggregate')
if len(tested_base_category_list) == 6:
if len(tested_base_category_list) == 5:
tested_base_category_list = None
if predicate_portal_type is None:
......@@ -33,12 +30,16 @@ tmp_context = portal.portal_trash.newContent(
software_release_value=software_product_release,
destination_value=destination_value,
destination_project_value=project,
aggregate_value=node_value,
start_date=DateTime()
)
# XXX aggregate category is not acquired by Cell from Supply (this is expected)
# maybe another base category should be used to filter with searchPredicateList?
if node_value is not None:
node_relative_url = node_value.getRelativeUrl()
return [x.getObject() for x in domain_tool.searchPredicateList(
tmp_context,
portal_type=predicate_portal_type,
tested_base_category_list=tested_base_category_list
)]
) if ((node_value is None) or (node_relative_url in x.getParentValue().getParentValue().getAggregateList()))]
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