aboutsummaryrefslogtreecommitdiff
path: root/libpod/volume.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-29 14:01:52 -0800
committerGitHub <noreply@github.com>2020-01-29 14:01:52 -0800
commiteb283657036f5dc69c926432252768d158989100 (patch)
tree8863767789f946b185e074b032dce2fc0d686385 /libpod/volume.go
parent0e21fc88604fd2fc12fbbbf5d0f162081aa5dda2 (diff)
parent5d93c731afd5b21d88c025069da0e82455f09445 (diff)
downloadpodman-eb283657036f5dc69c926432252768d158989100.tar.gz
podman-eb283657036f5dc69c926432252768d158989100.tar.bz2
podman-eb283657036f5dc69c926432252768d158989100.zip
Merge pull request #5018 from mheon/new_anon_field
Deprecate & remove IsCtrSpecific in favor of IsAnon
Diffstat (limited to 'libpod/volume.go')
-rw-r--r--libpod/volume.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/libpod/volume.go b/libpod/volume.go
index c4771bbb8..1ffed872e 100644
--- a/libpod/volume.go
+++ b/libpod/volume.go
@@ -38,9 +38,8 @@ type VolumeConfig struct {
// a list of mount options. For other drivers, they are passed to the
// volume driver handling the volume.
Options map[string]string `json:"volumeOptions,omitempty"`
- // Whether this volume was created for a specific container and will be
- // removed with it.
- IsCtrSpecific bool `json:"ctrSpecific"`
+ // Whether this volume is anonymous (will be removed on container exit)
+ IsAnon bool `json:"isAnon"`
// UID the volume will be created as.
UID int `json:"uid"`
// GID the volume will be created as.
@@ -106,11 +105,10 @@ func (v *Volume) Options() map[string]string {
return options
}
-// IsCtrSpecific returns whether this volume was created specifically for a
-// given container. Images with this set to true will be removed when the
-// container is removed with the Volumes parameter set to true.
-func (v *Volume) IsCtrSpecific() bool {
- return v.config.IsCtrSpecific
+// Anonymous returns whether this volume is anonymous. Anonymous volumes were
+// created with a container, and will be removed when that container is removed.
+func (v *Volume) Anonymous() bool {
+ return v.config.IsAnon
}
// UID returns the UID the volume will be created as.