Bug 1298132 - oc get <resource> -L failed in listing labels seprately in columns for build,bc,dc,is
oc get <resource> -L failed in listing labels seprately in columns for build,...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Fabiano Franz
Xingxing Xia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-13 05:22 EST by Xia Zhao
Modified: 2016-09-19 09:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-19 09:52:37 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 Xia Zhao 2016-01-13 05:22:51 EST
Description of problem:
By specifying -L flag in oc get <resource> command, we expect the existing labels to be listed seprately in columns for this resource, but this currently only work for po,rc and svc, and print empty grids for build,bc,dc and is

origin/cli
M
M

Version-Release number of selected component (if applicable):
oc v1.1-428-ged29520
kubernetes v1.1.0-origin-1107-g4c8e6f4

Steps to Reproduce:
1. oc login openshift, create a new project
2. oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json, wait for build completes and app pods running
3. Validate if oc get <resource> -L <label1>,<label2>,... can list labels in specified columns successfully:

take buildconfig as example:
<resource>=bc:
$ oc describe bc ruby-sample-build | grep -i labels
Labels:                        name=ruby-sample-build,template=application-template-stibuild
$ oc get bc -L name,template
NAME                TYPE      FROM      LATEST    NAME      TEMPLATE
ruby-sample-build   Source    Git       1

Actual Result:
oc get <resource> -L not be able to list existing labels seprately in columns for build,bc,dc,is
oc get <resource> -L is only able to list existing labels seprately in columns for po,rc,svc (see more details in "additional info")

Expected Result:
oc get <resource> -L should be able to list existing labels seprately in columns for build,bc,dc,is successfully

Additional info:
The behavior of the passed scenarios:
when <resource>=po:
$ oc describe po frontend-1-x9n43 | grep -i labels
Labels:                                deployment=frontend-1,deploymentconfig=frontend,name=frontend
$ oc get po frontend-1-x9n43 -L deployment,deploymentconfig
NAME               READY     STATUS    RESTARTS   AGE       DEPLOYMENT   DEPLOYMENTCONFIG
frontend-1-x9n43   1/1       Running   0          57m       frontend-1   frontend
Comment 1 Fabiano Franz 2016-07-04 18:01:41 EDT
Fixed in master.
Comment 2 Xia Zhao 2016-07-05 04:14:58 EDT
Verified on origin env , issue fixed well, thanks!

oc v1.3.0-alpha.2-368-g6fe8452
kubernetes v1.3.0-alpha.3-599-g2746284

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