Skip to content

Commit 66ae0b7

Browse files
author
Jim Minter
committed
Implement cluster status command
1 parent f60c1df commit 66ae0b7

23 files changed

+808
-219
lines changed

contrib/completions/bash/oc

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

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

55205566
flags=()

contrib/completions/bash/openshift

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9994,6 +9994,52 @@ _openshift_cli_cluster_down()
99949994
noun_aliases=()
99959995
}
99969996

9997+
_openshift_cli_cluster_status()
9998+
{
9999+
last_command="openshift_cli_cluster_status"
10000+
commands=()
10001+
10002+
flags=()
10003+
two_word_flags=()
10004+
local_nonpersistent_flags=()
10005+
flags_with_completion=()
10006+
flags_completion=()
10007+
10008+
flags+=("--docker-machine=")
10009+
local_nonpersistent_flags+=("--docker-machine=")
10010+
flags+=("--as=")
10011+
flags+=("--certificate-authority=")
10012+
flags_with_completion+=("--certificate-authority")
10013+
flags_completion+=("_filedir")
10014+
flags+=("--client-certificate=")
10015+
flags_with_completion+=("--client-certificate")
10016+
flags_completion+=("_filedir")
10017+
flags+=("--client-key=")
10018+
flags_with_completion+=("--client-key")
10019+
flags_completion+=("_filedir")
10020+
flags+=("--cluster=")
10021+
flags+=("--config=")
10022+
flags_with_completion+=("--config")
10023+
flags_completion+=("_filedir")
10024+
flags+=("--context=")
10025+
flags+=("--google-json-key=")
10026+
flags+=("--insecure-skip-tls-verify")
10027+
flags+=("--log-flush-frequency=")
10028+
flags+=("--loglevel=")
10029+
flags+=("--logspec=")
10030+
flags+=("--match-server-version")
10031+
flags+=("--namespace=")
10032+
two_word_flags+=("-n")
10033+
flags+=("--request-timeout=")
10034+
flags+=("--server=")
10035+
flags+=("--token=")
10036+
flags+=("--user=")
10037+
10038+
must_have_one_flag=()
10039+
must_have_one_noun=()
10040+
noun_aliases=()
10041+
}
10042+
999710043
_openshift_cli_cluster_up()
999810044
{
999910045
last_command="openshift_cli_cluster_up"
@@ -10076,6 +10122,7 @@ _openshift_cli_cluster()
1007610122
last_command="openshift_cli_cluster"
1007710123
commands=()
1007810124
commands+=("down")
10125+
commands+=("status")
1007910126
commands+=("up")
1008010127

1008110128
flags=()

contrib/completions/zsh/oc

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

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

56815727
flags=()

contrib/completions/zsh/openshift

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10155,6 +10155,52 @@ _openshift_cli_cluster_down()
1015510155
noun_aliases=()
1015610156
}
1015710157

10158+
_openshift_cli_cluster_status()
10159+
{
10160+
last_command="openshift_cli_cluster_status"
10161+
commands=()
10162+
10163+
flags=()
10164+
two_word_flags=()
10165+
local_nonpersistent_flags=()
10166+
flags_with_completion=()
10167+
flags_completion=()
10168+
10169+
flags+=("--docker-machine=")
10170+
local_nonpersistent_flags+=("--docker-machine=")
10171+
flags+=("--as=")
10172+
flags+=("--certificate-authority=")
10173+
flags_with_completion+=("--certificate-authority")
10174+
flags_completion+=("_filedir")
10175+
flags+=("--client-certificate=")
10176+
flags_with_completion+=("--client-certificate")
10177+
flags_completion+=("_filedir")
10178+
flags+=("--client-key=")
10179+
flags_with_completion+=("--client-key")
10180+
flags_completion+=("_filedir")
10181+
flags+=("--cluster=")
10182+
flags+=("--config=")
10183+
flags_with_completion+=("--config")
10184+
flags_completion+=("_filedir")
10185+
flags+=("--context=")
10186+
flags+=("--google-json-key=")
10187+
flags+=("--insecure-skip-tls-verify")
10188+
flags+=("--log-flush-frequency=")
10189+
flags+=("--loglevel=")
10190+
flags+=("--logspec=")
10191+
flags+=("--match-server-version")
10192+
flags+=("--namespace=")
10193+
two_word_flags+=("-n")
10194+
flags+=("--request-timeout=")
10195+
flags+=("--server=")
10196+
flags+=("--token=")
10197+
flags+=("--user=")
10198+
10199+
must_have_one_flag=()
10200+
must_have_one_noun=()
10201+
noun_aliases=()
10202+
}
10203+
1015810204
_openshift_cli_cluster_up()
1015910205
{
1016010206
last_command="openshift_cli_cluster_up"
@@ -10237,6 +10283,7 @@ _openshift_cli_cluster()
1023710283
last_command="openshift_cli_cluster"
1023810284
commands=()
1023910285
commands+=("down")
10286+
commands+=("status")
1024010287
commands+=("up")
1024110288

1024210289
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)