Commit Graph

21 Commits

Author SHA1 Message Date
Kai Qiang Wu(Kennan) 60ffd6c880 Make volume ls output order
Fixes: #20384
Add order support for volume ls to make it easy
to external users to consume.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-02-17 09:01:27 +00:00
Vincent Demeester 382c96ee7b Add a getPrefixAndSlashFromDaemonPlatform …
… to limit code duplication in integration tests :P

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-02-03 15:16:00 +01:00
David Calavera 1431b623a4 Make volume dangling filter return only used volumes with `dangling=false`.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-25 16:26:51 -05:00
Kai Qiang Wu(Kennan) 66c253cbf7 Fix volume filter validation
Fixes: #18890
This fix add same filter validation logic as images. We should
add such check to make sure filters work make sense to end-users

Right now, we keep old use 1 as filter, but in long term, it should
be have same interface checking as images, it could be improved in
other patches.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-01-18 10:07:42 +00:00
Brian Goff d3eca4451d Move responsibility of ls/inspect to volume driver
Makes `docker volume ls` and `docker volume inspect` ask the volume
drivers rather than only using what is cached locally.

Previously in order to use a volume from an external driver, one would
either have to use `docker volume create` or have a container that is
already using that volume for it to be visible to the other volume
API's.

For keeping uniqueness of volume names in the daemon, names are bound to
a driver on a first come first serve basis. If two drivers have a volume
with the same name, the first one is chosen, and a warning is logged
about the second one.

Adds 2 new methods to the plugin API, `List` and `Get`.
If a plugin does not implement these endpoints, a user will not be able
to find the specified volumes as well requests go through the drivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-05 16:28:38 -05:00
Justas Brazauskas 927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
David Calavera 57b6796304 Implement all inspect commands with the new inspector interface.
It makes the behavior completely consistent across commands.
It adds tests to check that execution stops when an element is not
found.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:01 -05:00
Vincent Demeester d125ddaeda Fix DockerSuite.TestVolumeCliInspectMulti
Use dockerCmdWithError now that it actually returns an error code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-07 08:34:18 +01:00
Sebastiaan van Stijn 5b4734aaa5 Merge pull request #17788 from haoshuwei/modify-volume-inspect-multi
Modify docker volume inspect to return existed volumes and the names of the unexsited volumes
2015-12-06 14:03:46 +01:00
David Calavera b9d30280f6 Return error code when `volume inspect` fails with a template.
Following `docker inspect` conventions:

- Keep partial info in a buffer to not print incomplete template outputs.
- Break execution when template parsing or decoding fail.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-03 13:22:55 -05:00
Shuwei Hao 6295345005 Modify docker volume inspect to return existed volumes
Signed-off-by: Shuwei Hao <haoshuwei24@gmail.com>
2015-12-01 01:43:02 +00:00
Bryan Boreham 899caaca9c Fix spelling of 'existent'
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2015-11-25 13:45:37 +00:00
John Howard 8209571982 Windows: Remove check for volume support
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-13 13:02:30 -08:00
John Howard 2af5034ce8 Windows: Volume integration tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-26 14:33:28 -07:00
Kun Zhang 0ff3123eba volume create error on conflict option
Signed-off-by: Kun Zhang <zkazure@gmail.com>
2015-10-12 11:16:39 +08:00
Brian Goff 2feebd95d3 Make `docker volume` behave like `docker network`
Before, typing `docker volume` with no args would forward to the handler
for `docker volume ls`, except the flags for the `ls` subcommand were
not supported.
Instead just print the cmd usage.

This makes the behavior of the `docker volume` subcommand behave exactly
like the `docker network` subcommand.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-07 13:36:46 -04:00
Vincent Demeester 5109071706 Add unit tests for integration cli utils function
- utils_test.go and docker_utils_test.go
- Moved docker related function to docker_utils.go
- add a test for integration-cli/checker

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-09 15:36:44 +02:00
Sebastiaan van Stijn 1cbf9047b3 Fix docker volume dangling filter
The docker volume ls -f dangling=true filter was
inverted; the filtered results actually returned all
non-dangling volumes.

This fixes the filter and adds some integration tests
to test the correct behavior.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-09-06 20:17:56 +02:00
John Howard f9a3558a9d Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-04 12:32:40 -07:00
Brian Goff 38da43184d Fix `docker volume invalid` so it displays usage
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-27 09:46:05 -04:00
Brian Goff b3b7eb2723 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-26 13:37:52 -04:00