Move validation of plugins (#1953)

* Move validation of plugins

Signed-off-by: Carlisia <carlisia@vmware.com>
This commit is contained in:
KubeKween
2019-10-09 10:48:37 -06:00
committed by Steve Kriss
parent 557d170541
commit d868b71e29
8 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -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,
+2 -2
View File
@@ -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
}