← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1863393] [NEW] Project query parameters parents_as_list and subtree_as_list do not work

 

Public bug reported:

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.

** Affects: keystone
     Importance: Medium
         Status: Triaged


** Tags: limits

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1863393

Title:
  Project query parameters parents_as_list and subtree_as_list do not
  work

Status in OpenStack Identity (keystone):
  Triaged

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1863393/+subscriptions