summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2020-11-16 14:32:12 -0500
committerMatthew Heon <mheon@redhat.com>2020-12-01 12:56:55 -0500
commit594ac4a14658a90ad7bc5541dab6349a0c629a5c (patch)
treed43d561d74c6331166bca6f5101b7d0fd8d8bd1d /libpod/options.go
parent429d9492f85faf4c3a595b9d7b2a38743a4b8e42 (diff)
downloadpodman-594ac4a14658a90ad7bc5541dab6349a0c629a5c.tar.gz
podman-594ac4a14658a90ad7bc5541dab6349a0c629a5c.tar.bz2
podman-594ac4a14658a90ad7bc5541dab6349a0c629a5c.zip
Add API for communicating with Docker volume plugins
Docker provides extensibility through a plugin system, of which several types are available. This provides an initial library API for communicating with one type of plugins, volume plugins. Volume plugins allow for an external service to create and manage a volume on Podman's behalf. This does not integrate the plugin system into Libpod or Podman yet; that will come in subsequent pull requests. Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 0f55f34a3..bd12c0c34 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -1547,12 +1547,19 @@ func WithVolumeDriver(driver string) VolumeCreateOption {
if volume.valid {
return define.ErrVolumeFinalized
}
- // only local driver is possible rn
+
+ // Uncomment when volume plugins are ready for use.
+ // if driver != define.VolumeDriverLocal {
+ // if _, err := plugin.GetVolumePlugin(driver); err != nil {
+ // return err
+ // }
+ // }
+
if driver != define.VolumeDriverLocal {
return define.ErrNotImplemented
-
}
- volume.config.Driver = define.VolumeDriverLocal
+
+ volume.config.Driver = driver
return nil
}
}