Bug 1418021

Summary: oc create route dry-run -o yaml does not output a route object
Product: OpenShift Container Platform Reporter: Jacob Tanenbaum <jtanenba>
Component: RoutingAssignee: Jacob Tanenbaum <jtanenba>
Status: CLOSED ERRATA QA Contact: zhaozhanqi <zzhao>
Severity: low Docs Contact:
Priority: low    
Version: 3.5.0CC: aos-bugs, atragler, lxia, mleitner, rkhan, sukulkar, weliang
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Outputing the route object was not implemented for for "oc create route dry-run -o yaml" Consequence: the above command worked differently then similar commands for other openshift objects Fix: Implement the printing of the route object similar to other openshift objects Result: the route object is printed to the command line when the command is issued
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-26 09:07:51 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:

Description Jacob Tanenbaum 2017-01-31 15:54:02 UTC
Description of problem:
The help text for oc create route ( edge | passthrough | reedirect) includes this entry 

`--dry-run=false: If true, only print the object that would be sent,
without sending it` 

this does not happen. 

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

How reproducible:

Steps to Reproduce:
1. oc create route edge --service=(valid service) --dry-run -o yaml

Actual results:

route "hello-openshift" created (dry run)
printed to stdout

Expected results:
the yaml file representing the route printed to stdout

Additional info:

Comment 1 openshift-github-bot 2018-06-07 00:39:03 UTC
Commit pushed to master at https://github.com/openshift/origin

support the --output flag in 'oc create route'

currently using the --output flag with 'oc create route does not show the resulting object. I changed
that so the the file is printed reflecting the information provided in the help text

bug 1418021

Comment 2 Weibin Liang 2018-12-06 21:37:10 UTC
Tested and passed in v3.11.51

[root@qe-weliang-311-2-master-etcd-nfs-1 tmp]# oc create route edge --service=blue-service --dry-run -o yaml
apiVersion: route.openshift.io/v1
kind: Route
  creationTimestamp: null
  name: blue-service
  host: ""
    termination: edge
    kind: ""
    name: blue-service
    weight: null
  ingress: null
[root@qe-weliang-311-2-master-etcd-nfs-1 tmp]# oc version
oc v3.11.51
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://qe-weliang-311-2-master-etcd-nfs-1.int.1207-zea.qe.rhcloud.com:8443
openshift v3.11.51
kubernetes v1.11.0+d4cacc0
[root@qe-weliang-311-2-master-etcd-nfs-1 tmp]#

Comment 4 errata-xmlrpc 2019-06-26 09:07:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.