aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-08-29 16:14:18 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-09-05 12:29:36 -0400
commitc8193633cd82228b01e789becead410c2a940227 (patch)
tree388b8d87f012fad91661a1d5aa623b6002d4d54f
parentb962b1e3538312f145aea0cf5546ae31f35f635f (diff)
downloadpodman-c8193633cd82228b01e789becead410c2a940227.tar.gz
podman-c8193633cd82228b01e789becead410c2a940227.tar.bz2
podman-c8193633cd82228b01e789becead410c2a940227.zip
Change volume driver and options JSON tags
In upcoming commits, we're going to turn on the backends for these fields. Volumes with these set will act fundamentally differently from other volumes. There will probably be validation required for each field. Until now, though, we've freely allowed creation of volumes with these set - they just did nothing. So we have no idea what could be in the DB with old volumes. Change the struct tags so we don't have to worry about old, unvalidated data. We'll start fresh with new volumes. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
-rw-r--r--libpod/volume.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/volume.go b/libpod/volume.go
index abfa7b3f4..e6e92c3ac 100644
--- a/libpod/volume.go
+++ b/libpod/volume.go
@@ -26,7 +26,7 @@ type VolumeConfig struct {
Labels map[string]string `json:"labels"`
// The volume driver. Empty string or local does not activate a volume
// driver, all other volumes will.
- Driver string `json:"driver"`
+ Driver string `json:"volumeDriver"`
// The location the volume is mounted at.
MountPoint string `json:"mountPoint"`
// Time the volume was created.
@@ -34,7 +34,7 @@ type VolumeConfig struct {
// Options to pass to the volume driver. For the local driver, this is
// a list of mount options. For other drivers, they are passed to the
// volume driver handling the volume.
- Options map[string]string `json:"options"`
+ Options map[string]string `json:"volumeOptions"`
// Whether this volume was created for a specific container and will be
// removed with it.
IsCtrSpecific bool `json:"ctrSpecific"`