← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1481512] [NEW] v2 API responce doesn't follow documentation for not defined values

 

Public bug reported:

Calling image list functionality for v2 API the JSON null value is
returned for not defined fields in response, instead expecting  string
'None' according to documentation  http://developer.openstack.org/api-
ref-image-v2.html

"If this field has no value, its value is None. "

Glance code revision:
ubuntu@ubuntu:/opt/stack/glance$ git show
commit fbb5e1c440933860da10cd526daca3ad7b63782c
Merge: aeb3c6a 643ad31
Author: Jenkins <jenkins@xxxxxxxxxxxxxxxxxxxx>
Date:   Wed Jul 15 00:10:28 2015 +0000

    Merge "Purge dead file-backed scrubber queue code"

Request:
http://127.0.0.1:9292/v2/images?limit=100

Response:

{
    "images": [
        {
            "status": "queued",
            "name": "TestImage",
            "tags": [],
            "container_format": "ami",
            "created_at": "2015-08-01T17:29:52Z",
            "size": null,
            "disk_format": "ami",
            "updated_at": "2015-08-01T17:29:52Z",
            "visibility": "private",
            "self": "/v2/images/147824e3-0406-48d4-a064-58f9c5bd8534",
            "min_disk": 0,
            "protected": false,
            "id": "147824e3-0406-48d4-a064-58f9c5bd8534",
            "file": "/v2/images/147824e3-0406-48d4-a064-58f9c5bd8534/file",
            "checksum": null,
            "owner": "d8ec44f4c4bd4799af7b1c0c8158a8c8",
            "virtual_size": null,
            "min_ram": 0,
            "schema": "/v2/schemas/image"
        },
        {
            "status": "queued",
            "name": "TestImage",
            "tags": [],
            "container_format": "ami",
            "created_at": "2015-08-01T17:29:41Z",
            "size": null,
            "disk_format": "ami",
            "updated_at": "2015-08-01T17:29:41Z",
            "visibility": "private",
            "self": "/v2/images/bc952044-248f-4e4c-b720-2ef337642658",
            "min_disk": 0,
            "protected": false,
            "id": "bc952044-248f-4e4c-b720-2ef337642658",
            "file": "/v2/images/bc952044-248f-4e4c-b720-2ef337642658/file",
            "checksum": null,
            "owner": "d8ec44f4c4bd4799af7b1c0c8158a8c8",
            "virtual_size": null,
            "min_ram": 0,
            "schema": "/v2/schemas/image"
        },
        {
            "status": "queued",
            "name": "TestImage",
            "tags": [],
            "container_format": "ami",
            "created_at": "2015-08-01T17:29:32Z",
            "size": null,
            "disk_format": "ami",
            "updated_at": "2015-08-01T17:29:32Z",
            "visibility": "private",
            "self": "/v2/images/0307f138-a722-4561-aa69-c48ca481d371",
            "min_disk": 0,
            "protected": false,
            "id": "0307f138-a722-4561-aa69-c48ca481d371",
            "file": "/v2/images/0307f138-a722-4561-aa69-c48ca481d371/file",
            "checksum": null,
            "owner": "d8ec44f4c4bd4799af7b1c0c8158a8c8",
            "virtual_size": null,
            "min_ram": 0,
            "schema": "/v2/schemas/image"
        },
        {
            "container_format": "aki",
            "min_ram": 0,
            "ramdisk_id": "8c64f48a-45a3-4eaa-adff-a8106b6c005b",
            "updated_at": "2015-08-01T03:52:09Z",
            "file": "/v2/images/c77a2e19-b560-4eec-8986-fcd470b5ee0e/file",
            "owner": "d8ec44f4c4bd4799af7b1c0c8158a8c8",
            "id": "c77a2e19-b560-4eec-8986-fcd470b5ee0e",
            "size": 12501760,
            "self": "/v2/images/c77a2e19-b560-4eec-8986-fcd470b5ee0e",
            "disk_format": "aki",
            "schema": "/v2/schemas/image",
            "status": "active",
            "description": "Just a test image",
            "tags": [],
            "kernel_id": "e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4",
            "visibility": "private",
            "min_disk": 0,
            "virtual_size": null,
            "name": "test-image",
            "checksum": "0b9c6d663d8ba4f63733e53c2389c6ef",
            "created_at": "2015-08-01T03:52:05Z",
            "protected": false,
            "architecture": "32bit"
        },
        {
            "status": "active",
            "name": "cirros-0.3.4-x86_64-uec",
            "tags": [],
            "kernel_id": "e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4",
            "container_format": "ami",
            "created_at": "2015-07-15T11:43:35Z",
            "ramdisk_id": "8c64f48a-45a3-4eaa-adff-a8106b6c005b",
            "disk_format": "ami",
            "updated_at": "2015-07-15T11:43:35Z",
            "visibility": "public",
            "self": "/v2/images/07aa21a9-fa1a-430e-9a33-185be5982431",
            "min_disk": 0,
            "protected": false,
            "id": "07aa21a9-fa1a-430e-9a33-185be5982431",
            "size": 25165824,
            "file": "/v2/images/07aa21a9-fa1a-430e-9a33-185be5982431/file",
            "checksum": "eb9139e4942121f22bbc2afc0400b2a4",
            "owner": "cba624273b8344e59dd1fd18685183b0",
            "virtual_size": null,
            "min_ram": 0,
            "schema": "/v2/schemas/image"
        },
        {
            "status": "active",
            "name": "cirros-0.3.4-x86_64-uec-ramdisk",
            "tags": [],
            "container_format": "ari",
            "created_at": "2015-07-15T11:43:32Z",
            "size": 3740163,
            "disk_format": "ari",
            "updated_at": "2015-07-15T11:43:32Z",
            "visibility": "public",
            "self": "/v2/images/8c64f48a-45a3-4eaa-adff-a8106b6c005b",
            "min_disk": 0,
            "protected": false,
            "id": "8c64f48a-45a3-4eaa-adff-a8106b6c005b",
            "file": "/v2/images/8c64f48a-45a3-4eaa-adff-a8106b6c005b/file",
            "checksum": "be575a2b939972276ef675752936977f",
            "owner": "cba624273b8344e59dd1fd18685183b0",
            "virtual_size": null,
            "min_ram": 0,
            "schema": "/v2/schemas/image"
        },
        {
            "status": "active",
            "name": "cirros-0.3.4-x86_64-uec-kernel",
            "tags": [],
            "container_format": "aki",
            "created_at": "2015-07-15T11:43:29Z",
            "size": 4979632,
            "disk_format": "aki",
            "updated_at": "2015-07-15T11:43:30Z",
            "visibility": "public",
            "self": "/v2/images/e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4",
            "min_disk": 0,
            "protected": false,
            "id": "e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4",
            "file": "/v2/images/e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4/file",
            "checksum": "8a40c862b5735975d82605c1dd395796",
            "owner": "cba624273b8344e59dd1fd18685183b0",
            "virtual_size": null,
            "min_ram": 0,
            "schema": "/v2/schemas/image"
        }
    ],
    "schema": "/v2/schemas/images",
    "first": "/v2/images?limit=100"
}

** Affects: glance
     Importance: Undecided
         Status: New

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

Title:
  v2 API responce doesn't follow documentation for not defined values

Status in Glance:
  New

Bug description:
  Calling image list functionality for v2 API the JSON null value is
  returned for not defined fields in response, instead expecting  string
  'None' according to documentation  http://developer.openstack.org/api-
  ref-image-v2.html

  "If this field has no value, its value is None. "

  Glance code revision:
  ubuntu@ubuntu:/opt/stack/glance$ git show
  commit fbb5e1c440933860da10cd526daca3ad7b63782c
  Merge: aeb3c6a 643ad31
  Author: Jenkins <jenkins@xxxxxxxxxxxxxxxxxxxx>
  Date:   Wed Jul 15 00:10:28 2015 +0000

      Merge "Purge dead file-backed scrubber queue code"

  Request:
  http://127.0.0.1:9292/v2/images?limit=100

  Response:

  {
      "images": [
          {
              "status": "queued",
              "name": "TestImage",
              "tags": [],
              "container_format": "ami",
              "created_at": "2015-08-01T17:29:52Z",
              "size": null,
              "disk_format": "ami",
              "updated_at": "2015-08-01T17:29:52Z",
              "visibility": "private",
              "self": "/v2/images/147824e3-0406-48d4-a064-58f9c5bd8534",
              "min_disk": 0,
              "protected": false,
              "id": "147824e3-0406-48d4-a064-58f9c5bd8534",
              "file": "/v2/images/147824e3-0406-48d4-a064-58f9c5bd8534/file",
              "checksum": null,
              "owner": "d8ec44f4c4bd4799af7b1c0c8158a8c8",
              "virtual_size": null,
              "min_ram": 0,
              "schema": "/v2/schemas/image"
          },
          {
              "status": "queued",
              "name": "TestImage",
              "tags": [],
              "container_format": "ami",
              "created_at": "2015-08-01T17:29:41Z",
              "size": null,
              "disk_format": "ami",
              "updated_at": "2015-08-01T17:29:41Z",
              "visibility": "private",
              "self": "/v2/images/bc952044-248f-4e4c-b720-2ef337642658",
              "min_disk": 0,
              "protected": false,
              "id": "bc952044-248f-4e4c-b720-2ef337642658",
              "file": "/v2/images/bc952044-248f-4e4c-b720-2ef337642658/file",
              "checksum": null,
              "owner": "d8ec44f4c4bd4799af7b1c0c8158a8c8",
              "virtual_size": null,
              "min_ram": 0,
              "schema": "/v2/schemas/image"
          },
          {
              "status": "queued",
              "name": "TestImage",
              "tags": [],
              "container_format": "ami",
              "created_at": "2015-08-01T17:29:32Z",
              "size": null,
              "disk_format": "ami",
              "updated_at": "2015-08-01T17:29:32Z",
              "visibility": "private",
              "self": "/v2/images/0307f138-a722-4561-aa69-c48ca481d371",
              "min_disk": 0,
              "protected": false,
              "id": "0307f138-a722-4561-aa69-c48ca481d371",
              "file": "/v2/images/0307f138-a722-4561-aa69-c48ca481d371/file",
              "checksum": null,
              "owner": "d8ec44f4c4bd4799af7b1c0c8158a8c8",
              "virtual_size": null,
              "min_ram": 0,
              "schema": "/v2/schemas/image"
          },
          {
              "container_format": "aki",
              "min_ram": 0,
              "ramdisk_id": "8c64f48a-45a3-4eaa-adff-a8106b6c005b",
              "updated_at": "2015-08-01T03:52:09Z",
              "file": "/v2/images/c77a2e19-b560-4eec-8986-fcd470b5ee0e/file",
              "owner": "d8ec44f4c4bd4799af7b1c0c8158a8c8",
              "id": "c77a2e19-b560-4eec-8986-fcd470b5ee0e",
              "size": 12501760,
              "self": "/v2/images/c77a2e19-b560-4eec-8986-fcd470b5ee0e",
              "disk_format": "aki",
              "schema": "/v2/schemas/image",
              "status": "active",
              "description": "Just a test image",
              "tags": [],
              "kernel_id": "e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4",
              "visibility": "private",
              "min_disk": 0,
              "virtual_size": null,
              "name": "test-image",
              "checksum": "0b9c6d663d8ba4f63733e53c2389c6ef",
              "created_at": "2015-08-01T03:52:05Z",
              "protected": false,
              "architecture": "32bit"
          },
          {
              "status": "active",
              "name": "cirros-0.3.4-x86_64-uec",
              "tags": [],
              "kernel_id": "e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4",
              "container_format": "ami",
              "created_at": "2015-07-15T11:43:35Z",
              "ramdisk_id": "8c64f48a-45a3-4eaa-adff-a8106b6c005b",
              "disk_format": "ami",
              "updated_at": "2015-07-15T11:43:35Z",
              "visibility": "public",
              "self": "/v2/images/07aa21a9-fa1a-430e-9a33-185be5982431",
              "min_disk": 0,
              "protected": false,
              "id": "07aa21a9-fa1a-430e-9a33-185be5982431",
              "size": 25165824,
              "file": "/v2/images/07aa21a9-fa1a-430e-9a33-185be5982431/file",
              "checksum": "eb9139e4942121f22bbc2afc0400b2a4",
              "owner": "cba624273b8344e59dd1fd18685183b0",
              "virtual_size": null,
              "min_ram": 0,
              "schema": "/v2/schemas/image"
          },
          {
              "status": "active",
              "name": "cirros-0.3.4-x86_64-uec-ramdisk",
              "tags": [],
              "container_format": "ari",
              "created_at": "2015-07-15T11:43:32Z",
              "size": 3740163,
              "disk_format": "ari",
              "updated_at": "2015-07-15T11:43:32Z",
              "visibility": "public",
              "self": "/v2/images/8c64f48a-45a3-4eaa-adff-a8106b6c005b",
              "min_disk": 0,
              "protected": false,
              "id": "8c64f48a-45a3-4eaa-adff-a8106b6c005b",
              "file": "/v2/images/8c64f48a-45a3-4eaa-adff-a8106b6c005b/file",
              "checksum": "be575a2b939972276ef675752936977f",
              "owner": "cba624273b8344e59dd1fd18685183b0",
              "virtual_size": null,
              "min_ram": 0,
              "schema": "/v2/schemas/image"
          },
          {
              "status": "active",
              "name": "cirros-0.3.4-x86_64-uec-kernel",
              "tags": [],
              "container_format": "aki",
              "created_at": "2015-07-15T11:43:29Z",
              "size": 4979632,
              "disk_format": "aki",
              "updated_at": "2015-07-15T11:43:30Z",
              "visibility": "public",
              "self": "/v2/images/e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4",
              "min_disk": 0,
              "protected": false,
              "id": "e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4",
              "file": "/v2/images/e1b6edd4-bd9b-40ac-b010-8a6c16de4ba4/file",
              "checksum": "8a40c862b5735975d82605c1dd395796",
              "owner": "cba624273b8344e59dd1fd18685183b0",
              "virtual_size": null,
              "min_ram": 0,
              "schema": "/v2/schemas/image"
          }
      ],
      "schema": "/v2/schemas/images",
      "first": "/v2/images?limit=100"
  }

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


Follow ups