Bug 974493 - The exit_code in REST API is null
Summary: The exit_code in REST API is null
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-14 09:35 UTC by Zhe Wang
Modified: 2015-05-15 00:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-24 14:55:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Zhe Wang 2013-06-14 09:35:39 UTC
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 https://ec2-204-236-240-35.compute-1.amazonaws.com/broker/rest/domains/dev3360tst  | python -m json.tool

curl -k --user zhewang+1: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 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 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 04:03:33 UTC
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.