Description of problem: Providing Version-Release number of selected component (if applicable): 4/20/2015 ISO How reproducible: always Steps to Reproduce: 1. Create a deployment 2. Send a PUT request to /fusor/api/v21/deployments/:id with a payload of {"name":5} 3. Observer returned results Actual results: { "displayMessage": "undefined method `strip' for 5:Fixnum", "errors": [ "undefined method `strip' for 5:Fixnum" ] } Expected results: A message should be returned that the name needs to be a valid string. Additional info: Any other passed non-string values return a generic error page ----- We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
I tested this and it seems to work fine (see request below). Rails/ActiveRecord will support and store ints as strings but I imagine we were calling strip somewhere perhaps on the name field. I checked the code for calls to strip but found only two that were inside the undercloud controller. PUT /fusor/api/v21/deployments/1 HTTP/1.1 Accept: application/json Accept-Encoding: gzip, deflate Authorization: Basic YWRtaW46Y2hhbmdlbWU= Connection: keep-alive Content-Length: 11 Content-Type: application/json Host: localhost User-Agent: HTTPie/0.9.2 { "name": 5 } HTTP/1.1 200 OK