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>
This commit is contained in:
Matthew Heon 2019-08-29 16:14:18 -04:00
parent b962b1e353
commit c8193633cd
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ type VolumeConfig struct {
Labels map[string]string `json:"labels"` Labels map[string]string `json:"labels"`
// The volume driver. Empty string or local does not activate a volume // The volume driver. Empty string or local does not activate a volume
// driver, all other volumes will. // driver, all other volumes will.
Driver string `json:"driver"` Driver string `json:"volumeDriver"`
// The location the volume is mounted at. // The location the volume is mounted at.
MountPoint string `json:"mountPoint"` MountPoint string `json:"mountPoint"`
// Time the volume was created. // 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 // 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 // a list of mount options. For other drivers, they are passed to the
// volume driver handling the volume. // 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 // Whether this volume was created for a specific container and will be
// removed with it. // removed with it.
IsCtrSpecific bool `json:"ctrSpecific"` IsCtrSpecific bool `json:"ctrSpecific"`