Bug 1416936

Summary: oc process usage section in oc process -h is not updated with the changes in 3.5
Product: OpenShift Container Platform Reporter: Siva Reddy <schituku>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED CURRENTRELEASE QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: aos-bugs, jokerman, jvallejo, mmccomas, tdawson, xiaocwan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-02 22:23:22 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 Siva Reddy 2017-01-26 20:22:20 UTC
Description of problem:
    The help documentation for oc process is not updated with the changes to the -v param being deprecated and being replaced by -p option in the usage section. 

Version-Release number of selected component (if applicable):
openshift v3.5.0.9+e84be2b
kubernetes v1.5.2+43a9be4
etcd 3.1.0

How reproducible:

Steps to Reproduce:
1. say oc process -h 
2. Note the usage section to be as follows
  oc process (TEMPLATE | -f FILENAME) [-v=KEY=VALUE] [options]

3. use oc process according to above and say 
oc process -v ROLE=sender sometemplate.json
4. note the output to be
Flag --value has been deprecated, Use -p, --param instead.
error: template "uperf-scc.json" could not be found

Actual results:
    the command doesn't work as help documentation suggests as [-v=KEY=VALUE], --value KEY=VALUE is deprecated

Expected results:
   the usage section in "oc process -h" should read 
oc process (TEMPLATE | -f FILENAME) [-p=KEY=VALUE] [options] instead of 
oc process (TEMPLATE | -f FILENAME) [-v=KEY=VALUE] [options]

Additional info:

Comment 1 Juan Vallejo 2017-01-31 18:32:27 UTC
Related PR: https://github.com/openshift/origin/pull/12724

Comment 2 XiaochuanWang 2017-02-17 09:48:01 UTC
Verified on oc v3.5.0.30-1+35fa4bf
-v is dropped and is not in the help info, -p is clear with usage.

# oc process -h
  oc process (TEMPLATE | -f FILENAME) [-p=KEY=VALUE] [options]
  -p, --param=[]: Specify a key-value pair (eg. -p FOO=BAR) to set/override a parameter value in the template.

# oc process -p MYSQL_USER=myname -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json
Command output the processed json

# oc process -p MYSQL_USER=myname -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json |oc create -f -
secret "dbsecret" created
service "frontend" created
route "route-edge" created
imagestream "origin-ruby-sample" created
imagestream "ruby-22-centos7" created
buildconfig "ruby-sample-build" created
deploymentconfig "frontend" created
service "database" created
deploymentconfig "database" created

Comment 3 Troy Dawson 2017-03-02 22:23:22 UTC
Since this never reached customers, I am closing this bug.