Skip to content

Commit 20c235d

Browse files
author
Jim Minter
committed
Implement cluster status command
1 parent e55610a commit 20c235d

23 files changed

+807
-225
lines changed

contrib/completions/bash/oc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5323,6 +5323,50 @@ _oc_cluster_down()
53235323
noun_aliases=()
53245324
}
53255325

5326+
_oc_cluster_status()
5327+
{
5328+
last_command="oc_cluster_status"
5329+
commands=()
5330+
5331+
flags=()
5332+
two_word_flags=()
5333+
local_nonpersistent_flags=()
5334+
flags_with_completion=()
5335+
flags_completion=()
5336+
5337+
flags+=("--docker-machine=")
5338+
local_nonpersistent_flags+=("--docker-machine=")
5339+
flags+=("--as=")
5340+
flags+=("--certificate-authority=")
5341+
flags_with_completion+=("--certificate-authority")
5342+
flags_completion+=("_filedir")
5343+
flags+=("--client-certificate=")
5344+
flags_with_completion+=("--client-certificate")
5345+
flags_completion+=("_filedir")
5346+
flags+=("--client-key=")
5347+
flags_with_completion+=("--client-key")
5348+
flags_completion+=("_filedir")
5349+
flags+=("--cluster=")
5350+
flags+=("--config=")
5351+
flags_with_completion+=("--config")
5352+
flags_completion+=("_filedir")
5353+
flags+=("--context=")
5354+
flags+=("--insecure-skip-tls-verify")
5355+
flags+=("--log-flush-frequency=")
5356+
flags+=("--loglevel=")
5357+
flags+=("--logspec=")
5358+
flags+=("--match-server-version")
5359+
flags+=("--namespace=")
5360+
two_word_flags+=("-n")
5361+
flags+=("--server=")
5362+
flags+=("--token=")
5363+
flags+=("--user=")
5364+
5365+
must_have_one_flag=()
5366+
must_have_one_noun=()
5367+
noun_aliases=()
5368+
}
5369+
53265370
_oc_cluster_up()
53275371
{
53285372
last_command="oc_cluster_up"
@@ -5401,6 +5445,7 @@ _oc_cluster()
54015445
last_command="oc_cluster"
54025446
commands=()
54035447
commands+=("down")
5448+
commands+=("status")
54045449
commands+=("up")
54055450

54065451
flags=()

contrib/completions/bash/openshift

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9796,6 +9796,51 @@ _openshift_cli_cluster_down()
97969796
noun_aliases=()
97979797
}
97989798

9799+
_openshift_cli_cluster_status()
9800+
{
9801+
last_command="openshift_cli_cluster_status"
9802+
commands=()
9803+
9804+
flags=()
9805+
two_word_flags=()
9806+
local_nonpersistent_flags=()
9807+
flags_with_completion=()
9808+
flags_completion=()
9809+
9810+
flags+=("--docker-machine=")
9811+
local_nonpersistent_flags+=("--docker-machine=")
9812+
flags+=("--as=")
9813+
flags+=("--certificate-authority=")
9814+
flags_with_completion+=("--certificate-authority")
9815+
flags_completion+=("_filedir")
9816+
flags+=("--client-certificate=")
9817+
flags_with_completion+=("--client-certificate")
9818+
flags_completion+=("_filedir")
9819+
flags+=("--client-key=")
9820+
flags_with_completion+=("--client-key")
9821+
flags_completion+=("_filedir")
9822+
flags+=("--cluster=")
9823+
flags+=("--config=")
9824+
flags_with_completion+=("--config")
9825+
flags_completion+=("_filedir")
9826+
flags+=("--context=")
9827+
flags+=("--google-json-key=")
9828+
flags+=("--insecure-skip-tls-verify")
9829+
flags+=("--log-flush-frequency=")
9830+
flags+=("--loglevel=")
9831+
flags+=("--logspec=")
9832+
flags+=("--match-server-version")
9833+
flags+=("--namespace=")
9834+
two_word_flags+=("-n")
9835+
flags+=("--server=")
9836+
flags+=("--token=")
9837+
flags+=("--user=")
9838+
9839+
must_have_one_flag=()
9840+
must_have_one_noun=()
9841+
noun_aliases=()
9842+
}
9843+
97999844
_openshift_cli_cluster_up()
98009845
{
98019846
last_command="openshift_cli_cluster_up"
@@ -9875,6 +9920,7 @@ _openshift_cli_cluster()
98759920
last_command="openshift_cli_cluster"
98769921
commands=()
98779922
commands+=("down")
9923+
commands+=("status")
98789924
commands+=("up")
98799925

98809926
flags=()

contrib/completions/zsh/oc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5484,6 +5484,50 @@ _oc_cluster_down()
54845484
noun_aliases=()
54855485
}
54865486

5487+
_oc_cluster_status()
5488+
{
5489+
last_command="oc_cluster_status"
5490+
commands=()
5491+
5492+
flags=()
5493+
two_word_flags=()
5494+
local_nonpersistent_flags=()
5495+
flags_with_completion=()
5496+
flags_completion=()
5497+
5498+
flags+=("--docker-machine=")
5499+
local_nonpersistent_flags+=("--docker-machine=")
5500+
flags+=("--as=")
5501+
flags+=("--certificate-authority=")
5502+
flags_with_completion+=("--certificate-authority")
5503+
flags_completion+=("_filedir")
5504+
flags+=("--client-certificate=")
5505+
flags_with_completion+=("--client-certificate")
5506+
flags_completion+=("_filedir")
5507+
flags+=("--client-key=")
5508+
flags_with_completion+=("--client-key")
5509+
flags_completion+=("_filedir")
5510+
flags+=("--cluster=")
5511+
flags+=("--config=")
5512+
flags_with_completion+=("--config")
5513+
flags_completion+=("_filedir")
5514+
flags+=("--context=")
5515+
flags+=("--insecure-skip-tls-verify")
5516+
flags+=("--log-flush-frequency=")
5517+
flags+=("--loglevel=")
5518+
flags+=("--logspec=")
5519+
flags+=("--match-server-version")
5520+
flags+=("--namespace=")
5521+
two_word_flags+=("-n")
5522+
flags+=("--server=")
5523+
flags+=("--token=")
5524+
flags+=("--user=")
5525+
5526+
must_have_one_flag=()
5527+
must_have_one_noun=()
5528+
noun_aliases=()
5529+
}
5530+
54875531
_oc_cluster_up()
54885532
{
54895533
last_command="oc_cluster_up"
@@ -5562,6 +5606,7 @@ _oc_cluster()
55625606
last_command="oc_cluster"
55635607
commands=()
55645608
commands+=("down")
5609+
commands+=("status")
55655610
commands+=("up")
55665611

55675612
flags=()

contrib/completions/zsh/openshift

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9957,6 +9957,51 @@ _openshift_cli_cluster_down()
99579957
noun_aliases=()
99589958
}
99599959

9960+
_openshift_cli_cluster_status()
9961+
{
9962+
last_command="openshift_cli_cluster_status"
9963+
commands=()
9964+
9965+
flags=()
9966+
two_word_flags=()
9967+
local_nonpersistent_flags=()
9968+
flags_with_completion=()
9969+
flags_completion=()
9970+
9971+
flags+=("--docker-machine=")
9972+
local_nonpersistent_flags+=("--docker-machine=")
9973+
flags+=("--as=")
9974+
flags+=("--certificate-authority=")
9975+
flags_with_completion+=("--certificate-authority")
9976+
flags_completion+=("_filedir")
9977+
flags+=("--client-certificate=")
9978+
flags_with_completion+=("--client-certificate")
9979+
flags_completion+=("_filedir")
9980+
flags+=("--client-key=")
9981+
flags_with_completion+=("--client-key")
9982+
flags_completion+=("_filedir")
9983+
flags+=("--cluster=")
9984+
flags+=("--config=")
9985+
flags_with_completion+=("--config")
9986+
flags_completion+=("_filedir")
9987+
flags+=("--context=")
9988+
flags+=("--google-json-key=")
9989+
flags+=("--insecure-skip-tls-verify")
9990+
flags+=("--log-flush-frequency=")
9991+
flags+=("--loglevel=")
9992+
flags+=("--logspec=")
9993+
flags+=("--match-server-version")
9994+
flags+=("--namespace=")
9995+
two_word_flags+=("-n")
9996+
flags+=("--server=")
9997+
flags+=("--token=")
9998+
flags+=("--user=")
9999+
10000+
must_have_one_flag=()
10001+
must_have_one_noun=()
10002+
noun_aliases=()
10003+
}
10004+
996010005
_openshift_cli_cluster_up()
996110006
{
996210007
last_command="openshift_cli_cluster_up"
@@ -10036,6 +10081,7 @@ _openshift_cli_cluster()
1003610081
last_command="openshift_cli_cluster"
1003710082
commands=()
1003810083
commands+=("down")
10084+
commands+=("status")
1003910085
commands+=("up")
1004010086

1004110087
flags=()

docs/generated/oc_by_example_content.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,16 +938,34 @@ Stop OpenShift on Docker
938938
[options="nowrap"]
939939
----
940940
941-
# Stop local Docker cluster
941+
# Stop local OpenShift cluster
942942
oc cluster down
943943
944-
# Stop cluster running on Docker machine 'mymachine'
944+
# Stop OpenShift cluster running on Docker machine 'mymachine'
945945
oc cluster down --docker-machine=mymachine
946946
947947
----
948948
====
949949

950950

951+
== oc cluster status
952+
Show OpenShift on Docker status
953+
954+
====
955+
956+
[options="nowrap"]
957+
----
958+
959+
# See status of local OpenShift cluster
960+
oc cluster status
961+
962+
# See status of OpenShift cluster running on Docker machine 'mymachine'
963+
oc cluster status --docker-machine=mymachine
964+
965+
----
966+
====
967+
968+
951969
== oc cluster up
952970
Start OpenShift on Docker with reasonable defaults
953971

docs/man/man1/.files_generated_oc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ oc-autoscale.1
9494
oc-build-logs.1
9595
oc-cancel-build.1
9696
oc-cluster-down.1
97+
oc-cluster-status.1
9798
oc-cluster-up.1
9899
oc-cluster.1
99100
oc-completion.1

docs/man/man1/.files_generated_openshift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ openshift-cli-autoscale.1
183183
openshift-cli-build-logs.1
184184
openshift-cli-cancel-build.1
185185
openshift-cli-cluster-down.1
186+
openshift-cli-cluster-status.1
186187
openshift-cli-cluster-up.1
187188
openshift-cli-cluster.1
188189
openshift-cli-completion.1

docs/man/man1/oc-cluster-down.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ same machine using the \-\-docker\-machine argument.
9898

9999
.nf
100100

101-
# Stop local Docker cluster
101+
# Stop local OpenShift cluster
102102
oc cluster down
103103

104-
# Stop cluster running on Docker machine 'mymachine'
104+
# Stop OpenShift cluster running on Docker machine 'mymachine'
105105
oc cluster down \-\-docker\-machine=mymachine
106106

107107

0 commit comments

Comments
 (0)