mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-26 09:54:23 +00:00
Move validation of plugins (#1953)
* Move validation of plugins Signed-off-by: Carlisia <carlisia@vmware.com>
This commit is contained in:
@@ -34,7 +34,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/cloudprovider"
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -80,7 +80,7 @@ func isValidSignatureVersion(signatureVersion string) bool {
|
||||
}
|
||||
|
||||
func (o *ObjectStore) Init(config map[string]string) error {
|
||||
if err := cloudprovider.ValidateObjectStoreConfigKeys(config,
|
||||
if err := framework.ValidateObjectStoreConfigKeys(config,
|
||||
regionKey,
|
||||
s3URLKey,
|
||||
publicURLKey,
|
||||
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/cloudprovider"
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework"
|
||||
)
|
||||
|
||||
const regionKey = "region"
|
||||
@@ -68,7 +68,7 @@ func NewVolumeSnapshotter(logger logrus.FieldLogger) *VolumeSnapshotter {
|
||||
}
|
||||
|
||||
func (b *VolumeSnapshotter) Init(config map[string]string) error {
|
||||
if err := cloudprovider.ValidateVolumeSnapshotterConfigKeys(config, regionKey, credentialProfileKey); err != nil {
|
||||
if err := framework.ValidateVolumeSnapshotterConfigKeys(config, regionKey, credentialProfileKey); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user