Commit 8195653b authored by Xavier Thompson's avatar Xavier Thompson

slapos_cloud: Filter on capabilities in findPartition

parent 988b3fd0
...@@ -88,6 +88,10 @@ for base_category in compute_node_base_category_list: ...@@ -88,6 +88,10 @@ for base_category in compute_node_base_category_list:
else: else:
query_kw["%s_uid" % base_category] = category.getUid() query_kw["%s_uid" % base_category] = category.getUid()
if 'capability' in filter_kw:
capability = filter_kw.pop('capability')
query_kw['subject'] = {'query': capability, 'key': 'ExactMatch'}
query_kw["capacity_scope_uid"] = portal.portal_categories.capacity_scope.open.getUid() query_kw["capacity_scope_uid"] = portal.portal_categories.capacity_scope.open.getUid()
if subscription_reference is not None and software_instance_portal_type != "Slave Instance": if subscription_reference is not None and software_instance_portal_type != "Slave Instance":
# Subscriptions uses a specific set of allocation scope # Subscriptions uses a specific set of allocation scope
......
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