Bug 1017027 - The returned links of "environment-variables/<env_name>" from RESTAPI are not accessible
The returned links of "environment-variables/<env_name>" from RESTAPI are no...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 03:37 EDT by Qiushui Zhang
Modified: 2015-05-14 20:55 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 09:34:22 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 Qiushui Zhang 2013-10-09 03:37:26 EDT
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.com: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.com: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 14:45:16 EDT
Was fixed upstream
Comment 2 Qiushui Zhang 2013-10-11 22:10:53 EDT
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.