Skip to content

Commit

Permalink
Merge pull request #579 from codenrhoden/feature/gcepd-inspect-vol-name
Browse files Browse the repository at this point in the history
Add gcepd support for VolumeInspectByName
  • Loading branch information
akutz authored Jun 26, 2017
2 parents 25dfe5b + f30c7cf commit 0966339
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion drivers/storage/gcepd/storage/gce_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func (d *driver) Volumes(
return vols, nil
}

// VolumeInspect inspects a single volume.
// VolumeInspect inspects a single volume by ID.
func (d *driver) VolumeInspect(
ctx types.Context,
volumeID string,
Expand Down Expand Up @@ -335,6 +335,20 @@ func (d *driver) VolumeInspect(
return vols[0], nil
}

// VolumeInspectByName inspects a single volume by name.
func (d *driver) VolumeInspectByName(
ctx types.Context,
volumeName string,
opts *types.VolumeInspectOpts) (*types.Volume, error) {

// For GCE, name and ID are the same
return d.VolumeInspect(
ctx,
volumeName,
opts,
)
}

// VolumeCreate creates a new volume.
func (d *driver) VolumeCreate(
ctx types.Context,
Expand Down

0 comments on commit 0966339

Please sign in to comment.