Added basic Flexvolume dynamic plugin discovery e2e test; added Flexvolume prober unit tests.

This commit is contained in:
Cheng Xing
2017-08-25 19:32:17 -07:00
parent 8618e28194
commit 52a77aaccd
10 changed files with 494 additions and 41 deletions

View File

@@ -53,7 +53,13 @@ type flexVolumeAttachablePlugin struct {
var _ volume.AttachableVolumePlugin = &flexVolumeAttachablePlugin{}
var _ volume.PersistentVolumePlugin = &flexVolumePlugin{}
func NewFlexVolumePlugin(pluginDir, name string) (volume.VolumePlugin, error) {
type PluginFactory interface {
NewFlexVolumePlugin(pluginDir, driverName string) (volume.VolumePlugin, error)
}
type pluginFactory struct{}
func (pluginFactory) NewFlexVolumePlugin(pluginDir, name string) (volume.VolumePlugin, error) {
execPath := path.Join(pluginDir, name)
driverName := utilstrings.UnescapePluginName(name)