1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Show volume options for docker volume inspect

This fix tries to address the issue raised in 25545 where
volume options at the creation time is not showed up
in `docker volume inspect`.

This fix adds the field `Options` in `Volume` type and
persist the options in volume db so that `volume inspect`
could display the options.

This fix adds a couple of test cases to cover the changes.

This fix fixes 25545.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2016-09-17 12:32:31 -07:00
parent 1b677816f5
commit 9ce8aac55e
8 changed files with 85 additions and 32 deletions

View file

@ -68,14 +68,10 @@ type Volume interface {
Status() map[string]interface{}
}
// LabeledVolume wraps a Volume with user-defined labels
type LabeledVolume interface {
// DetailedVolume wraps a Volume with user-defined labels, options, and cluster scope (e.g., `local` or `global`)
type DetailedVolume interface {
Labels() map[string]string
Volume
}
// ScopedVolume wraps a volume with a cluster scope (e.g., `local` or `global`)
type ScopedVolume interface {
Options() map[string]string
Scope() string
Volume
}