New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow `docker inspect` on all types #23614

Merged
merged 1 commit into from Aug 26, 2016

Conversation

Projects
None yet
@icecrime
Contributor

icecrime commented Jun 16, 2016

Allow top-level docker inspect command to inspect any kind of resources. The rationale is that inspect already does images and containers for historical reasons, so it might as well support them all. More specialized inspects (e.g., docker network inspect) should exist to support type specific options.

Depends on docker/engine-api#283.

@icecrime icecrime changed the title from Inspect services to Allow `docker inspect` on all types Jun 16, 2016

@icecrime

This comment has been minimized.

Contributor

icecrime commented Jun 16, 2016

I should add that this request comes straight from our BDFL.

@icecrime icecrime added this to the 1.12.0 milestone Jun 16, 2016

@vdemeester

This comment has been minimized.

Member

vdemeester commented Jun 16, 2016

Questions :

  • Node and Swarm have inspects too, shouldn't they be here too ?
  • InspectAll (a.k.a without --type=…) is gonna have a weird behavior now : if you don't give the type, it will only look for containers, and images. Maybe it should go through all of them (with an order to decide). wdyt ?
@justincormack

This comment has been minimized.

Contributor

justincormack commented Jun 16, 2016

Makes sense to me.

@icecrime

This comment has been minimized.

Contributor

icecrime commented Jun 16, 2016

@vdemeester True! Let me update this sometime today :-) Thanks

@vieux

This comment has been minimized.

Collaborator

vieux commented Jun 16, 2016

@icecrime I think you can update engine-api to fix vendor (good luck)

@vieux

This comment has been minimized.

Collaborator

vieux commented Jun 16, 2016

@icecrime @vdemeester I won't do Swarm for now, only Node.

@icecrime icecrime force-pushed the icecrime:inspect_services branch 2 times, most recently from f4f6232 to 22bd0a0 Jun 16, 2016

@icecrime

This comment has been minimized.

Contributor

icecrime commented Jun 16, 2016

Refactored the code and made it available to inspect all (but nodes!): still requires docker/engine-api#284 to work properly, as cascading between types is based off the ability to identify not found errors.

@icecrime icecrime force-pushed the icecrime:inspect_services branch 2 times, most recently from 308c5ae to bc9bc55 Jun 16, 2016

@vieux

This comment has been minimized.

Collaborator

vieux commented Jun 17, 2016

LGTM

@thaJeztah

This comment has been minimized.

Member

thaJeztah commented Jun 17, 2016

@icecrime needs a rebase

@icecrime icecrime force-pushed the icecrime:inspect_services branch from bc9bc55 to b3692fc Jun 17, 2016

@icecrime

This comment has been minimized.

Contributor

icecrime commented Jun 17, 2016

Rebased and hopefully good now.

@thaJeztah

This comment has been minimized.

Member

thaJeztah commented Jun 17, 2016

@icecrime tests are failing 😢

@icecrime icecrime force-pushed the icecrime:inspect_services branch from b3692fc to b16f641 Jun 17, 2016

@icecrime

This comment has been minimized.

Contributor

icecrime commented Aug 26, 2016

Thank you all <3

@icecrime icecrime merged commit 6e85b81 into moby:master Aug 26, 2016

7 checks passed

docker/dco-signed All commits signed
Details
documentation success
Details
experimental Jenkins build Docker-PRs-experimental 22765 has succeeded
Details
janky Jenkins build Docker-PRs 31383 has succeeded
Details
userns Jenkins build Docker-PRs-userns 13407 has succeeded
Details
win2lin Jenkins build Docker-PRs-Win2Lin 30069 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 2158 has succeeded
Details

@thaJeztah thaJeztah added this to the 1.13.0 milestone Sep 12, 2016

albers added a commit to albers/moby that referenced this pull request Sep 28, 2016

Align bash completion of several items to completion of nodes and
services

This enhances completion of networks, volumes, plugins, runtimes
and local interfaces so that they are consistent with the principles
introduced in the completions of nodes and services.

This serves as a preparation for implementing bash completion for
the enhanced functionality of docker inspeckt (moby#23614).

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 4, 2016

Align bash completion of several items to completion of nodes and
services

This enhances completion of networks, volumes, plugins, runtimes
and local interfaces so that they are consistent with the principles
introduced in the completions of nodes and services.

This serves as a preparation for implementing bash completion for
the enhanced functionality of docker inspeckt (moby#23614).

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 8, 2016

Align bash completion of several items to completion of nodes and
services

This enhances completion of networks, volumes, plugins, runtimes
and local interfaces so that they are consistent with the principles
introduced in the completions of nodes and services.

This serves as a preparation for implementing bash completion for
the enhanced functionality of docker inspeckt (moby#23614).

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 9, 2016

Align bash completion of several items to completion of nodes and
services

This enhances completion of networks, volumes, plugins, runtimes
and local interfaces so that they are consistent with the principles
introduced in the completions of nodes and services.

This serves as a preparation for implementing bash completion for
the enhanced functionality of docker inspeckt (moby#23614).

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 11, 2016

Align bash completion of several items to completion of nodes and
services

This enhances completion of networks, volumes, plugins, runtimes
and local interfaces so that they are consistent with the principles
introduced in the completions of nodes and services.

This serves as a preparation for implementing bash completion for
the enhanced functionality of docker inspeckt (moby#23614).

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 13, 2016

Align bash completion of several items to completion of nodes and
services

This enhances completion of networks, volumes, plugins, runtimes
and local interfaces so that they are consistent with the principles
introduced in the completions of nodes and services.

This serves as a preparation for implementing bash completion for
the enhanced functionality of docker inspeckt (moby#23614).

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 22, 2016

Delegate bash completion for `docker {container,image} inspect` to pa…
…rameterized function

In moby#23614`docker inspect` was semantically enhanced to inspect "everything".
Therefore moving its logic to `_docker_container_inspect` was not correct.

This commit moves it back to its original top-level location (`_docker_inspect`)
so that it can be called by `_docker_{container,image}_inspect and more (will
be added in follow-up PRs).
Parameterization was added in order to get caller-specific behavior.

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 24, 2016

Delegate bash completion for `docker {container,image} inspect` to pa…
…rameterized function

In moby#23614`docker inspect` was semantically enhanced to inspect "everything".
Therefore moving its logic to `_docker_container_inspect` was not correct.

This commit moves it back to its original top-level location (`_docker_inspect`)
so that it can be called by `_docker_{container,image}_inspect and more (will
be added in follow-up PRs).
Parameterization was added in order to get caller-specific behavior.

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 24, 2016

Delegate bash completion for `docker {container,image} inspect` to pa…
…rameterized function

In moby#23614`docker inspect` was semantically enhanced to inspect "everything".
Therefore moving its logic to `_docker_container_inspect` was not correct.

This commit moves it back to its original top-level location (`_docker_inspect`)
so that it can be called by `_docker_{container,image}_inspect and more (will
be added in follow-up PRs).
Parameterization was added in order to get caller-specific behavior.

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 25, 2016

Delegate bash completion for `docker {container,image} inspect` to pa…
…rameterized function

In moby#23614`docker inspect` was semantically enhanced to inspect "everything".
Therefore moving its logic to `_docker_container_inspect` was not correct.

This commit moves it back to its original top-level location (`_docker_inspect`)
so that it can be called by `_docker_{container,image}_inspect` and others (will
be added in follow-up PRs).
Parameterization was added in order to get caller-specific behavior.

Signed-off-by: Harald Albers <github@albersweb.de>

albers added a commit to albers/moby that referenced this pull request Oct 25, 2016

Delegate bash completion for `docker {container,image} inspect` to pa…
…rameterized function

In moby#23614 `docker inspect` was semantically enhanced to inspect "everything".
Therefore moving its logic to `_docker_container_inspect` was not correct.

This commit moves it back to its original top-level location (`_docker_inspect`)
so that it can be called by `_docker_{container,image}_inspect` and others (will
be added in follow-up PRs).
Parameterization was added in order to get caller-specific behavior.

Signed-off-by: Harald Albers <github@albersweb.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment