Bug 822722 - Broker doesn't allow valid JSON value of true to be passed
Broker doesn't allow valid JSON value of true to be passed
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-05-17 18:36 EDT by Clayton Coleman
Modified: 2015-05-14 20:51 EDT (History)
3 users (show)

See Also:
Fixed In Version: devenv_1809
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-08 13:59:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Clayton Coleman 2012-05-17 18:36:55 EDT
Started POST "/broker/rest/domains/1337293882aab02d/applications.json" for at Thu May 17 18:31:27 -0400 2012
  Processing by ApplicationsController#create as JSON
  Parameters: {"domain_id"=>"1337293882aab02d", "cartridge"=>"ruby-1.8", "name"=>"cart1337293882aab02d_s", "scale"=>true}
Adding user app_test11337293882aab02d@test1.com...inside base_controller
MongoDataStore.find(CloudUser, app_test11337293882aab02d@test1.com, app_test11337293882aab02d@test1.com)

Completed 500 Internal Server Error in 56ms

NoMethodError (undefined method `upcase' for true:TrueClass):

true is a legal literal in JSON.  Affecting our ability to post from a Rails model, needs to be fixed this sprint.
Comment 1 Clayton Coleman 2012-05-17 18:38:29 EDT
Comment 2 Abhishek Gupta 2012-05-30 17:02:37 EDT
Comment 3 Xiaoli Tian 2012-06-01 03:56:21 EDT
Verified it on devenv-stage_198 with -d scale=TRUE, -d scale="true" and -d scale=true

1. curl -k -H "Accept: application/json" --user "xtian+t105@redhat.com:1"  https://ec2-107-22-64-249.compute-1.amazonaws.com/broker/rest/domains/domaindev03/applications -d name=scaleperl2  -d cartridge=perl-5.10 -d scale=TRUE -X POST

2. curl -k -H "Accept: application/json" --user "xtian+t105@redhat.com:1"  https://ec2-107-22-64-249.compute-1.amazonaws.com/broker/rest/domains/domaindev03/applications -d name=scaleruby2  -d cartridge=ruby-1.8 -d scale="true" -X POST

All work.

Started POST "/broker/rest/domains/domaindev03/applications" for at Fri Jun 01 03:33:11 -0400 2012
  Processing by ApplicationsController#create as JSON
  Parameters: {"scale"=>"TRUE", "cartridge"=>"perl-5.10", "name"=>"scaleperl2", "domain_id"=>"domaindev03"}
MongoDataStore.find(CloudUser, xtian+t105@redhat.com, xtian+t105@redhat.com)

Note You need to log in before you can comment on or make changes to this bug.