From 7823b360b8fc23731af078aba01b0062e6843223 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 23 Jun 2021 13:05:24 +0530 Subject: [PATCH] e2e: make use of snapshot v1 api in cephfs_helper.go Signed-off-by: Humble Chirammal --- e2e/cephfs_helper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/cephfs_helper.go b/e2e/cephfs_helper.go index dd2b94628..913e080cf 100644 --- a/e2e/cephfs_helper.go +++ b/e2e/cephfs_helper.go @@ -7,7 +7,7 @@ import ( "regexp" "strings" - snapapi "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" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" @@ -177,11 +177,11 @@ func getSnapName(snapNamespace, snapName string) (string, error) { if err != nil { return "", err } - snap, err := sclient.SnapshotV1beta1().VolumeSnapshots(snapNamespace).Get(context.TODO(), snapName, metav1.GetOptions{}) + snap, err := sclient.VolumeSnapshots(snapNamespace).Get(context.TODO(), snapName, metav1.GetOptions{}) if err != nil { return "", fmt.Errorf("failed to get volumesnapshot: %w", err) } - sc, err := sclient.SnapshotV1beta1().VolumeSnapshotContents().Get(context.TODO(), *snap.Status.BoundVolumeSnapshotContentName, metav1.GetOptions{}) + sc, err := sclient.VolumeSnapshotContents().Get(context.TODO(), *snap.Status.BoundVolumeSnapshotContentName, metav1.GetOptions{}) if err != nil { return "", fmt.Errorf("failed to get volumesnapshotcontent: %w", err) }