← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1265711] Re: image is creating with option min_disk and min_ram as negative number

 

** Changed in: glance
       Status: Fix Committed => Fix Released

** Changed in: glance
    Milestone: None => icehouse-2

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

Title:
  image is creating with option min_disk and min_ram as negative number

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

Bug description:
  I try to create a image with the min_ram and min_disk as negative number, and create image operation is successful.
  I use the glance api V2 to create  image.

  
  curl -i -X POST  -H "X-Auth-Token: $token" -H "content-type: application/json" -d '{"name": "image-7", "type": "kernel", "foo": "bar", "disk_format": "aki", "container_format": "aki", "protected": false, "tags": ["test","image"], "visibility": "public", "min_ram":-1, "min_disk":-1' \
  http://192.168.0.100:9292/v2/images

  glance image-show image-7

  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | Property 'foo'   | bar                                  |
  | Property 'type'  | kernel                               |
  | container_format | aki                                  |
  | created_at       | 2014-01-03T06:01:14                  |
  | deleted          | False                                |
  | disk_format      | aki                                  |
  | id               | aaa8e463-10aa-4518-a590-52feebaabcb5 |
  | is_public        | True                                 |
  | min_disk         | -1                                   |
  | min_ram          | -1                                   |
  | name             | image-7                              |
  | owner            | 25adaa8f93ee4199b6a362c45745231d     |
  | protected        | False                                |
  | status           | queued                               |
  | updated_at       | 2014-01-03T06:01:14                  |
  +------------------+--------------------------------------+

  I think glance need to check the value of min_ram and  min_disk. They
  need to be greater than or equal 0.

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


References