Adds method CanAttach() to check plugin attachability

This commit is contained in:
Vladimir Vivien
2018-10-19 15:07:33 -04:00
parent 5b6a23f3af
commit 0a653b3b80
17 changed files with 128 additions and 21 deletions

View File

@@ -310,6 +310,10 @@ func (plugin *TestPlugin) NewDetacher() (volume.Detacher, error) {
return &detacher, nil
}
func (plugin *TestPlugin) CanAttach(spec *volume.Spec) bool {
return true
}
func (plugin *TestPlugin) NewDeviceUnmounter() (volume.DeviceUnmounter, error) {
return plugin.NewDetacher()
}