← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1056935] Re: Folsom - Exception message for "Create Flavor" with invalid Flavor ID is not consistent and proper

 

** No longer affects: nova

-- 
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/1056935

Title:
  Folsom - Exception message for "Create Flavor" with invalid Flavor ID
  is not consistent and proper

Status in Python client library for Nova:
  Fix Released

Bug description:
  Description:
  --------------

  Exception message for "Create Flavor" with invalid Flavor ID is not
  Clear.

  Environment:
  --------------
  Folsom

  Actual Exception message:
  ------------------------------

  Message from API:  "message": "Malformed request body"
  Message from Python Client: ERROR: invalid literal for int() with base 10: '2gjhffg'

  
  Expected Exception Message:
  ----------------------------------

  Should be something like(When Flavor ID is X)

  "message": "Invalid input received: Flavor ID can only contain [0-9 ]"

  
  Python Nova client output:
  ------------------------------

  rajalakshmi_ganesan@ubuntu:~$ nova flavor-create ps_flavor2 2gjhffg 2 2 2
  ERROR: invalid literal for int() with base 10: '2gjhffg'

  CURL COMMAND OUTPUTS:
  --------------------------------


  rajalakshmi_ganesan@ubuntu:~$ curl -i http://15.184.64.226:8774/v2/25ecbf309f7748c6a173fabf2a673a65/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "X-Auth-Token: 0b78256729a848559f7a9a45e24ef554" -d '{"flavor": {"disk": 10, "vcpus": 2, "ram": 1024, "name": "PS_flavor_2", "id": 999a_invali.,, "swap": 22, "os-flavor-access:is_public": true, "rxtx_factor": 2, "OS-FLV-EXT-DATA:ephemeral": 2}}'
  HTTP/1.1 400 Bad Request
  Content-Length: 66
  Content-Type: application/json; charset=UTF-8
  X-Compute-Request-Id: req-56a498ec-619f-456b-98fe-48271e9a380d
  Date: Wed, 26 Sep 2012 15:09:33 GMT

  {"badRequest": {"message": "Malformed request body", "code":
  400}}rajalakshmi_ganesan@ubuntu:~$

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-novaclient/+bug/1056935/+subscriptions