Skip to content

Commit e41f790

Browse files
committed
Method name changed from WaitForAttachmentState to WaitForVolumeState
1 parent a3daaaf commit e41f790

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pkg/cloud/cloud_interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type Cloud interface {
2222
AttachDisk(volumeID string, nodeID string) (err error)
2323
DetachDisk(volumeID string, nodeID string) (err error)
2424
ResizeDisk(volumeID string, reqSize int64) (newSize int64, err error)
25-
WaitForAttachmentState(volumeID, state string) error
25+
WaitForVolumeState(volumeID, state string) error
2626
GetDiskByName(name string) (disk *Disk, err error)
2727
GetDiskByID(volumeID string) (disk *Disk, err error)
2828
GetPVMInstanceByName(instanceName string) (instance *PVMInstance, err error)

pkg/cloud/powervs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (p *powerVSCloud) CreateDisk(volumeName string, diskOptions *DiskOptions) (
250250
return nil, err
251251
}
252252

253-
err = p.WaitForAttachmentState(*v.VolumeID, VolumeAvailableState)
253+
err = p.WaitForVolumeState(*v.VolumeID, VolumeAvailableState)
254254
if err != nil {
255255
return nil, err
256256
}
@@ -273,7 +273,7 @@ func (p *powerVSCloud) AttachDisk(volumeID string, nodeID string) (err error) {
273273
return err
274274
}
275275

276-
err = p.WaitForAttachmentState(volumeID, VolumeInUseState)
276+
err = p.WaitForVolumeState(volumeID, VolumeInUseState)
277277
if err != nil {
278278
return err
279279
}
@@ -285,7 +285,7 @@ func (p *powerVSCloud) DetachDisk(volumeID string, nodeID string) (err error) {
285285
if err != nil {
286286
return err
287287
}
288-
err = p.WaitForAttachmentState(volumeID, VolumeAvailableState)
288+
err = p.WaitForVolumeState(volumeID, VolumeAvailableState)
289289
if err != nil {
290290
return err
291291
}
@@ -314,7 +314,7 @@ func (p *powerVSCloud) ResizeDisk(volumeID string, reqSize int64) (newSize int64
314314
return int64(*v.Size), nil
315315
}
316316

317-
func (p *powerVSCloud) WaitForAttachmentState(volumeID, state string) error {
317+
func (p *powerVSCloud) WaitForVolumeState(volumeID, state string) error {
318318
err := wait.PollImmediate(PollInterval, PollTimeout, func() (bool, error) {
319319
v, err := p.volClient.Get(volumeID, p.cloudInstanceID, TIMEOUT)
320320
if err != nil {

tests/e2e/pre_provisioning.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var _ = Describe("[powervs-csi-e2e]Pre-Provisioned", func() {
9494
AfterEach(func() {
9595
skipManuallyDeletingVolume = true
9696
if !skipManuallyDeletingVolume {
97-
err := cloud.WaitForAttachmentState(volumeID, "detached")
97+
err := cloud.WaitForVolumeState(volumeID, "detached")
9898
if err != nil {
9999
Fail(fmt.Sprintf("could not detach volume %q: %v", volumeID, err))
100100
}

0 commit comments

Comments
 (0)