Bug 1017027 - The returned links of "environment-variables/<env_name>" from RESTAPI are not accessible
Summary: The returned links of "environment-variables/<env_name>" from RESTAPI are no...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 07:37 UTC by Qiushui Zhang
Modified: 2015-05-15 00:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:34:22 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Qiushui Zhang 2013-10-09 07:37:26 UTC
Description of problem:
Visit the "app/environment-variables", it returns something like "environment-variables/varname", which does not work.

Version-Release number of selected component (if applicable):
devenv_3874
REST API 1.6

How reproducible:
always

Steps to Reproduce:
1. Create an app.
rhc app create ews1 jbossews-1.0
2. Add and visit environment-variable
rhc env-add aa=bb -a ews1
curl -k -H "Accept: application/xml" --user qiuzhang:redhat https://ec2-184-72-179-42.compute-1.amazonaws.com/broker/rest/domain/qiuzhang/application/ews1/environment-variables
3. It shows links like "https://ec2-184-72-179-42.compute-1.amazonaws.com/broker/rest/applications/5254f37c542a5c0258000007/environment-variables/aa".
Use this link to visit the variable "aa"

Actual results:
The link is not valid. We can not visit variable "aa" via this link.

Expected results:
It should return valid link, like "https://ec2-184-72-179-42.compute-1.amazonaws.com/broker/rest/applications/5254f37c542a5c0258000007/environment-variable/aa"

Additional info:
The output of environment-variables:
[openshift@dhcp-10-143 tmp]$ curl -k -H "Accept: application/xml" --user qiuzhang:redhat https://ec2-184-72-179-42.compute-1.amazonaws.com/broker/rest/domain/qiuzhang/application/ews1/environment-variables
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <type>environment-variables</type>
  <data>
    <environment-variable>
      <name>aa</name>
      <value>bb</value>
      <links>
        <link>
          <rel>Get environment variable</rel>
          <method>GET</method>
          <href>https://ec2-184-72-179-42.compute-1.amazonaws.com/broker/rest/applications/5254f37c542a5c0258000007/environment-variables/aa</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Update environment variable</rel>
          <method>PUT</method>
          <href>https://ec2-184-72-179-42.compute-1.amazonaws.com/broker/rest/applications/5254f37c542a5c0258000007/environment-variables/aa</href>
          <required-params>
            <param>
              <name>value</name>
              <type>string</type>
              <description>Value of the environment variable</description>
              <valid-options/>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Delete environment variable</rel>
          <method>DELETE</method>
          <href>https://ec2-184-72-179-42.compute-1.amazonaws.com/broker/rest/applications/5254f37c542a5c0258000007/environment-variables/aa</href>
          <required-params/>
          <optional-params/>
        </link>
      </links>
    </environment-variable>
  </data>
  <messages>
    <message>
      <severity>info</severity>
      <text>Listing environment variables for application ews1</text>
      <exit-code>0</exit-code>
      <field nil="true"></field>
      <index nil="true"></index>
    </message>
  </messages>
  <version>1.6</version>
  <api-version>1.6</api-version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
    <supported-api-version>1.2</supported-api-version>
    <supported-api-version>1.3</supported-api-version>
    <supported-api-version>1.4</supported-api-version>
    <supported-api-version>1.5</supported-api-version>
    <supported-api-version>1.6</supported-api-version>
  </supported-api-versions>
</response>

Comment 1 Clayton Coleman 2013-10-11 18:45:16 UTC
Was fixed upstream

Comment 2 Qiushui Zhang 2013-10-12 02:10:53 UTC
Tested on devenv_3890.

The links are updated to valid ones.

Mark the bug as verified.


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