mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
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>
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user