Bug 808425 - [REST API] <valid-options> has inconsistent nesting levels
[REST API] <valid-options> has inconsistent nesting levels
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
1.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-30 07:10 EDT by Andre Dietisheim
Modified: 2012-07-13 19:43 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-13 19:43:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the result (9.97 KB, application/octet-stream)
2012-07-03 23:44 EDT, Wei Sun
no flags Details

  None (edit)
Description Andre Dietisheim 2012-03-30 07:10:08 EDT
<valid-options> are reported in a inconsistent way when looking at the element nesting:

If for instance you request:

curl -k -H "Accept: application/json" --user "adietish@redhat.com:PASSWORD" https://openshift.redhat.com/broker/rest/domains/1329997507457/applications/ -X GET

you'll see a single string value in a <valid-options> tag:

<valid-options>stop</valid-options>

but also several nested <valid-option> elements nested into a <valid-options> tag:

<valid-options>
   <valid-option>mongodb-2.0</valid-option>
   <valid-option>cron-1.4</valid-option>
   <valid-option>mysql-5.1</valid-option>
   <valid-option>postgresql-8.4</valid-option>
   <valid-option>10gen-mms-agent-0.1</valid-option>
   <valid-option>phpmyadmin-3.4</valid-option>
   <valid-option>metrics-0.1</valid-option>
   <valid-option>rockmongo-1.1</valid-option>
   <valid-option>jenkins-client-1.4</valid-option>
</valid-options>
Comment 1 Ravi Sankar 2012-07-03 13:27:21 EDT
Fixed in git rev c218b284c4c53
Comment 2 Wei Sun 2012-07-03 23:44:00 EDT
Created attachment 596135 [details]
the result

verified on devenv_1874
1.rhc-create-domain -n $namespace 
2.rhc-create-app 
3.curl -k -H "Accept: application/json" --user "wsun@redhat.com:PASSWORD" https://$dev/broker/rest/domains/$namespace/applications/ -X GET

"STOP": {
          "rel": "Stop application",
          "optional_params": [
            
          ],
          "method": "POST",
          "href": "https://ec2-107-21-180-244.compute-1.amazonaws.com/broker/rest/domains/wsun0dev/applications/phpdev/events",
          "required_params": [
            {
              "valid_options": [
                "stop"
              ],
              "description": "event",
              "name": "event",
              "type": "string"
            }
          ]
        }
      }

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