Skip to content
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

Make volume dangling filter return only used volumes with dangling=false. #19671

Merged
merged 2 commits into from Jan 26, 2016

Conversation

calavera
Copy link
Contributor

docker volume ls --dangling=true returns only volumes that are not used.
docker volume ls --dangling=false returns only volumes that are used.
docker volume ls returns all the volumes.

Copies the behavior of #19326.
Closes #19153.

/cc @cpuguy83, @HackToday

Signed-off-by: David Calavera david.calavera@gmail.com

…alse`.

Signed-off-by: David Calavera <david.calavera@gmail.com>
@cpuguy83
Copy link
Member

So this changes it so you can't filter to list only the volumes that are in use?

@calavera
Copy link
Contributor Author

docker volume ls --dangling=true returns only volumes that are not used.
docker volume ls --dangling=false returns only volumes that are used.
docker volume ls returns all the volumes.

Does this make more sense @cpuguy83 ?

@HackToday
Copy link
Contributor

+1 it, code is OK for me.

@albers
Copy link
Member

albers commented Jan 26, 2016

docker volume list

docker volume ls ! 😀
Nice feature!

Signed-off-by: David Calavera <david.calavera@gmail.com>
@calavera
Copy link
Contributor Author

@albers can you take a look at the bash completion fix?

// Same as above, but explicitly disabling dangling
c.Assert(out, checker.Contains, "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output"))
// Explicitly disabling dangling
c.Assert(out, check.Not(checker.Contains), "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess what I don't quite understand is this change in case.... I suppose this false wasn't working before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before this change false meant all volumes, dangling and undangling.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, makes sense.

@cpuguy83
Copy link
Member

LGTM

@tiborvass
Copy link
Contributor

LGTM

@cpuguy83
Copy link
Member

All 💚

cpuguy83 added a commit that referenced this pull request Jan 26, 2016
Make volume dangling filter return only used volumes with `dangling=false`.
@cpuguy83 cpuguy83 merged commit 146e49b into moby:master Jan 26, 2016
@albers
Copy link
Member

albers commented Jan 27, 2016

@calavera bash completion is almost perfect. There is a trick that automatically appends the = after the dangling keyword. As this is already merged, I'll create a PR with this improvement.

Thakns for taking care of the completion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants