Project query parameters parents_as_list and subtree_as_list do not work

Bug #1863393 reported by Colleen Murphy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Triaged
Medium
Unassigned

Bug Description

The api-ref documents the parents_as_list and subtree_as_list parameters to the GET /v3/projects/{project_id} endpoint to show either a project's heritage or a project's descendants as a full list of project objects, as opposed to a plain list of IDs which can be requested with the parents_as_ids and subtree_as_ids parameters:

https://docs.openstack.org/api-ref/identity/v3/?expanded=show-project-details-detail#show-project-details

When using these options, the returned result is empty:

$ curl -s -H "x-auth-token: $token" "http://localhost/identity/v3/projects/e905aaf2bc7249e2916f3789f255ef8a?parents_as_list" | jq .
{
  "project": {
    "id": "e905aaf2bc7249e2916f3789f255ef8a",
    "name": "foo",
    "domain_id": "511b180417954e29bb03212a177f58bd",
    "description": "",
    "enabled": true,
    "parent_id": "c8364aeb843c485cab13a3ff77e3f4e5",
    "is_domain": false,
    "tags": [],
    "options": {},
    "parents": [],
    "links": {
      "self": "http://192.168.122.96/identity/v3/projects/e905aaf2bc7249e2916f3789f255ef8a"
    }
  }
}

while using *_as_ids correctly returns project IDs:

$ curl -s -H "x-auth-token: $token" "http://localhost/identity/v3/projects/e905aaf2bc7249e2916f3789f255ef8a?parents_as_ids" | jq .
{
  "project": {
    "id": "e905aaf2bc7249e2916f3789f255ef8a",
    "name": "foo",
    "domain_id": "511b180417954e29bb03212a177f58bd",
    "description": "",
    "enabled": true,
    "parent_id": "c8364aeb843c485cab13a3ff77e3f4e5",
    "is_domain": false,
    "tags": [],
    "options": {},
    "parents": {
      "c8364aeb843c485cab13a3ff77e3f4e5": {
        "511b180417954e29bb03212a177f58bd": null
      }
    },
    "links": {
      "self": "http://192.168.122.96/identity/v3/projects/e905aaf2bc7249e2916f3789f255ef8a"
    }
  }
}

The impact of this is that include_limits also does not work, and so two-level limit hierarchies are broken.

Tags: limits
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.