Skip to content

Commit 6077d9b

Browse files
author
Jim Minter
committed
Implement cluster status command
1 parent 86e8fed commit 6077d9b

23 files changed

+805
-219
lines changed

contrib/completions/bash/oc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5432,6 +5432,51 @@ _oc_cluster_down()
54325432
noun_aliases=()
54335433
}
54345434

5435+
_oc_cluster_status()
5436+
{
5437+
last_command="oc_cluster_status"
5438+
commands=()
5439+
5440+
flags=()
5441+
two_word_flags=()
5442+
local_nonpersistent_flags=()
5443+
flags_with_completion=()
5444+
flags_completion=()
5445+
5446+
flags+=("--docker-machine=")
5447+
local_nonpersistent_flags+=("--docker-machine=")
5448+
flags+=("--as=")
5449+
flags+=("--certificate-authority=")
5450+
flags_with_completion+=("--certificate-authority")
5451+
flags_completion+=("_filedir")
5452+
flags+=("--client-certificate=")
5453+
flags_with_completion+=("--client-certificate")
5454+
flags_completion+=("_filedir")
5455+
flags+=("--client-key=")
5456+
flags_with_completion+=("--client-key")
5457+
flags_completion+=("_filedir")
5458+
flags+=("--cluster=")
5459+
flags+=("--config=")
5460+
flags_with_completion+=("--config")
5461+
flags_completion+=("_filedir")
5462+
flags+=("--context=")
5463+
flags+=("--insecure-skip-tls-verify")
5464+
flags+=("--log-flush-frequency=")
5465+
flags+=("--loglevel=")
5466+
flags+=("--logspec=")
5467+
flags+=("--match-server-version")
5468+
flags+=("--namespace=")
5469+
two_word_flags+=("-n")
5470+
flags+=("--request-timeout=")
5471+
flags+=("--server=")
5472+
flags+=("--token=")
5473+
flags+=("--user=")
5474+
5475+
must_have_one_flag=()
5476+
must_have_one_noun=()
5477+
noun_aliases=()
5478+
}
5479+
54355480
_oc_cluster_up()
54365481
{
54375482
last_command="oc_cluster_up"
@@ -5513,6 +5558,7 @@ _oc_cluster()
55135558
last_command="oc_cluster"
55145559
commands=()
55155560
commands+=("down")
5561+
commands+=("status")
55165562
commands+=("up")
55175563

55185564
flags=()

contrib/completions/bash/openshift

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9990,6 +9990,52 @@ _openshift_cli_cluster_down()
99909990
noun_aliases=()
99919991
}
99929992

9993+
_openshift_cli_cluster_status()
9994+
{
9995+
last_command="openshift_cli_cluster_status"
9996+
commands=()
9997+
9998+
flags=()
9999+
two_word_flags=()
10000+
local_nonpersistent_flags=()
10001+
flags_with_completion=()
10002+
flags_completion=()
10003+
10004+
flags+=("--docker-machine=")
10005+
local_nonpersistent_flags+=("--docker-machine=")
10006+
flags+=("--as=")
10007+
flags+=("--certificate-authority=")
10008+
flags_with_completion+=("--certificate-authority")
10009+
flags_completion+=("_filedir")
10010+
flags+=("--client-certificate=")
10011+
flags_with_completion+=("--client-certificate")
10012+
flags_completion+=("_filedir")
10013+
flags+=("--client-key=")
10014+
flags_with_completion+=("--client-key")
10015+
flags_completion+=("_filedir")
10016+
flags+=("--cluster=")
10017+
flags+=("--config=")
10018+
flags_with_completion+=("--config")
10019+
flags_completion+=("_filedir")
10020+
flags+=("--context=")
10021+
flags+=("--google-json-key=")
10022+
flags+=("--insecure-skip-tls-verify")
10023+
flags+=("--log-flush-frequency=")
10024+
flags+=("--loglevel=")
10025+
flags+=("--logspec=")
10026+
flags+=("--match-server-version")
10027+
flags+=("--namespace=")
10028+
two_word_flags+=("-n")
10029+
flags+=("--request-timeout=")
10030+
flags+=("--server=")
10031+
flags+=("--token=")
10032+
flags+=("--user=")
10033+
10034+
must_have_one_flag=()
10035+
must_have_one_noun=()
10036+
noun_aliases=()
10037+
}
10038+
999310039
_openshift_cli_cluster_up()
999410040
{
999510041
last_command="openshift_cli_cluster_up"
@@ -10072,6 +10118,7 @@ _openshift_cli_cluster()
1007210118
last_command="openshift_cli_cluster"
1007310119
commands=()
1007410120
commands+=("down")
10121+
commands+=("status")
1007510122
commands+=("up")
1007610123

1007710124
flags=()

contrib/completions/zsh/oc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5593,6 +5593,51 @@ _oc_cluster_down()
55935593
noun_aliases=()
55945594
}
55955595

5596+
_oc_cluster_status()
5597+
{
5598+
last_command="oc_cluster_status"
5599+
commands=()
5600+
5601+
flags=()
5602+
two_word_flags=()
5603+
local_nonpersistent_flags=()
5604+
flags_with_completion=()
5605+
flags_completion=()
5606+
5607+
flags+=("--docker-machine=")
5608+
local_nonpersistent_flags+=("--docker-machine=")
5609+
flags+=("--as=")
5610+
flags+=("--certificate-authority=")
5611+
flags_with_completion+=("--certificate-authority")
5612+
flags_completion+=("_filedir")
5613+
flags+=("--client-certificate=")
5614+
flags_with_completion+=("--client-certificate")
5615+
flags_completion+=("_filedir")
5616+
flags+=("--client-key=")
5617+
flags_with_completion+=("--client-key")
5618+
flags_completion+=("_filedir")
5619+
flags+=("--cluster=")
5620+
flags+=("--config=")
5621+
flags_with_completion+=("--config")
5622+
flags_completion+=("_filedir")
5623+
flags+=("--context=")
5624+
flags+=("--insecure-skip-tls-verify")
5625+
flags+=("--log-flush-frequency=")
5626+
flags+=("--loglevel=")
5627+
flags+=("--logspec=")
5628+
flags+=("--match-server-version")
5629+
flags+=("--namespace=")
5630+
two_word_flags+=("-n")
5631+
flags+=("--request-timeout=")
5632+
flags+=("--server=")
5633+
flags+=("--token=")
5634+
flags+=("--user=")
5635+
5636+
must_have_one_flag=()
5637+
must_have_one_noun=()
5638+
noun_aliases=()
5639+
}
5640+
55965641
_oc_cluster_up()
55975642
{
55985643
last_command="oc_cluster_up"
@@ -5674,6 +5719,7 @@ _oc_cluster()
56745719
last_command="oc_cluster"
56755720
commands=()
56765721
commands+=("down")
5722+
commands+=("status")
56775723
commands+=("up")
56785724

56795725
flags=()

contrib/completions/zsh/openshift

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10151,6 +10151,52 @@ _openshift_cli_cluster_down()
1015110151
noun_aliases=()
1015210152
}
1015310153

10154+
_openshift_cli_cluster_status()
10155+
{
10156+
last_command="openshift_cli_cluster_status"
10157+
commands=()
10158+
10159+
flags=()
10160+
two_word_flags=()
10161+
local_nonpersistent_flags=()
10162+
flags_with_completion=()
10163+
flags_completion=()
10164+
10165+
flags+=("--docker-machine=")
10166+
local_nonpersistent_flags+=("--docker-machine=")
10167+
flags+=("--as=")
10168+
flags+=("--certificate-authority=")
10169+
flags_with_completion+=("--certificate-authority")
10170+
flags_completion+=("_filedir")
10171+
flags+=("--client-certificate=")
10172+
flags_with_completion+=("--client-certificate")
10173+
flags_completion+=("_filedir")
10174+
flags+=("--client-key=")
10175+
flags_with_completion+=("--client-key")
10176+
flags_completion+=("_filedir")
10177+
flags+=("--cluster=")
10178+
flags+=("--config=")
10179+
flags_with_completion+=("--config")
10180+
flags_completion+=("_filedir")
10181+
flags+=("--context=")
10182+
flags+=("--google-json-key=")
10183+
flags+=("--insecure-skip-tls-verify")
10184+
flags+=("--log-flush-frequency=")
10185+
flags+=("--loglevel=")
10186+
flags+=("--logspec=")
10187+
flags+=("--match-server-version")
10188+
flags+=("--namespace=")
10189+
two_word_flags+=("-n")
10190+
flags+=("--request-timeout=")
10191+
flags+=("--server=")
10192+
flags+=("--token=")
10193+
flags+=("--user=")
10194+
10195+
must_have_one_flag=()
10196+
must_have_one_noun=()
10197+
noun_aliases=()
10198+
}
10199+
1015410200
_openshift_cli_cluster_up()
1015510201
{
1015610202
last_command="openshift_cli_cluster_up"
@@ -10233,6 +10279,7 @@ _openshift_cli_cluster()
1023310279
last_command="openshift_cli_cluster"
1023410280
commands=()
1023510281
commands+=("down")
10282+
commands+=("status")
1023610283
commands+=("up")
1023710284

1023810285
flags=()

docs/generated/oc_by_example_content.adoc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ Stop OpenShift on Docker
919919
920920
[options="nowrap"]
921921
----
922-
# Stop local Docker cluster
922+
# Stop local OpenShift cluster
923923
oc cluster down
924924
925925
# Stop cluster running on Docker machine 'mymachine'
@@ -928,6 +928,22 @@ Stop OpenShift on Docker
928928
====
929929

930930

931+
== oc cluster status
932+
Show OpenShift on Docker status
933+
934+
====
935+
936+
[options="nowrap"]
937+
----
938+
# See status of local OpenShift cluster
939+
oc cluster status
940+
941+
# See status of OpenShift cluster running on Docker machine 'mymachine'
942+
oc cluster status --docker-machine=mymachine
943+
----
944+
====
945+
946+
931947
== oc cluster up
932948
Start OpenShift on Docker with reasonable defaults
933949

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ If you started your OpenShift with a specific docker\-machine, you need to speci
100100
.RS
101101

102102
.nf
103-
# Stop local Docker cluster
103+
# Stop local OpenShift cluster
104104
oc cluster down
105105

106106
# Stop cluster running on Docker machine 'mymachine'

0 commit comments

Comments
 (0)