Red Hat Bugzilla – Bug 1268954
oc describe output to allow different formats
Last modified: 2016-07-04 16:15:57 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):
Steps to Reproduce:
`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.