← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1784782] Re: API: flavors - Cannot list all public and private flavors by default

 

Marked as incomplete since I'm not sure what you're saying is the bug.
Please clarify. I'll fix the API reference docs in the meantime.

** Changed in: nova
       Status: Opinion => Incomplete

** Changed in: nova
   Importance: Wishlist => Undecided

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

Title:
  API: flavors - Cannot list all public and private flavors by default

Status in OpenStack Compute (nova):
  In Progress

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_extension:flavor_access:addTenantAccess":
  "rule:admin_api".

  $ openstack flavor list --all
  +--------------------------------------+-------------+-----+------+-----------+-------+-----------+
  | ID                                   | Name        | RAM | Disk | Ephemeral | VCPUs | Is Public |
  +--------------------------------------+-------------+-----+------+-----------+-------+-----------+
  | 1                                    | flavor-tiny |  64 |    0 |         0 |     1 | True      |
  | a1fec2c4-2f18-422b-977d-c7e2046cfaec | test1       |   1 |    1 |         0 |     1 | False     |
  +--------------------------------------+-------------+-----+------+-----------+-------+-----------+

  
  # The default flavors list returns only the public ones:
  $ curl -s -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json" http://${OS_HOST}:8774/v2/flavors| python -mjson.tool
  {
      "flavors": [
          {
              "id": "1",
              "links": [
                  {
                      "href": "http://192.0.2.6:8774/v2/flavors/1";,
                      "rel": "self"
                  },
                  {
                      "href": "http://192.0.2.6:8774/flavors/1";,
                      "rel": "bookmark"
                  }
              ],
              "name": "flavor-tiny"
          }
      ]
  }

  $ curl -s -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json" http://${OS_HOST}:8774/v2/flavors?is_public=false | python -mjson.tool                                                                                                
  {
      "flavors": [
          {
              "id": "a1fec2c4-2f18-422b-977d-c7e2046cfaec",
              "links": [
                  {
                      "href": "http://192.0.2.6:8774/v2/flavors/a1fec2c4-2f18-422b-977d-c7e2046cfaec";,
                      "rel": "self"
                  },
                  {
                      "href": "http://192.0.2.6:8774/flavors/a1fec2c4-2f18-422b-977d-c7e2046cfaec";,
                      "rel": "bookmark"
                  }
              ],
              "name": "test1"
          }
      ]
  }

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


References