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
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
: Triaged
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2012-06-08 13:59:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 127.0.0.1 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
http://json.org/
Comment 2 Abhishek Gupta 2012-05-30 17:02:37 EDT
https://github.com/openshift/crankcase/pull/89
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 203.114.244.88 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.