Skip to content

Commit 503cbcb

Browse files
committed
fix(ksyun): snapshot sync
1 parent 800b535 commit 503cbcb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/multicloud/ksyun/snapshot.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ func (region *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error) {
142142
ret := []cloudprovider.ICloudSnapshot{}
143143
for i := 0; i < len(snapshots); i += 1 {
144144
snapshots[i].region = region
145-
ret[i] = &snapshots[i]
145+
ret = append(ret, &snapshots[i])
146146
}
147147
return ret, nil
148148
}
149149

150-
func (self *SSnapshot) Delete() error {
151-
return self.region.DeleteSnapshot(self.SnapshotId)
150+
func (snap *SSnapshot) Delete() error {
151+
return snap.region.DeleteSnapshot(snap.SnapshotId)
152152
}
153153

154154
func (region *SRegion) CreateSnapshot(diskId, name, desc string) (*SSnapshot, error) {

0 commit comments

Comments
 (0)