@@ -45,27 +45,27 @@ const (
45
45
type Interface interface {
46
46
// FindVolumeAttachment searches for a volume attachment in either the state
47
47
// ATTACHING or ATTACHED and returns the first volume attachment found.
48
- FindVolumeAttachment (volumeId string ) (core.VolumeAttachment , error )
48
+ FindVolumeAttachment (volumeID string ) (core.VolumeAttachment , error )
49
49
50
50
// WaitForVolumeAttached polls waiting for a OCI block volume to be in the
51
51
// ATTACHED state.
52
- WaitForVolumeAttached (volumeAttachmentId string ) (core.VolumeAttachment , error )
52
+ WaitForVolumeAttached (volumeAttachmentID string ) (core.VolumeAttachment , error )
53
53
54
54
// GetInstanceByNodeName retrieves the oci.Instance corresponding or
55
55
// a SearchError if no instance matching the node name is found.
56
56
GetInstanceByNodeName (name string ) (* core.Instance , error )
57
57
58
58
// AttachVolume attaches a block storage volume to the specified instance.
59
59
// See https://docs.us-phoenix-1.oraclecloud.com/api/#/en/iaas/20160918/VolumeAttachment/AttachVolume
60
- AttachVolume (instanceId , volumeId string ) (core.VolumeAttachment , int , error )
60
+ AttachVolume (instanceID , volumeID string ) (core.VolumeAttachment , int , error )
61
61
62
62
// DetachVolume detaches a storage volume from the specified instance.
63
63
// See: https://docs.us-phoenix-1.oraclecloud.com/api/#/en/iaas/20160918/Volume/DetachVolume
64
- DetachVolume (volumeAttachmentId string ) error
64
+ DetachVolume (volumeAttachmentID string ) error
65
65
66
66
// WaitForVolumeDetached polls waiting for a OCI block volume to be in the
67
67
// DETACHED state.
68
- WaitForVolumeDetached (volumeAttachmentId string ) error
68
+ WaitForVolumeDetached (volumeAttachmentID string ) error
69
69
70
70
// GetConfig returns the Config associated with the OCI API client.
71
71
GetConfig () * Config
@@ -131,10 +131,10 @@ func New(configPath string) (Interface, error) {
131
131
132
132
// WaitForVolumeAttached polls waiting for a OCI block volume to be in the
133
133
// ATTACHED state.
134
- func (c * client ) WaitForVolumeAttached (volumeAttachmentId string ) (core.VolumeAttachment , error ) {
134
+ func (c * client ) WaitForVolumeAttached (volumeAttachmentID string ) (core.VolumeAttachment , error ) {
135
135
// TODO: Replace with "k8s.io/apimachinery/pkg/util/wait".
136
136
request := core.GetVolumeAttachmentRequest {
137
- VolumeAttachmentId : & volumeAttachmentId ,
137
+ VolumeAttachmentId : & volumeAttachmentID ,
138
138
}
139
139
for i := 0 ; i < ociMaxRetries ; i ++ {
140
140
r , err := func () (core.GetVolumeAttachmentResponse , error ) {
@@ -161,14 +161,14 @@ func (c *client) WaitForVolumeAttached(volumeAttachmentId string) (core.VolumeAt
161
161
162
162
// FindVolumeAttachment searches for a volume attachment in either the state of
163
163
// ATTACHING or ATTACHED and returns the first volume attachment found.
164
- func (c * client ) FindVolumeAttachment (volumeId string ) (core.VolumeAttachment , error ) {
164
+ func (c * client ) FindVolumeAttachment (volumeID string ) (core.VolumeAttachment , error ) {
165
165
var page * string
166
166
167
167
for {
168
168
request := core.ListVolumeAttachmentsRequest {
169
169
CompartmentId : common .String (c .config .Auth .CompartmentOCID ),
170
170
Page : page ,
171
- VolumeId : & volumeId ,
171
+ VolumeId : & volumeID ,
172
172
}
173
173
174
174
r , err := func () (core.ListVolumeAttachmentsResponse , error ) {
@@ -193,7 +193,7 @@ func (c *client) FindVolumeAttachment(volumeId string) (core.VolumeAttachment, e
193
193
}
194
194
}
195
195
196
- return nil , fmt .Errorf ("failed to find volume attachment for %q" , volumeId )
196
+ return nil , fmt .Errorf ("failed to find volume attachment for %q" , volumeID )
197
197
}
198
198
199
199
func (c * client ) getVCNCompartment () (* string , error ) {
@@ -414,11 +414,11 @@ func (c *client) GetInstanceByNodeName(nodeName string) (*core.Instance, error)
414
414
}
415
415
416
416
// AttachVolume attaches a block storage volume to the specified instance.
417
- func (c * client ) AttachVolume (instanceId , volumeId string ) (core.VolumeAttachment , int , error ) {
417
+ func (c * client ) AttachVolume (instanceID , volumeID string ) (core.VolumeAttachment , int , error ) {
418
418
request := core.AttachVolumeRequest {
419
419
AttachVolumeDetails : core.AttachIScsiVolumeDetails {
420
- InstanceId : & instanceId ,
421
- VolumeId : & volumeId ,
420
+ InstanceId : & instanceID ,
421
+ VolumeId : & volumeID ,
422
422
},
423
423
}
424
424
r , err := func () (core.AttachVolumeResponse , error ) {
@@ -433,9 +433,9 @@ func (c *client) AttachVolume(instanceId, volumeId string) (core.VolumeAttachmen
433
433
}
434
434
435
435
// DetachVolume detaches a storage volume from the specified instance.
436
- func (c * client ) DetachVolume (volumeAttachmentId string ) error {
436
+ func (c * client ) DetachVolume (volumeAttachmentID string ) error {
437
437
request := core.DetachVolumeRequest {
438
- VolumeAttachmentId : & volumeAttachmentId ,
438
+ VolumeAttachmentId : & volumeAttachmentID ,
439
439
}
440
440
err := func () error {
441
441
ctx , cancel := context .WithTimeout (c .ctx , c .timeout )
@@ -451,10 +451,10 @@ func (c *client) DetachVolume(volumeAttachmentId string) error {
451
451
452
452
// WaitForVolumeDetached polls waiting for a OCI block volume to be in the
453
453
// DETACHED state.
454
- func (c * client ) WaitForVolumeDetached (volumeAttachmentId string ) error {
454
+ func (c * client ) WaitForVolumeDetached (volumeAttachmentID string ) error {
455
455
// TODO: Replace with "k8s.io/apimachinery/pkg/util/wait".
456
456
request := core.GetVolumeAttachmentRequest {
457
- VolumeAttachmentId : & volumeAttachmentId ,
457
+ VolumeAttachmentId : & volumeAttachmentID ,
458
458
}
459
459
for i := 0 ; i < ociMaxRetries ; i ++ {
460
460
r , err := func () (core.GetVolumeAttachmentResponse , error ) {
0 commit comments