Bug 1268954 - oc describe output to allow different formats
Summary: oc describe output to allow different formats
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-05 17:47 UTC by Peter Ruan
Modified: 2016-07-04 20:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-04 20:15:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Ruan 2015-10-05 17:47:33 UTC
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 20:15:57 UTC
`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.