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
This commit is contained in:
parent
f9a419e40f
commit
cdfee395fa
@ -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
|
only provider with enough inventory of SRIOV_NET_VF but it does not have
|
||||||
the required HW_NIC_OFFLOAD_GENEVE trait).
|
the required HW_NIC_OFFLOAD_GENEVE trait).
|
||||||
|
|
||||||
:note: This function is used for scenarios that do NOT involve sharing
|
:note: This function is used for scenarios to get results for a
|
||||||
providers AND where there are nested providers present in the deployment.
|
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 ctx: Session context to use
|
||||||
:param resources: A dict, keyed by resource class ID, of the amount
|
: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:
|
if sharing_providers:
|
||||||
# There are sharing providers for this resource class, so we
|
# There are sharing providers for this resource class, so we
|
||||||
# should also get combinations of (sharing provider, anchor root)
|
# 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(
|
rc_provs_with_inv = _anchors_for_sharing_providers(
|
||||||
ctx, sharing_providers, get_id=True)
|
ctx, sharing_providers, get_id=True)
|
||||||
rc_provs_with_inv = set(
|
rc_provs_with_inv = set(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user