← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1154387] Re: Listing images with v2 API and is_public filter always acts as tho is_public is set to false

 

Hi John,

In Glance's v2 api, the "is_public" filter has been replaced with a
"visibility" filter. Valid values for the filter include "public",
"private", and "shared".

** Changed in: glance
       Status: Triaged => Invalid

** Changed in: glance
   Importance: Critical => Wishlist

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

** Changed in: glance
    Milestone: grizzly-rc1 => None

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1154387

Title:
  Listing images with v2 API and is_public filter always acts as tho
  is_public is set to false

Status in OpenStack Image Registry and Delivery Service (Glance):
  Invalid

Bug description:
  When attempting to list images with the glance v2 API and
  is_public=True the same results are returned as when is_public=False.

  Here is a sample session from a user with 3 public images and one non
  public image:

  curl -H "X-Auth-Token:$AUTH" http://localhost:9292/v2/images

  ... all four images listed

  $ curl -H "X-Auth-Token:$AUTH"
  http://localhost:9292/v2/images?is_public=false

  {"images": [{"status": "active", "name": "bin_bash", "tags": [],
  "container_format": "bare", "created_at": "2013-03-12T23:42:58Z",
  "disk_format": "qcow2", "updated_at": "2013-03-12T23:42:59Z",
  "visibility": "private", "self": "/v2/images/0faa8478-4a5c-48b6-afae-
  6411e84e0c8d", "protected": false, "id": "0faa8478-4a5c-48b6-afae-
  6411e84e0c8d", "file": "/v2/images/0faa8478-4a5c-48b6-afae-
  6411e84e0c8d/file", "checksum": "8fdef550c397d5e9ac63d5196430cc22",
  "min_disk": 0, "size": 974072, "min_ram": 0, "schema":
  "/v2/schemas/image"}], "schema": "/v2/schemas/images", "first":
  "/v2/images?is_public=false"}

  (one image)

  $ curl -H "X-Auth-Token:$AUTH"
  http://localhost:9292/v2/images?is_public=true

  {"images": [{"status": "active", "name": "bin_bash", "tags": [],
  "container_format": "bare", "created_at": "2013-03-12T23:42:58Z",
  "disk_format": "qcow2", "updated_at": "2013-03-12T23:42:59Z",
  "visibility": "private", "self": "/v2/images/0faa8478-4a5c-48b6-afae-
  6411e84e0c8d", "protected": false, "id": "0faa8478-4a5c-48b6-afae-
  6411e84e0c8d", "file": "/v2/images/0faa8478-4a5c-48b6-afae-
  6411e84e0c8d/file", "checksum": "8fdef550c397d5e9ac63d5196430cc22",
  "min_disk": 0, "size": 974072, "min_ram": 0, "schema":
  "/v2/schemas/image"}], "schema": "/v2/schemas/images", "first":
  "/v2/images?is_public=true"}

  (the same image)

  It seems that Glance is failing to convert the string into a boolean
  value.

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