| Summary: | oc get --raw outputs mess json and needs to append a break line | ||
|---|---|---|---|
| Product: | OKD | Reporter: | XiaochuanWang <xiaocwan> |
| Component: | Pod | Assignee: | Fabiano Franz <ffranz> |
| Status: | CLOSED NOTABUG | QA Contact: | DeShuai Ma <dma> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | aos-bugs, jvallejo, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-21 19:09:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
`--raw` is intended to give output exactly as it returns from the server. Think of it as a nice wrapper on curl to allow you to easily run requests against the API server that aren't covered by the normal flows. For example, `oc get --raw /metrics`. Any mutation of the output defeats the purpose of the command. @ffranz If you want to add newline on `stderr` I'm ok with that, but definitely not in `stdout`. |
Description of problem: `oc get --raw="/"` needs a break line in the end of output. Other request like `oc get --raw="/api/v1/"` will return a mess json Version-Release number of selected component (if applicable): oc/openshift v1.4.0-alpha.0+e76e0e8 How reproducible: Always Steps to Reproduce: 1. oc get --raw="/" 2. oc get --raw="/api/v1/" 3. Try other requests like `oc get --raw "/oapi/v1/users/~"` Actual results: 1. Need to append a break line after the end character "}" 2 & 3. Output a mess json as below: # oc get --raw "/oapi/v1/users/~" {"kind":"User","apiVersion":"v1","metadata":{"name":"xiaocwan","selfLink":"/oapi/v1/users/xiaocwan","uid":"6b35cf0f-8e8e-11e6-8533-0ee97497f27f","resourceVersion":"498","creationTimestamp":"2016-10-10T02:08:21Z"},"identities":["anypassword:xiaocwan"],"groups":null} Expected results: Output should be prettier. Additional info: