Bug 1268954 - oc describe output to allow different formats
oc describe output to allow different formats
Status: CLOSED WONTFIX
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Fabiano Franz
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-05 13:47 EDT by Peter Ruan
Modified: 2016-07-04 16:15 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-04 16:15:57 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 Peter Ruan 2015-10-05 13:47:33 EDT
Description of problem:
It would be useful to allow 'oc describe' to have output in different formats (JSON/YAML) to allow for better parsing using libraries.  This is not a bug, but rather a request for feature.

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 2 Fabiano Franz 2016-07-04 16:15:57 EDT
`oc describe` is meant to be screen-reading-friendly for end users, not supposed to be used for scripting or anything similar mostly because every describer likely is composed by several API calls to display its data, and displaying it in any format other than tabular data would introduce a new data model that doesn't map to actual API resources, and we don't want to do that.

`oc get` on the other hand provides options to output json|yaml because it maps directly to the format of resource the way they are stored behind the Rest API. You should be able to fetch every information displayed in describe by doing similar API calls describe does. --loglevel=10 in a describe call can help in discovering what API calls composes a given describer.

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