diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 2c53133ce48..ccdee2bb84f 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -155,11 +155,11 @@ type Volumes interface { // Attach the disk to the specified instance // instanceName can be empty to mean "the instance on which we are running" // Returns the device (e.g. /dev/xvdf) where we attached the volume - AttachDisk(instanceName string, volumeName string, readOnly bool) (string, error) + AttachDisk(diskName string, instanceName string, readOnly bool) (string, error) // Detach the disk from the specified instance // instanceName can be empty to mean "the instance on which we are running" // Returns the device where the volume was attached - DetachDisk(instanceName string, volumeName string) (string, error) + DetachDisk(diskName string, instanceName string) (string, error) // Create a volume with the specified options CreateDisk(volumeOptions *VolumeOptions) (volumeName string, err error) @@ -1172,7 +1172,7 @@ func (aws *AWSCloud) getAwsInstance(nodeName string) (*awsInstance, error) { } // Implements Volumes.AttachDisk -func (c *AWSCloud) AttachDisk(instanceName string, diskName string, readOnly bool) (string, error) { +func (c *AWSCloud) AttachDisk(diskName string, instanceName string, readOnly bool) (string, error) { disk, err := newAWSDisk(c, diskName) if err != nil { return "", err @@ -1237,7 +1237,7 @@ func (c *AWSCloud) AttachDisk(instanceName string, diskName string, readOnly boo } // Implements Volumes.DetachDisk -func (aws *AWSCloud) DetachDisk(instanceName string, diskName string) (string, error) { +func (aws *AWSCloud) DetachDisk(diskName string, instanceName string) (string, error) { disk, err := newAWSDisk(aws, diskName) if err != nil { return "", err diff --git a/plugin/pkg/admission/persistentvolume/label/admission_test.go b/plugin/pkg/admission/persistentvolume/label/admission_test.go index 76289a13096..934f3be78de 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission_test.go +++ b/plugin/pkg/admission/persistentvolume/label/admission_test.go @@ -33,11 +33,11 @@ type mockVolumes struct { var _ aws.Volumes = &mockVolumes{} -func (v *mockVolumes) AttachDisk(instanceName string, volumeName string, readOnly bool) (string, error) { +func (v *mockVolumes) AttachDisk(diskName string, instanceName string, readOnly bool) (string, error) { return "", fmt.Errorf("not implemented") } -func (v *mockVolumes) DetachDisk(instanceName string, volumeName string) (string, error) { +func (v *mockVolumes) DetachDisk(diskName string, instanceName string) (string, error) { return "", fmt.Errorf("not implemented") } diff --git a/test/e2e/pd.go b/test/e2e/pd.go index d1b7cefff26..18cf56bf2cd 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -391,7 +391,7 @@ func detachPD(hostName, pdName string) error { if !ok { return fmt.Errorf("Provider does not support volumes") } - _, err := volumes.DetachDisk(hostName, pdName) + _, err := volumes.DetachDisk(pdName, hostName) return err } }