Browse code

updated template use

Steve Kuznetsov authored on 2015/09/29 23:00:53
Showing 14 changed files
... ...
@@ -382,7 +382,7 @@ Available formats include:
382 382
 An example of using `-o template` to retrieve the *name* of the first build:
383 383
 
384 384
 ```bash
385
-$ oc get builds -o template -t "{{with index .items 0}}{{.metadata.name}}{{end}}"
385
+$ oc get builds -o template --template="{{with index .items 0}}{{.metadata.name}}{{end}}"
386 386
 ```
387 387
 
388 388
 #### Selectors
... ...
@@ -32,7 +32,7 @@ To create this service account:
32 32
 
33 33
     # You may either create a new SCC or use an existing SCC.  The following command will
34 34
     # display existing SCCs and if they support host network and host ports.
35
-    $ oc get scc -t "{{range .items}}{{.metadata.name}}: n={{.allowHostNetwork}},p={{.allowHostPorts}}; {{end}}"
35
+    $ oc get scc --template="{{range .items}}{{.metadata.name}}: n={{.allowHostNetwork}},p={{.allowHostPorts}}; {{end}}"
36 36
     privileged: n=true,p=true; restricted: n=false,p=false;
37 37
 
38 38
     $ oc edit scc <name>
... ...
@@ -357,7 +357,7 @@ the ip address shown below with the correct one for your environment.
357 357
 
358 358
             # You may either create a new SCC or use an existing SCC.  The following command will
359 359
             # display existing SCCs and if they support host network and host ports.
360
-            $ oc get scc -t "{{range .items}}{{.metadata.name}}: n={{.allowHostNetwork}},p={{.allowHostPorts}}; {{end}}"
360
+            $ oc get scc --template="{{range .items}}{{.metadata.name}}: n={{.allowHostNetwork}},p={{.allowHostPorts}}; {{end}}"
361 361
             privileged: n=true,p=true; restricted: n=false,p=false;
362 362
 
363 363
             # Edit your security context constraint to add the new service account in the users section
... ...
@@ -255,7 +255,7 @@ echo "config files: ok"
255 255
 
256 256
 # from this point every command will use config from the KUBECONFIG env var
257 257
 export KUBECONFIG="${HOME}/.kube/non-default-config"
258
-export CLUSTER_ADMIN_CONTEXT=$(oc config view --flatten -o template -t '{{index . "current-context"}}')
258
+export CLUSTER_ADMIN_CONTEXT=$(oc config view --flatten -o template --template='{{index . "current-context"}}')
259 259
 
260 260
 
261 261
 # NOTE: Do not add tests here, add them to test/cmd/*.
... ...
@@ -102,7 +102,7 @@ IMAGE_WORKING_DIR=/var/lib/openshift
102 102
 docker cp origin:${IMAGE_WORKING_DIR}/openshift.local.config ${BASETMPDIR}
103 103
 
104 104
 export ADMIN_KUBECONFIG="${MASTER_CONFIG_DIR}/admin.kubeconfig"
105
-export CLUSTER_ADMIN_CONTEXT=$(oc config view --config=${ADMIN_KUBECONFIG} --flatten -o template -t '{{index . "current-context"}}')
105
+export CLUSTER_ADMIN_CONTEXT=$(oc config view --config=${ADMIN_KUBECONFIG} --flatten -o template --template='{{index . "current-context"}}')
106 106
 sudo chmod -R a+rwX "${ADMIN_KUBECONFIG}"
107 107
 export KUBECONFIG="${ADMIN_KUBECONFIG}"
108 108
 echo "[INFO] To debug: export KUBECONFIG=$ADMIN_KUBECONFIG"
... ...
@@ -107,7 +107,7 @@ function configure_os_server {
107 107
 
108 108
 	# Make oc use ${MASTER_CONFIG_DIR}/admin.kubeconfig, and ignore anything in the running user's $HOME dir
109 109
 	export ADMIN_KUBECONFIG="${MASTER_CONFIG_DIR}/admin.kubeconfig"
110
-	export CLUSTER_ADMIN_CONTEXT=$(oc config view --config=${ADMIN_KUBECONFIG} --flatten -o template -t '{{index . "current-context"}}')
110
+	export CLUSTER_ADMIN_CONTEXT=$(oc config view --config=${ADMIN_KUBECONFIG} --flatten -o template --template='{{index . "current-context"}}')
111 111
 	sudo chmod -R a+rwX "${ADMIN_KUBECONFIG}"
112 112
 	echo "[INFO] To debug: export KUBECONFIG=$ADMIN_KUBECONFIG"
113 113
 }
... ...
@@ -512,7 +512,7 @@ function install_registry {
512 512
 }
513 513
 
514 514
 function wait_for_registry {
515
-	wait_for_command '[[ "$(oc get endpoints docker-registry --output-version=v1 -t "{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" --config=${ADMIN_KUBECONFIG} || echo "0")" != "0" ]]' $((5*TIME_MIN))
515
+	wait_for_command '[[ "$(oc get endpoints docker-registry --output-version=v1 --template="{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" --config=${ADMIN_KUBECONFIG} || echo "0")" != "0" ]]' $((5*TIME_MIN))
516 516
 }
517 517
 
518 518
 
... ...
@@ -521,7 +521,7 @@ function wait_for_registry {
521 521
 function os::build:wait_for_start() {
522 522
 	echo "[INFO] Waiting for $1 namespace build to start"
523 523
 	wait_for_command "oc get -n $1 builds | grep -i running" $((10*TIME_MIN)) "oc get -n $1 builds | grep -i -e failed -e error"
524
-	BUILD_ID=`oc get -n $1 builds  --output-version=v1 -t "{{with index .items 0}}{{.metadata.name}}{{end}}"`
524
+	BUILD_ID=`oc get -n $1 builds  --output-version=v1 --template="{{with index .items 0}}{{.metadata.name}}{{end}}"`
525 525
 	echo "[INFO] Build ${BUILD_ID} started"
526 526
 }
527 527
 
... ...
@@ -530,7 +530,7 @@ function os::build:wait_for_start() {
530 530
 function os::build:wait_for_end() {
531 531
 	echo "[INFO] Waiting for $1 namespace build to complete"
532 532
 	wait_for_command "oc get -n $1 builds | grep -i complete" $((10*TIME_MIN)) "oc get -n $1 builds | grep -i -e failed -e error"
533
-	BUILD_ID=`oc get -n $1 builds --output-version=v1beta3 -t "{{with index .items 0}}{{.metadata.name}}{{end}}"`
533
+	BUILD_ID=`oc get -n $1 builds --output-version=v1beta3 --template="{{with index .items 0}}{{.metadata.name}}{{end}}"`
534 534
 	echo "[INFO] Build ${BUILD_ID} finished"
535 535
 	# TODO: fix
536 536
 	set +e
... ...
@@ -85,9 +85,9 @@ oc delete all -l name=mytemplate
85 85
 oc new-app https://github.com/openshift/ruby-hello-world
86 86
 [ "$(oc get dc/ruby-hello-world)" ]
87 87
 
88
-oc get dc/ruby-hello-world -t '{{ .spec.replicas }}' | grep -q 1
88
+oc get dc/ruby-hello-world --template='{{ .spec.replicas }}' | grep -q 1
89 89
 oc patch dc/ruby-hello-world -p '{"spec": {"replicas": 2}}'
90
-oc get dc/ruby-hello-world -t '{{ .spec.replicas }}' | grep -q 2
90
+oc get dc/ruby-hello-world --template='{{ .spec.replicas }}' | grep -q 2
91 91
 
92 92
 oc delete all -l app=ruby-hello-world
93 93
 [ ! "$(oc get dc/ruby-hello-world)" ]
... ...
@@ -17,7 +17,7 @@ oc export all --all-namespaces
17 17
 # make sure the deprecated flag doesn't fail
18 18
 oc export all --all
19 19
 
20
-[ "$(oc export svc -t '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | wc -l)" -ne 0 ]
20
+[ "$(oc export svc --template='{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | wc -l)" -ne 0 ]
21 21
 [ "$(oc export svc --as-template=template | grep 'kind: Template')" ]
22 22
 [ ! "$(oc export svc | grep 'clusterIP')" ]
23 23
 [ ! "$(oc export svc --exact | grep 'clusterIP: ""')" ]
... ...
@@ -28,43 +28,43 @@ echo "images: ok"
28 28
 oc get imageStreams
29 29
 oc create -f test/integration/fixtures/test-image-stream.json
30 30
 # verify that creating a registry fills out .status.dockerImageRepository
31
-if [ -z "$(oc get imageStreams test -t "{{.status.dockerImageRepository}}")" ]; then
31
+if [ -z "$(oc get imageStreams test --template="{{.status.dockerImageRepository}}")" ]; then
32 32
   # create the registry
33 33
   oadm registry --credentials="${KUBECONFIG}" --images="${USE_IMAGES}" -n default
34 34
   # make sure stream.status.dockerImageRepository IS set
35
-  [ -n "$(oc get imageStreams test -t "{{.status.dockerImageRepository}}")" ]
35
+  [ -n "$(oc get imageStreams test --template="{{.status.dockerImageRepository}}")" ]
36 36
 fi
37 37
 oc delete imageStreams test
38
-[ -z "$(oc get imageStreams test -t "{{.status.dockerImageRepository}}")" ]
38
+[ -z "$(oc get imageStreams test --template="{{.status.dockerImageRepository}}")" ]
39 39
 
40 40
 oc create -f examples/image-streams/image-streams-centos7.json
41
-[ -n "$(oc get imageStreams ruby -t "{{.status.dockerImageRepository}}")" ]
42
-[ -n "$(oc get imageStreams nodejs -t "{{.status.dockerImageRepository}}")" ]
43
-[ -n "$(oc get imageStreams wildfly -t "{{.status.dockerImageRepository}}")" ]
44
-[ -n "$(oc get imageStreams mysql -t "{{.status.dockerImageRepository}}")" ]
45
-[ -n "$(oc get imageStreams postgresql -t "{{.status.dockerImageRepository}}")" ]
46
-[ -n "$(oc get imageStreams mongodb -t "{{.status.dockerImageRepository}}")" ]
41
+[ -n "$(oc get imageStreams ruby --template="{{.status.dockerImageRepository}}")" ]
42
+[ -n "$(oc get imageStreams nodejs --template="{{.status.dockerImageRepository}}")" ]
43
+[ -n "$(oc get imageStreams wildfly --template="{{.status.dockerImageRepository}}")" ]
44
+[ -n "$(oc get imageStreams mysql --template="{{.status.dockerImageRepository}}")" ]
45
+[ -n "$(oc get imageStreams postgresql --template="{{.status.dockerImageRepository}}")" ]
46
+[ -n "$(oc get imageStreams mongodb --template="{{.status.dockerImageRepository}}")" ]
47 47
 # verify the image repository had its tags populated
48 48
 tryuntil oc get imagestreamtags wildfly:latest
49
-[ -n "$(oc get imageStreams wildfly -t "{{ index .metadata.annotations \"openshift.io/image.dockerRepositoryCheck\"}}")" ]
49
+[ -n "$(oc get imageStreams wildfly --template="{{ index .metadata.annotations \"openshift.io/image.dockerRepositoryCheck\"}}")" ]
50 50
 oc delete imageStreams ruby
51 51
 oc delete imageStreams nodejs
52 52
 oc delete imageStreams wildfly
53 53
 #oc delete imageStreams mysql
54 54
 oc delete imageStreams postgresql
55 55
 oc delete imageStreams mongodb
56
-[ -z "$(oc get imageStreams ruby -t "{{.status.dockerImageRepository}}")" ]
57
-[ -z "$(oc get imageStreams nodejs -t "{{.status.dockerImageRepository}}")" ]
58
-[ -z "$(oc get imageStreams postgresql -t "{{.status.dockerImageRepository}}")" ]
59
-[ -z "$(oc get imageStreams mongodb -t "{{.status.dockerImageRepository}}")" ]
60
-[ -z "$(oc get imageStreams wildfly -t "{{.status.dockerImageRepository}}")" ]
56
+[ -z "$(oc get imageStreams ruby --template="{{.status.dockerImageRepository}}")" ]
57
+[ -z "$(oc get imageStreams nodejs --template="{{.status.dockerImageRepository}}")" ]
58
+[ -z "$(oc get imageStreams postgresql --template="{{.status.dockerImageRepository}}")" ]
59
+[ -z "$(oc get imageStreams mongodb --template="{{.status.dockerImageRepository}}")" ]
60
+[ -z "$(oc get imageStreams wildfly --template="{{.status.dockerImageRepository}}")" ]
61 61
 tryuntil oc get imagestreamTags mysql:latest
62
-[ -n "$(oc get imagestreams mysql -t "{{ index .metadata.annotations \"openshift.io/image.dockerRepositoryCheck\"}}")" ]
62
+[ -n "$(oc get imagestreams mysql --template="{{ index .metadata.annotations \"openshift.io/image.dockerRepositoryCheck\"}}")" ]
63 63
 oc describe istag/mysql:latest
64 64
 [ "$(oc describe istag/mysql:latest | grep "Environment:")" ]
65 65
 [ "$(oc describe istag/mysql:latest | grep "Image Created:")" ]
66 66
 [ "$(oc describe istag/mysql:latest | grep "Image Name:")" ]
67
-name=$(oc get istag/mysql:latest -t '{{ .image.metadata.name }}')
67
+name=$(oc get istag/mysql:latest --template='{{ .image.metadata.name }}')
68 68
 imagename="isimage/mysql@${name:0:7}"
69 69
 oc describe "${imagename}"
70 70
 [ "$(oc describe ${imagename} | grep "Environment:")" ]
... ...
@@ -79,42 +79,42 @@ echo "import-image: ok"
79 79
 
80 80
 # oc tag
81 81
 oc tag mysql:latest tagtest:tag1
82
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 0).from.kind}}')" == "ImageStreamTag" ]
82
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 0).from.kind}}')" == "ImageStreamTag" ]
83 83
 
84 84
 oc tag mysql@${name} tagtest:tag2
85
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 1).from.kind}}')" == "ImageStreamImage" ]
85
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 1).from.kind}}')" == "ImageStreamImage" ]
86 86
 
87 87
 oc tag mysql:notfound tagtest:tag3
88
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 2).from.kind}}')" == "ImageStreamTag" ]
88
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 2).from.kind}}')" == "ImageStreamTag" ]
89 89
 
90 90
 oc tag --source=imagestreamtag mysql:latest tagtest:tag4
91
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 3).from.kind}}')" == "ImageStreamTag" ]
91
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 3).from.kind}}')" == "ImageStreamTag" ]
92 92
 
93 93
 oc tag --source=istag mysql:latest tagtest:tag5
94
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 4).from.kind}}')" == "ImageStreamTag" ]
94
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 4).from.kind}}')" == "ImageStreamTag" ]
95 95
 
96 96
 oc tag --source=imagestreamimage mysql@${name} tagtest:tag6
97
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 5).from.kind}}')" == "ImageStreamImage" ]
97
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 5).from.kind}}')" == "ImageStreamImage" ]
98 98
 
99 99
 oc tag --source=isimage mysql@${name} tagtest:tag7
100
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 6).from.kind}}')" == "ImageStreamImage" ]
100
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 6).from.kind}}')" == "ImageStreamImage" ]
101 101
 
102 102
 oc tag --source=docker mysql:latest tagtest:tag8
103
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 7).from.kind}}')" == "DockerImage" ]
103
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 7).from.kind}}')" == "DockerImage" ]
104 104
 
105 105
 oc tag mysql:latest tagtest:zzz tagtest2:zzz
106
-[ "$(oc get is/tagtest -t '{{(index .spec.tags 8).from.kind}}')" == "ImageStreamTag" ]
107
-[ "$(oc get is/tagtest2 -t '{{(index .spec.tags 0).from.kind}}')" == "ImageStreamTag" ]
106
+[ "$(oc get is/tagtest --template='{{(index .spec.tags 8).from.kind}}')" == "ImageStreamTag" ]
107
+[ "$(oc get is/tagtest2 --template='{{(index .spec.tags 0).from.kind}}')" == "ImageStreamTag" ]
108 108
 
109 109
 # TODO: bug
110 110
 # oc tag registry-1.docker.io/openshift/origin:v1.0.4 newrepo:latest
111 111
 
112 112
 # test creating streams that don't exist
113
-[ -z "$(oc get imageStreams tagtest3 -t "{{.status.dockerImageRepository}}")" ]
114
-[ -z "$(oc get imageStreams tagtest4 -t "{{.status.dockerImageRepository}}")" ]
113
+[ -z "$(oc get imageStreams tagtest3 --template="{{.status.dockerImageRepository}}")" ]
114
+[ -z "$(oc get imageStreams tagtest4 --template="{{.status.dockerImageRepository}}")" ]
115 115
 oc tag mysql:latest tagtest3:latest tagtest4:latest
116
-[ "$(oc get is/tagtest3 -t '{{(index .spec.tags 0).from.kind}}')" == "ImageStreamTag" ]
117
-[ "$(oc get is/tagtest4 -t '{{(index .spec.tags 0).from.kind}}')" == "ImageStreamTag" ]
116
+[ "$(oc get is/tagtest3 --template='{{(index .spec.tags 0).from.kind}}')" == "ImageStreamTag" ]
117
+[ "$(oc get is/tagtest4 --template='{{(index .spec.tags 0).from.kind}}')" == "ImageStreamTag" ]
118 118
 
119 119
 oc delete is/tagtest is/tagtest2 is/tagtest3 is/tagtest4
120 120
 echo "tag: ok"
... ...
@@ -15,7 +15,7 @@ oc secrets new-dockercfg dockercfg --docker-username=sample-user --docker-passwo
15 15
 oc describe secrets/dockercfg | grep "dockercfg:" | awk '{print $2}' > ${HOME}/dockerconfig
16 16
 oc secrets new from-file .dockercfg=${HOME}/dockerconfig
17 17
 # check to make sure the type was correctly auto-detected
18
-[ "$(oc get secret/from-file -t "{{ .type }}" | grep 'kubernetes.io/dockercfg')" ]
18
+[ "$(oc get secret/from-file --template="{{ .type }}" | grep 'kubernetes.io/dockercfg')" ]
19 19
 # make sure the -o works correctly
20 20
 [ "$(oc secrets new-dockercfg dockercfg --docker-username=sample-user --docker-password=sample-password --docker-email=fake@example.org -o yaml | grep "kubernetes.io/dockercfg")" ]
21 21
 [ "$(oc secrets new from-file .dockercfg=${HOME}/dockerconfig -o yaml | grep "kubernetes.io/dockercfg")" ]
... ...
@@ -184,7 +184,7 @@ wait_for_command '[[ "$(oc get endpoints router --output-version=v1beta3 --templ
184 184
 
185 185
 # Check for privileged exec limitations.
186 186
 echo "[INFO] Validating privileged pod exec"
187
-router_pod=$(oc get pod -n default -l deploymentconfig=router -t '{{(index .items 0).metadata.name}}')
187
+router_pod=$(oc get pod -n default -l deploymentconfig=router --template='{{(index .items 0).metadata.name}}')
188 188
 oc policy add-role-to-user admin e2e-default-admin
189 189
 # login as a user that can't run privileged pods
190 190
 oc login -u e2e-default-admin -p pass
... ...
@@ -145,7 +145,7 @@ oc = oc.Run("get").Args("foo").Template("{{ .spec }}")
145 145
 ```
146 146
 is an equivalent to
147 147
 ```console
148
-$ oc get foo -o template -t '{{ .spec }}'
148
+$ oc get foo -o template --template='{{ .spec }}'
149 149
 ```
150 150
 
151 151
 To execute the command you will need to call either `Execute()`, which will execute the command and return any error that occurs, or `Output()`  which returns any error that occurs as well as the output.
... ...
@@ -227,7 +227,7 @@ func (c *CLI) Run(verb string) *CLI {
227 227
 }
228 228
 
229 229
 // Template sets a Go template for the OpenShift CLI command.
230
-// This is equivalent of running "oc get foo -o template -t '{{ .spec }}'"
230
+// This is equivalent of running "oc get foo -o template --template='{{ .spec }}'"
231 231
 func (c *CLI) Template(t string) *CLI {
232 232
 	if c.verb != "get" {
233 233
 		FatalErr("Cannot use Template() for non-get verbs.")
... ...
@@ -225,7 +225,7 @@ function wait_for_app() {
225 225
 function wait_for_build() {
226 226
 	echo "[INFO] Waiting for $1 namespace build to complete"
227 227
 	wait_for_command "oc get -n $1 builds | grep -i complete" $((10*TIME_MIN)) "oc get -n $1 builds | grep -i -e failed -e error"
228
-	BUILD_ID=`oc get -n $1 builds --output-version=v1beta3 -t "{{with index .items 0}}{{.metadata.name}}{{end}}"`
228
+	BUILD_ID=`oc get -n $1 builds --output-version=v1beta3 --template="{{with index .items 0}}{{.metadata.name}}{{end}}"`
229 229
 	echo "[INFO] Build ${BUILD_ID} finished"
230 230
   # TODO: fix
231 231
   set +e
... ...
@@ -259,7 +259,7 @@ export HOME="${FAKE_HOME_DIR}"
259 259
 mkdir -p ${FAKE_HOME_DIR}
260 260
 
261 261
 export KUBECONFIG="${MASTER_CONFIG_DIR}/admin.kubeconfig"
262
-CLUSTER_ADMIN_CONTEXT=$(oc config view --flatten -o template -t '{{index . "current-context"}}')
262
+CLUSTER_ADMIN_CONTEXT=$(oc config view --flatten -o template --template='{{index . "current-context"}}')
263 263
 
264 264
 if [[ "${API_SCHEME}" == "https" ]]; then
265 265
 	export CURL_CA_BUNDLE="${MASTER_CONFIG_DIR}/ca.crt"
... ...
@@ -311,7 +311,7 @@ echo "[INFO] Pulled ruby-20-centos7"
311 311
 
312 312
 echo "[INFO] Waiting for Docker registry pod to start"
313 313
 # TODO: simplify when #4702 is fixed upstream
314
-wait_for_command '[[ "$(oc get endpoints docker-registry --output-version=v1beta3 -t "{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" || echo "0")" != "0" ]]' $((5*TIME_MIN))
314
+wait_for_command '[[ "$(oc get endpoints docker-registry --output-version=v1beta3 --template="{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" || echo "0")" != "0" ]]' $((5*TIME_MIN))
315 315
 
316 316
 # services can end up on any IP.	Make sure we get the IP we need for the docker registry
317 317
 DOCKER_REGISTRY=$(oc get --output-version=v1beta3 --template="{{ .spec.portalIP }}:{{ with index .spec.ports 0 }}{{ .port }}{{ end }}" service docker-registry)
... ...
@@ -330,7 +330,7 @@ echo "[INFO] Logging in as a regular user (e2e-user:pass) with project 'test'...
330 330
 oc login -u e2e-user -p pass
331 331
 [ "$(oc whoami | grep 'e2e-user')" ]
332 332
 oc project cache
333
-token=$(oc config view --flatten -o template -t '{{with index .users 0}}{{.user.token}}{{end}}')
333
+token=$(oc config view --flatten -o template --template='{{with index .users 0}}{{.user.token}}{{end}}')
334 334
 [[ -n ${token} ]]
335 335
 
336 336
 echo "[INFO] Docker login as e2e-user to ${DOCKER_REGISTRY}"
... ...
@@ -388,14 +388,14 @@ oc project ${CLUSTER_ADMIN_CONTEXT}
388 388
 
389 389
 # ensure the router is started
390 390
 # TODO: simplify when #4702 is fixed upstream
391
-wait_for_command '[[ "$(oc get endpoints router --output-version=v1beta3 -t "{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" || echo "0")" != "0" ]]' $((5*TIME_MIN))
391
+wait_for_command '[[ "$(oc get endpoints router --output-version=v1beta3 --template="{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" || echo "0")" != "0" ]]' $((5*TIME_MIN))
392 392
 
393 393
 echo "[INFO] Validating routed app response..."
394 394
 validate_response "-s -k --resolve www.example.com:443:${CONTAINER_ACCESSIBLE_API_HOST} https://www.example.com" "Hello from OpenShift" 0.2 50
395 395
 
396 396
 # Remote command execution
397 397
 echo "[INFO] Validating exec"
398
-registry_pod=$(oc get pod -l deploymentconfig=docker-registry -t '{{(index .items 0).metadata.name}}')
398
+registry_pod=$(oc get pod -l deploymentconfig=docker-registry --template='{{(index .items 0).metadata.name}}')
399 399
 # when running as a restricted pod the registry will run with a pre-allocated
400 400
 # user in the neighborhood of 1000000+.  Look for a substring of the pre-allocated uid range
401 401
 oc exec -p ${registry_pod} id | grep 10