Folsom - Exception message for "Create Flavor" with invalid Flavor ID is not consistent and proper
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-novaclient |
Fix Released
|
Low
|
Sathish Nagappan |
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_
ERROR: invalid literal for int() with base 10: '2gjhffg'
CURL COMMAND OUTPUTS:
-------
rajalakshmi_
HTTP/1.1 400 Bad Request
Content-Length: 66
Content-Type: application/json; charset=UTF-8
X-Compute-
Date: Wed, 26 Sep 2012 15:09:33 GMT
{"badRequest": {"message": "Malformed request body", "code": 400}}rajalakshm
Changed in python-novaclient: | |
assignee: | nobody → Sathish Nagappan (sathish-nagappan) |
Changed in nova: | |
assignee: | nobody → Sathish Nagappan (sathish-nagappan) |
Changed in nova: | |
assignee: | Sathish Nagappan (sathish-nagappan) → nobody |
Changed in nova: | |
status: | New → Fix Committed |
status: | Fix Committed → Confirmed |
importance: | Undecided → Low |
Changed in python-novaclient: | |
importance: | Undecided → Low |
Changed in python-novaclient: | |
status: | Fix Committed → Fix Released |
no longer affects: | nova |
1. WITH "Flavor ID " INPUT AS "@#$%!^&*())_+:<>?"
rajalakshmi_ ganesan@ ubuntu: ~/source/ csbu-qa/ AutomatedTests/ python_ tests/hp_ regression/ nova/nova_ api_tests/ flavors$ curl -i http:// 15.184. 64.226: 8774/v2/ 30832a492d35489 18482624bd4bbc0 0f/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: c23bbd942cf041d 68aaa7537100602 e8" -d '{"flavor": {"vcpus": 4, "ram": 512, "name": "invalid_ id_flavor12715" , "os-flavor- access: is_public" : false, "rxtx_factor": 2, "OS-FLV- EXT-DATA: ephemeral" : 2, "disk": 2, "id": "@#$%!^ &*())_+ :<>?", "swap": 512}}' Request- Id: req-e74fb20f- dc72-4ba3- b930-20722041fa 0d
HTTP/1.1 409 Conflict
Content-Length: 104
Content-Type: application/json; charset=UTF-8
X-Compute-
Date: Fri, 28 Sep 2012 11:27:29 GMT
{"conflictingRe quest": {"message": "Instance Type invalid_ id_flavor12715 already exists.", "code": 409}}rajalakshm i_ganesan@ ubuntu: ~/source/ csbu-qa/ AutomatedTests/ python_ tests/h4bbc00f/ flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: c23bbd942cf041d 68aaa7537100602 e8" -d '{"flavor": {"vcpus": 4, "ram": 512, "id": "888888", "os-flavor- access: is_public" : false, "rxtx_factor": 2, "OS-FLV- EXT-DATA: ephemeral" : 2, "disk": 2, "name": "@#$%!^ &*())_+ :<>?", "swap": 512}}' Request- Id: req-554c943b- 0943-4f08- ba9d-120637bfdd 3f
HTTP/1.1 400
Content-Length: 106
Content-Type: application/json; charset=UTF-8
X-Compute-
Date: Fri, 28 Sep 2012 11:28:30 GMT
{"badRequest": {"message": "Invalid input received: names can only contain [a-zA-Z0-9_.- ]", "code": 400}}rajalakshm i_ganesan@ ubuntu: ~/source/ csbu-qa/ AutomatedTests/ python_ tests/hp_ regression/ nova/nova_ api_tests/ flavors$
2. WITH "Flavor ID " INPUT AS "alphabets"
rajalakshmi_ ganesan@ ubuntu: ~/source/ csbu-qa/ AutomatedTests/ python_ tests/hp_ regression/ nova/nova_ api_tests/ flavors$ curl -i http:// 15.184. 64.226: 8774/v2/ 30832a492d35489 18482624bd4bbc0 0f/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: c23bbd942cf041d 68aaa7537100602 e8" -d '{"flavor": {"vcpus": 4, "ram": 512, "name": "invalid_ id_flavor_ 999", "os-flavor- access: is_public" : false, "rxtx_factor": 2, "OS-FLV- EXT-DATA: ephemeral" : 2, "disk": 2, "id": "aplhabets", "swap": 512}}' Request- Id: req-27221bed- 92b0-4653- 96a2-740d97f2f5 4f
HTTP/1.1 200 OK
X-Compute-
Content-Type: application/json
Content-Length: 462
Date: Fri, 28 Sep 2012 11:39:33 GMT
{"flavor": {"name": "invalid_ id_flavor_ 999", "links": [{"href": "http:// 15.184. 64.226: 8774/v2/ 30832a492d35489 18482624bd4bbc0 0f/flavors/ aplhabets", "rel": "self"}, {"href": "http:// 15.184. 64.226: 8774/30832a492d 3548918482624bd 4bbc00f/ flavors/ aplhabets", "rel": "bookmark"}], "ram": 512, "OS-FLV- DISABLED: disabled" : false, "vcpus": 4, "swap": 512, "os-flavor- access: is_public" : false, "rxtx_factor": 2, "OS-FLV- EXT-DATA: ephemeral" : 2, "disk": 2, "id": "aplhabets" }}rajalakshmi_ ganesan@ ubuntu: ~/source/ csbu-qa/ AutomatedTests/ python_ tests/hp_ regression/ nova/nova_ api_tests/ flavo.. .