Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit 90b91da

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request #51515 from jianglingxia/jlx82918
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448) fix typo about volumes **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
2 parents 558d7a4 + f9b2081 commit 90b91da

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

pkg/cloudprovider/providers/openstack/openstack_volumes.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func (os *OpenStack) OperationPending(diskName string) (bool, string, error) {
209209
return true, volumeStatus, nil
210210
}
211211

212-
// Attaches given cinder volume to the compute running kubelet
212+
// AttachDisk attaches given cinder volume to the compute running kubelet
213213
func (os *OpenStack) AttachDisk(instanceID, volumeID string) (string, error) {
214214
volume, err := os.getVolume(volumeID)
215215
if err != nil {
@@ -288,7 +288,7 @@ func (os *OpenStack) DetachDisk(instanceID, volumeID string) error {
288288
return nil
289289
}
290290

291-
// Retrieves Volume by its ID.
291+
// getVolume retrieves Volume by its ID.
292292
func (os *OpenStack) getVolume(volumeID string) (Volume, error) {
293293
volumes, err := os.volumeService("")
294294
if err != nil || volumes == nil {
@@ -298,7 +298,7 @@ func (os *OpenStack) getVolume(volumeID string) (Volume, error) {
298298
return volumes.getVolume(volumeID)
299299
}
300300

301-
// Create a volume of given size (in GiB)
301+
// CreateVolume creates a volume of given size (in GiB)
302302
func (os *OpenStack) CreateVolume(name string, size int, vtype, availability string, tags *map[string]string) (string, string, error) {
303303
volumes, err := os.volumeService("")
304304
if err != nil || volumes == nil {
@@ -378,7 +378,7 @@ func (os *OpenStack) DeleteVolume(volumeID string) error {
378378

379379
}
380380

381-
// Get device path of attached volume to the compute running kubelet, as known by cinder
381+
// GetAttachmentDiskPath gets device path of attached volume to the compute running kubelet, as known by cinder
382382
func (os *OpenStack) GetAttachmentDiskPath(instanceID, volumeID string) (string, error) {
383383
// See issue #33128 - Cinder does not always tell you the right device path, as such
384384
// we must only use this value as a last resort.
@@ -405,7 +405,7 @@ func (os *OpenStack) GetAttachmentDiskPath(instanceID, volumeID string) (string,
405405
return "", fmt.Errorf("volume %s has no ServerId.", volumeID)
406406
}
407407

408-
// query if a volume is attached to a compute instance
408+
// DiskIsAttached queries if a volume is attached to a compute instance
409409
func (os *OpenStack) DiskIsAttached(instanceID, volumeID string) (bool, error) {
410410
volume, err := os.getVolume(volumeID)
411411
if err != nil {
@@ -415,7 +415,7 @@ func (os *OpenStack) DiskIsAttached(instanceID, volumeID string) (bool, error) {
415415
return instanceID == volume.AttachedServerId, nil
416416
}
417417

418-
// query if a list of volumes are attached to a compute instance
418+
// DisksAreAttached queries if a list of volumes are attached to a compute instance
419419
func (os *OpenStack) DisksAreAttached(instanceID string, volumeIDs []string) (map[string]bool, error) {
420420
attached := make(map[string]bool)
421421
for _, volumeID := range volumeIDs {
@@ -434,7 +434,7 @@ func (os *OpenStack) diskIsUsed(volumeID string) (bool, error) {
434434
return volume.AttachedServerId != "", nil
435435
}
436436

437-
// query if we should trust the cinder provide deviceName, See issue #33128
437+
// ShouldTrustDevicePath queries if we should trust the cinder provide deviceName, See issue #33128
438438
func (os *OpenStack) ShouldTrustDevicePath() bool {
439439
return os.bsOpts.TrustDevicePath
440440
}

0 commit comments

Comments
 (0)