Retrieving either a project's parents or subtree as_list does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Medium
|
Lance Bragstad |
Bug Description
To reproduce this I created five projects ("1", "2", "3", "4", "5") - with "1" as the top level project, and each subsequent project as a child of the previous. All four of the following calls were performed against project "3".
parents_as_list (NON-working) :
$ curl -i -H"X-Auth-
{
"project": {
"name": "3",
"is_domain": false,
"description": "",
"links": {
"self": "http://
},
"enabled": true,
"id": "b4a6fb7dcc5043
"parent_id": "0b09fce9246f42
"parents": [],
"domain_id": "default"
}
}
parents_as_ids (working) :
$ curl -i -H"X-Auth-
{
"project": {
"name": "3",
"is_domain": false,
"description": "",
"links": {
"self": "http://
},
"enabled": true,
"id": "b4a6fb7dcc5043
"parent_id": "0b09fce9246f42
"parents": {
"
}
},
"domain_id": "default"
}
}
subtree_as_list (NON-working) :
$ curl -i -H"X-Auth-
{
"project": {
"name": "3",
"is_domain": false,
"description": "",
"links": {
"self": "http://
},
"enabled": true,
"subtree": [],
"id": "b4a6fb7dcc5043
"parent_id": "0b09fce9246f42
"domain_id": "default"
}
}
subtree_as_ids (working) :
$ curl -i -H"X-Auth-
{
"project": {
"name": "3",
"is_domain": false,
"description": "",
"links": {
"self": "http://
},
"enabled": true,
"subtree": {
"
}
},
"id": "b4a6fb7dcc5043
"parent_id": "0b09fce9246f42
"domain_id": "default"
}
}
Changed in keystone: | |
importance: | High → Medium |
I seem to be able to recreate. I used the following:
I created the following projects:
22ca44c4f9174cf 68b221b260c446a 8d great-great- grandparent 68ad32adcd7162c ea great-grandparent 29ea24feedc5916 b2 grandparent 188017ddc845fe2 e5 parent 0a105da1b39284d 10 child
21265233cbbd4fe
33123935a6e3430
34590cda7de2440
89254075048c430
Where each project is the child of the project listed above. In this case, great-great- grandparent is the top level project. So following Tim's case, I did all my calls against the grandparent project.
parents_as_list: http:// cdn.pasteraw. com/ajjc1owd5ef cr6xwtsdbj7nqcq 6cw6e cdn.pasteraw. com/abdd3la2924 agvsl1ihbqmn6yx hhw6v grandparent - success cdn.pasteraw. com/egb84jk3yky 1s3f2rsoh7p9ofv jq2kq cdn.pasteraw. com/828b49094kl dix1cldefywemua p4kf2
returns no parents - fail
parents_as_ids: http://
returns the ids of great-grandparent and great-great-
subtree_as_list: http://
returns no subtree - fail
subtree_as_ids: http://
returns the ids of parent and child - success
I did the same calls with parent as the project and the following was returned: cdn.pasteraw. com/epzss1vm0x2 gz5bna4f8aehtt4 mhk9y cdn.pasteraw. com/sh2z02t9roq 9cis6zqfs9eenrt z0n2u grandparent - success cdn.pasteraw. com/1ssjr51weuj 4zii2k689nf9kc3 cnhrw cdn.pasteraw. com/aq0vjpkk9ja z26rzplptqxcse4 nv3ni
parents_as_list: http://
returns no parents - fail
parents_as_ids: http://
returns grandparent, great-grandparent, and great-great-
subtree_as_list: http://
returns no subtree - fail
subtree_as_ids: http://
returns the child id in subtree - success
It appears the behavior is consistent regardless of the depth of the project.