API: flavors - Cannot list all public and private flavors by default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Undecided
|
Matt Riedemann |
Bug Description
The API doesn't return all public and private flavors by default.
Effectively only public flavors are listed even though the default policy rule authorize it.
Here I'm using 'admin' user/project along with no explicit policy therefore relying on the default 'built-in' policy which I believe translate to "compute_
$ openstack flavor list --all
+------
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+------
| 1 | flavor-tiny | 64 | 0 | 0 | 1 | True |
| a1fec2c4-
+------
# The default flavors list returns only the public ones:
$ curl -s -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json" http://
{
"flavors": [
{
"id": "1",
{
},
{
}
],
"name": "flavor-tiny"
}
]
}
$ curl -s -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json" http://
{
"flavors": [
{
"id": "a1fec2c4-
{
},
{
}
],
"name": "test1"
}
]
}
Changed in nova: | |
status: | Incomplete → In Progress |
Hi, I can get the flavor list with --all
openstack flavor list --all ------- ------- ------- --+---- ---+--- ---+--- ------- -+----- --+---- ------- + ------- ------- ------- --+---- ---+--- ---+--- ------- -+----- --+---- ------- + service- flavor | 192 | 0 | 0 | 1 | True |
+-----+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+-----+
| 1 | m1.tiny | 512 | 1 | 0 | 1 | True |
| 100 | manila-
| 2 | m1.small | 2048 | 20 | 0 | 1 | True |
| 3 | m1.medium | 4096 | 40 | 0 | 2 | True |
| 4 | m1.large | 8192 | 80 | 0 | 4 | True |
| 42 | m1.nano | 64 | 0 | 0 | 1 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True |
| 84 | m1.micro | 128 | 0 | 0 | 1 | True |
| c1 | cirros256 | 256 | 0 | 0 | 1 | True |
| d1 | ds512M | 512 | 5 | 0 | 1 | True |
| d2 | ds1G | 1024 | 10 | 0 | 1 | True |
| d3 | ds2G | 2048 | 10 | 0 | 2 | True |
| d4 | ds4G | 4096 | 20 | 0 | 4 | True |