Bug 805963

Summary: [REST API] Invalid 'optional-value' element data
Product: OKD Reporter: Xavier Coulon <xcoulon>
Component: PodAssignee: Lili Nader <lnader>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: adietish, jialiu, mfisher, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-13 18:30:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Xavier Coulon 2012-03-22 14:52:48 UTC
The 'delete domain' operation has an optional value named 'force', but the 'valid values' is given as a single 'true or false' value instead of 2 values 'true' and 'false':

     <link>
        <rel>Delete domain</rel>
        <href>/domains/foobar</href>
        <optional-params>
          <optional-param>
            <default-value>false</default-value>
            <name>force</name>
            <description>Force delete domain.  i.e. delete any applications under this domain</description>
            <valid-options>true or false</valid-options>
            <type>boolean</type>
          </optional-param>
        </optional-params>
        <method>DELETE</method>
        <required-params/>
      </link>

Comment 1 Johnny Liu 2012-03-27 07:46:29 UTC
Verified this bug with devenv_1674, and PASS.
$ curl -k -X GET -H 'Accept: application/xml' --user jialiu:xx https://ec2-23-20-26-98.compute-1.amazonaws.com/broker/rest/domains
...
        <link>
          <rel>Delete domain</rel>
          <method>DELETE</method>
          <href>/domains/jialiu</href>
          <optional-params>
            <optional-param>
              <valid-options>
                <valid-option>true</valid-option>
                <valid-option>false</valid-option>
              </valid-options>
              <default-value>false</default-value>
              <name>force</name>
              <description>Force delete domain.  i.e. delete any applications under this domain</description>
              <type>boolean</type>
            </optional-param>
          </optional-params>
          <required-params/>
        </link>
...