From cdfee395fae1b3e31e95b06c114222e3f1cedf6b Mon Sep 17 00:00:00 2001 From: Tetsuro Nakamura Date: Tue, 29 May 2018 01:47:01 +0900 Subject: [PATCH] Fix nits in nested provider allocation candidates(2) Addresses the following minor/nonblocking review comments from earlier in this series: https://review.openstack.org/#/c/567508/18/nova/api/openstack/placement/objects/resource_provider.py@2887 https://review.openstack.org/#/c/567508/18/nova/api/openstack/placement/objects/resource_provider.py@2930 Change-Id: Idb3ea72001121ef67f7a577533a04363c48171dd --- .../api/openstack/placement/objects/resource_provider.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nova/api/openstack/placement/objects/resource_provider.py b/nova/api/openstack/placement/objects/resource_provider.py index 797a11f7e4f1..8910000e6f27 100644 --- a/nova/api/openstack/placement/objects/resource_provider.py +++ b/nova/api/openstack/placement/objects/resource_provider.py @@ -2883,8 +2883,10 @@ def _get_trees_matching_all(ctx, resources, required_traits, forbidden_traits, only provider with enough inventory of SRIOV_NET_VF but it does not have the required HW_NIC_OFFLOAD_GENEVE trait). - :note: This function is used for scenarios that do NOT involve sharing - providers AND where there are nested providers present in the deployment. + :note: This function is used for scenarios to get results for a + RequestGroup with use_same_provider=False. In this scenario, we are able + to use multiple providers within the same provider tree including sharing + providers to satisfy different resources involved in a single RequestGroup. :param ctx: Session context to use :param resources: A dict, keyed by resource class ID, of the amount @@ -2927,7 +2929,8 @@ def _get_trees_matching_all(ctx, resources, required_traits, forbidden_traits, if sharing_providers: # There are sharing providers for this resource class, so we # should also get combinations of (sharing provider, anchor root) - # in addition to (nested provider, anchor root) we already have. + # in addition to (non-sharing provider, anchor root) we already + # have. rc_provs_with_inv = _anchors_for_sharing_providers( ctx, sharing_providers, get_id=True) rc_provs_with_inv = set(