Bug 811139 - [REST API] namespace parameter should be replaced by id in the rest api doc
Summary: [REST API] namespace parameter should be replaced by id in the rest api doc
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 1.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-10 09:01 UTC by Johnny Liu
Modified: 2012-04-13 18:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-13 18:32:43 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Johnny Liu 2012-04-10 09:01:30 UTC
Description of problem:
$ curl -k -X GET -H 'Accept: application/xml' --user jialiu:214214 https://ec2-107-21-165-94.compute-1.amazonaws.com/broker/rest/api
...
    <link>
      <optional-params/>
      <required-params>
        <param>
          <valid-options/>
          <name>namespace</name>
          <description>Name of the domain</description>
          <type>string</type>
        </param>
      </required-params>
      <method>POST</method>
      <href>https://ec2-107-21-165-94.compute-1.amazonaws.com/broker/rest/domains</href>
      <rel>Create new domain</rel>
    </link>
...


The above instruction is not correct, parameter should be "id", not "namespace".
$ curl -k -X POST -H 'Accept: application/xml' -d namespace=jialiu --user jialiu:214214 https://ec2-107-21-165-94.compute-1.amazonaws.com/broker/rest/domains
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <data>
    <datum nil="true"></datum>
  </data>
  <type nil="true"></type>
  <version>1.0</version>
  <messages>
    <message>
      <exit-code>106</exit-code>
      <field>namespace</field>
      <text>Namespace is required and cannot be blank.</text>
      <severity>error</severity>
    </message>
  </messages>
  <status>unprocessable_entity</status>
</response>


BTW, alter domain parameter should be also be updated.
$ curl -k -X GET -H 'Accept: application/xml' --user jialiu:214214 https://ec2-107-21-165-94.compute-1.amazonaws.com/broker/rest/domains
...
        <link>
          <optional-params/>
          <required-params>
            <param>
              <valid-options/>
              <name>namespace</name>
              <description>Name of the domain</description>
              <type>string</type>
            </param>
          </required-params>
          <method>PUT</method>
          <href>https://ec2-107-21-165-94.compute-1.amazonaws.com/broker/rest/domains/newjialiu</href>
          <rel>Update domain</rel>
        </link>
...



Version-Release number of selected component (if applicable):
devenv_1705

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Ravi Sankar 2012-04-11 01:15:48 UTC
Fixed in git rev 45fa437d090021343

Comment 2 Johnny Liu 2012-04-11 04:09:13 UTC
Verify this bug with devenv_1715, and PASS.


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