Issue 6693: partially fail restore if CSI snapshot is involved but CSI feature is not ready

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
Lyndon-Li
2023-11-10 12:29:05 +08:00
parent 2841be7681
commit efc5319c1c
7 changed files with 252 additions and 9 deletions

View File

@@ -27,17 +27,21 @@ type PluginFinder interface {
Find(kind common.PluginKind, name string) bool
}
type Verifier struct {
type Verifier interface {
Verify(name string) (bool, error)
}
type verifier struct {
finder PluginFinder
}
func NewVerifier(finder PluginFinder) *Verifier {
return &Verifier{
func NewVerifier(finder PluginFinder) Verifier {
return &verifier{
finder: finder,
}
}
func (v *Verifier) Verify(name string) (bool, error) {
func (v *verifier) Verify(name string) (bool, error) {
enabled := IsEnabled(name)
switch name {