@@ -30,7 +30,6 @@ import (
3030
3131	"github.com/golang/glog" 
3232
33- 	"github.com/container-storage-interface/spec/lib/go/csi" 
3433	crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" 
3534	clientset "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned" 
3635	"github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/fake" 
@@ -1103,7 +1102,7 @@ func secret() *v1.Secret {
11031102type  listCall  struct  {
11041103	snapshotID  string 
11051104	// information to return 
1106- 	status       * csi. SnapshotStatus 
1105+ 	readyToUse   bool 
11071106	createTime  int64 
11081107	size        int64 
11091108	err         error 
@@ -1126,7 +1125,7 @@ type createCall struct {
11261125	snapshotId  string 
11271126	timestamp   int64 
11281127	size        int64 
1129- 	status       * csi. SnapshotStatus 
1128+ 	readyToUse   bool 
11301129	err         error 
11311130}
11321131
@@ -1154,10 +1153,10 @@ func (f *fakeCSIConnection) SupportsControllerListSnapshots(ctx context.Context)
11541153	return  false , fmt .Errorf ("Not implemented" )
11551154}
11561155
1157- func  (f  * fakeCSIConnection ) CreateSnapshot (ctx  context.Context , snapshotName  string , volume  * v1.PersistentVolume , parameters  map [string ]string , snapshotterCredentials  map [string ]string ) (string , string , int64 , int64 , * csi. SnapshotStatus , error ) {
1156+ func  (f  * fakeCSIConnection ) CreateSnapshot (ctx  context.Context , snapshotName  string , volume  * v1.PersistentVolume , parameters  map [string ]string , snapshotterCredentials  map [string ]string ) (string , string , int64 , int64 , bool , error ) {
11581157	if  f .createCallCounter  >=  len (f .createCalls ) {
11591158		f .t .Errorf ("Unexpected CSI Create Snapshot call: snapshotName=%s, volume=%v, index: %d, calls: %+v" , snapshotName , volume .Name , f .createCallCounter , f .createCalls )
1160- 		return  "" , "" , 0 , 0 , nil , fmt .Errorf ("unexpected call" )
1159+ 		return  "" , "" , 0 , 0 , false , fmt .Errorf ("unexpected call" )
11611160	}
11621161	call  :=  f .createCalls [f .createCallCounter ]
11631162	f .createCallCounter ++ 
@@ -1184,10 +1183,10 @@ func (f *fakeCSIConnection) CreateSnapshot(ctx context.Context, snapshotName str
11841183	}
11851184
11861185	if  err  !=  nil  {
1187- 		return  "" , "" , 0 , 0 , nil , fmt .Errorf ("unexpected call" )
1186+ 		return  "" , "" , 0 , 0 , false , fmt .Errorf ("unexpected call" )
11881187	}
11891188
1190- 	return  call .driverName , call .snapshotId , call .timestamp , call .size , call .status , call .err 
1189+ 	return  call .driverName , call .snapshotId , call .timestamp , call .size , call .readyToUse , call .err 
11911190}
11921191
11931192func  (f  * fakeCSIConnection ) DeleteSnapshot (ctx  context.Context , snapshotID  string , snapshotterCredentials  map [string ]string ) error  {
@@ -1216,10 +1215,10 @@ func (f *fakeCSIConnection) DeleteSnapshot(ctx context.Context, snapshotID strin
12161215	return  call .err 
12171216}
12181217
1219- func  (f  * fakeCSIConnection ) GetSnapshotStatus (ctx  context.Context , snapshotID  string ) (* csi. SnapshotStatus , int64 , int64 , error ) {
1218+ func  (f  * fakeCSIConnection ) GetSnapshotStatus (ctx  context.Context , snapshotID  string ) (bool , int64 , int64 , error ) {
12201219	if  f .listCallCounter  >=  len (f .listCalls ) {
12211220		f .t .Errorf ("Unexpected CSI list Snapshot call: snapshotID=%s, index: %d, calls: %+v" , snapshotID , f .createCallCounter , f .createCalls )
1222- 		return  nil , 0 , 0 , fmt .Errorf ("unexpected call" )
1221+ 		return  false , 0 , 0 , fmt .Errorf ("unexpected call" )
12231222	}
12241223	call  :=  f .listCalls [f .listCallCounter ]
12251224	f .listCallCounter ++ 
@@ -1231,10 +1230,10 @@ func (f *fakeCSIConnection) GetSnapshotStatus(ctx context.Context, snapshotID st
12311230	}
12321231
12331232	if  err  !=  nil  {
1234- 		return  nil , 0 , 0 , fmt .Errorf ("unexpected call" )
1233+ 		return  false , 0 , 0 , fmt .Errorf ("unexpected call" )
12351234	}
12361235
1237- 	return  call .status , call .createTime , call .size , call .err 
1236+ 	return  call .readyToUse , call .createTime , call .size , call .err 
12381237}
12391238
12401239func  (f  * fakeCSIConnection ) Close () error  {
0 commit comments