diff --git a/nova/api/openstack/placement/objects/resource_provider.py b/nova/api/openstack/placement/objects/resource_provider.py index e0cdac560ecf..8766f8de9c4b 100644 --- a/nova/api/openstack/placement/objects/resource_provider.py +++ b/nova/api/openstack/placement/objects/resource_provider.py @@ -1781,7 +1781,7 @@ def _get_allocations_by_provider_id(ctx, rp_id): allocs = sa.alias(_ALLOC_TBL, name="a") consumers = sa.alias(_CONSUMER_TBL, name="c") projects = sa.alias(_PROJECT_TBL, name="p") - users = sa.alias(_PROJECT_TBL, name="u") + users = sa.alias(_USER_TBL, name="u") cols = [ allocs.c.id, allocs.c.resource_class_id, diff --git a/nova/tests/functional/api/openstack/placement/gabbits/with-allocations.yaml b/nova/tests/functional/api/openstack/placement/gabbits/with-allocations.yaml index fac6dd051073..83f68440bd79 100644 --- a/nova/tests/functional/api/openstack/placement/gabbits/with-allocations.yaml +++ b/nova/tests/functional/api/openstack/placement/gabbits/with-allocations.yaml @@ -30,17 +30,14 @@ tests: response_headers: content-type: /application/json/ response_json_paths: - # Bug#1785382: It doesn't show all the consumers - # on the resource provider - # $.allocations.`len`: 3 - $.allocations.`len`: 2 + $.allocations.`len`: 3 $.allocations["$ENVIRON['CONSUMER_0']"].resources: DISK_GB: 1000 $.allocations["$ENVIRON['CONSUMER_ID']"].resources: VCPU: 6 - # $.allocations["$ENVIRON['ALT_CONSUMER_ID']"].resources: - # VCPU: 1 - # DISK_GB: 20 + $.allocations["$ENVIRON['ALT_CONSUMER_ID']"].resources: + VCPU: 1 + DISK_GB: 20 $.resource_provider_generation: 5 - name: fail to delete resource provider