Bug 974493 - The exit_code in REST API is null
The exit_code in REST API is null
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Lili Nader
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-14 05:35 EDT by Zhe Wang
Modified: 2015-05-14 20:54 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-24 10:55:27 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 Zhe Wang 2013-06-14 05:35:39 EDT
Description of problem:
The "exit_code" field in message property is null, even if invoking a REST API successfully. Instead of nulls, the exit codes in REST API should be meaningful.

Version-Release number of selected component (if applicable):
devenv_3360
REST API 1.5

How reproducible:
always

Steps to Reproduce:
1. create a scaling python-3.3 application
rhc app create py33 python-3.3 -s

2. My test covers the following APIs, and all the exit_codes are null:

curl -k --user zhewang+1@redhat.com:redhat https://ec2-204-236-240-35.compute-1.amazonaws.com/broker/rest/domains/dev3360tst  | python -m json.tool

curl -k --user zhewang+1@redhat.com:redhat https://ec2-204-236-240-35.compute-1.amazonaws.com/broker/rest/domains/dev3360tst/applications/  | python -m json.tool

curl -k --user zhewang+1@redhat.com:redhat https://ec2-204-236-240-35.compute-1.amazonaws.com/broker/rest/domains/dev3360tst/applications/py33  | python -m json.tool

curl -k --user zhewang+1@redhat.com:redhat https://ec2-204-236-240-35.compute-1.amazonaws.com/broker/rest/domains/dev3360tst/applications/py33/events -d event=restart -XPOST | python -m json.tool

Actual results:
All the exit codes after successfully invoking the APIs in Step 2 are null. For instance,

    "messages": [
        {
            "exit_code": null, 
            "field": null, 
            "severity": "info", 
            "text": "Application 'py33' found"
        }
    ], 

Expected results:
The exit codes in REST API should be meaningful values.

Additional info:
Comment 3 Zhe Wang 2013-06-18 00:03:33 EDT
Verified in devenv_3373. For example, after invoking the domain API, the returned messages are:

    "messages": [
        {
            "exit_code": 0, 
            "field": null, 
            "severity": "info", 
            "text": "Found domain dev3373tst"
        }
    ],

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