mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
e2e: make use of snapshot v1 api in utils.go
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
7823b360b8
commit
0749315d7e
@ -12,7 +12,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1"
|
||||
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
scv1 "k8s.io/api/storage/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
@ -718,7 +718,7 @@ func validatePVCSnapshot(totalCount int, pvcPath, appPath, snapshotPath, pvcClon
|
||||
snap.Spec.Source.PersistentVolumeClaimName = &pvc.Name
|
||||
// create snapshot
|
||||
for i := 0; i < totalCount; i++ {
|
||||
go func(w *sync.WaitGroup, n int, s v1beta1.VolumeSnapshot) {
|
||||
go func(w *sync.WaitGroup, n int, s snapapi.VolumeSnapshot) {
|
||||
s.Name = fmt.Sprintf("%s%d", f.UniqueName, n)
|
||||
wgErrs[n] = createSnapshot(&s, deployTimeout)
|
||||
if wgErrs[n] == nil && kms != "" {
|
||||
@ -890,9 +890,9 @@ func validatePVCSnapshot(totalCount int, pvcPath, appPath, snapshotPath, pvcClon
|
||||
wg.Add(totalCount)
|
||||
// delete snapshot
|
||||
for i := 0; i < totalCount; i++ {
|
||||
go func(w *sync.WaitGroup, n int, s v1beta1.VolumeSnapshot) {
|
||||
go func(w *sync.WaitGroup, n int, s snapapi.VolumeSnapshot) {
|
||||
s.Name = fmt.Sprintf("%s%d", f.UniqueName, n)
|
||||
content := &v1beta1.VolumeSnapshotContent{}
|
||||
content := &snapapi.VolumeSnapshotContent{}
|
||||
var err error
|
||||
if kms != "" {
|
||||
if kmsIsVault(kms) || kms == vaultTokens {
|
||||
|
Loading…
Reference in New Issue
Block a user