Skip to content

Commit

Permalink
Implement cluster status command
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Minter committed Sep 30, 2016
1 parent b6ba8ec commit adae020
Show file tree
Hide file tree
Showing 17 changed files with 565 additions and 45 deletions.
45 changes: 45 additions & 0 deletions contrib/completions/bash/oc
Original file line number Diff line number Diff line change
Expand Up @@ -5323,6 +5323,50 @@ _oc_cluster_down()
noun_aliases=()
}

_oc_cluster_status()
{
last_command="oc_cluster_status"
commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--docker-machine=")
local_nonpersistent_flags+=("--docker-machine=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
flags_completion+=("_filedir")
flags+=("--client-certificate=")
flags_with_completion+=("--client-certificate")
flags_completion+=("_filedir")
flags+=("--client-key=")
flags_with_completion+=("--client-key")
flags_completion+=("_filedir")
flags+=("--cluster=")
flags+=("--config=")
flags_with_completion+=("--config")
flags_completion+=("_filedir")
flags+=("--context=")
flags+=("--insecure-skip-tls-verify")
flags+=("--log-flush-frequency=")
flags+=("--loglevel=")
flags+=("--logspec=")
flags+=("--match-server-version")
flags+=("--namespace=")
two_word_flags+=("-n")
flags+=("--server=")
flags+=("--token=")
flags+=("--user=")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_oc_cluster_up()
{
last_command="oc_cluster_up"
Expand Down Expand Up @@ -5401,6 +5445,7 @@ _oc_cluster()
last_command="oc_cluster"
commands=()
commands+=("down")
commands+=("status")
commands+=("up")

flags=()
Expand Down
46 changes: 46 additions & 0 deletions contrib/completions/bash/openshift
Original file line number Diff line number Diff line change
Expand Up @@ -9796,6 +9796,51 @@ _openshift_cli_cluster_down()
noun_aliases=()
}

_openshift_cli_cluster_status()
{
last_command="openshift_cli_cluster_status"
commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--docker-machine=")
local_nonpersistent_flags+=("--docker-machine=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
flags_completion+=("_filedir")
flags+=("--client-certificate=")
flags_with_completion+=("--client-certificate")
flags_completion+=("_filedir")
flags+=("--client-key=")
flags_with_completion+=("--client-key")
flags_completion+=("_filedir")
flags+=("--cluster=")
flags+=("--config=")
flags_with_completion+=("--config")
flags_completion+=("_filedir")
flags+=("--context=")
flags+=("--google-json-key=")
flags+=("--insecure-skip-tls-verify")
flags+=("--log-flush-frequency=")
flags+=("--loglevel=")
flags+=("--logspec=")
flags+=("--match-server-version")
flags+=("--namespace=")
two_word_flags+=("-n")
flags+=("--server=")
flags+=("--token=")
flags+=("--user=")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_openshift_cli_cluster_up()
{
last_command="openshift_cli_cluster_up"
Expand Down Expand Up @@ -9875,6 +9920,7 @@ _openshift_cli_cluster()
last_command="openshift_cli_cluster"
commands=()
commands+=("down")
commands+=("status")
commands+=("up")

flags=()
Expand Down
45 changes: 45 additions & 0 deletions contrib/completions/zsh/oc
Original file line number Diff line number Diff line change
Expand Up @@ -5484,6 +5484,50 @@ _oc_cluster_down()
noun_aliases=()
}

_oc_cluster_status()
{
last_command="oc_cluster_status"
commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--docker-machine=")
local_nonpersistent_flags+=("--docker-machine=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
flags_completion+=("_filedir")
flags+=("--client-certificate=")
flags_with_completion+=("--client-certificate")
flags_completion+=("_filedir")
flags+=("--client-key=")
flags_with_completion+=("--client-key")
flags_completion+=("_filedir")
flags+=("--cluster=")
flags+=("--config=")
flags_with_completion+=("--config")
flags_completion+=("_filedir")
flags+=("--context=")
flags+=("--insecure-skip-tls-verify")
flags+=("--log-flush-frequency=")
flags+=("--loglevel=")
flags+=("--logspec=")
flags+=("--match-server-version")
flags+=("--namespace=")
two_word_flags+=("-n")
flags+=("--server=")
flags+=("--token=")
flags+=("--user=")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_oc_cluster_up()
{
last_command="oc_cluster_up"
Expand Down Expand Up @@ -5562,6 +5606,7 @@ _oc_cluster()
last_command="oc_cluster"
commands=()
commands+=("down")
commands+=("status")
commands+=("up")

flags=()
Expand Down
46 changes: 46 additions & 0 deletions contrib/completions/zsh/openshift
Original file line number Diff line number Diff line change
Expand Up @@ -9957,6 +9957,51 @@ _openshift_cli_cluster_down()
noun_aliases=()
}

_openshift_cli_cluster_status()
{
last_command="openshift_cli_cluster_status"
commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--docker-machine=")
local_nonpersistent_flags+=("--docker-machine=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
flags_completion+=("_filedir")
flags+=("--client-certificate=")
flags_with_completion+=("--client-certificate")
flags_completion+=("_filedir")
flags+=("--client-key=")
flags_with_completion+=("--client-key")
flags_completion+=("_filedir")
flags+=("--cluster=")
flags+=("--config=")
flags_with_completion+=("--config")
flags_completion+=("_filedir")
flags+=("--context=")
flags+=("--google-json-key=")
flags+=("--insecure-skip-tls-verify")
flags+=("--log-flush-frequency=")
flags+=("--loglevel=")
flags+=("--logspec=")
flags+=("--match-server-version")
flags+=("--namespace=")
two_word_flags+=("-n")
flags+=("--server=")
flags+=("--token=")
flags+=("--user=")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_openshift_cli_cluster_up()
{
last_command="openshift_cli_cluster_up"
Expand Down Expand Up @@ -10036,6 +10081,7 @@ _openshift_cli_cluster()
last_command="openshift_cli_cluster"
commands=()
commands+=("down")
commands+=("status")
commands+=("up")

flags=()
Expand Down
22 changes: 20 additions & 2 deletions docs/generated/oc_by_example_content.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -938,16 +938,34 @@ Stop OpenShift on Docker
[options="nowrap"]
----
# Stop local Docker cluster
# Stop local OpenShift cluster
oc cluster down
# Stop cluster running on Docker machine 'mymachine'
# Stop OpenShift cluster running on Docker machine 'mymachine'
oc cluster down --docker-machine=mymachine
----
====


== oc cluster status
Show OpenShift on Docker status

====
[options="nowrap"]
----
# See status of local OpenShift cluster
oc cluster status
# See status of OpenShift cluster running on Docker machine 'mymachine'
oc cluster status --docker-machine=mymachine
----
====


== oc cluster up
Start OpenShift on Docker with reasonable defaults

Expand Down
1 change: 1 addition & 0 deletions docs/man/man1/.files_generated_oc
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ oc-autoscale.1
oc-build-logs.1
oc-cancel-build.1
oc-cluster-down.1
oc-cluster-status.1
oc-cluster-up.1
oc-cluster.1
oc-completion.1
Expand Down
1 change: 1 addition & 0 deletions docs/man/man1/.files_generated_openshift
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ openshift-cli-autoscale.1
openshift-cli-build-logs.1
openshift-cli-cancel-build.1
openshift-cli-cluster-down.1
openshift-cli-cluster-status.1
openshift-cli-cluster-up.1
openshift-cli-cluster.1
openshift-cli-completion.1
Expand Down
4 changes: 2 additions & 2 deletions docs/man/man1/oc-cluster-down.1
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ same machine using the \-\-docker\-machine argument.

.nf

# Stop local Docker cluster
# Stop local OpenShift cluster
oc cluster down

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


Expand Down
Loading

0 comments on commit adae020

Please sign in to comment.