provider/openstack: blockstorage volume attach code review updates

This commit is contained in:
Joe Topjian 2016-11-22 15:27:23 +00:00
parent 22dd265132
commit 4cc46937e8
2 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,6 @@ func resourceBlockStorageVolumeAttachV2() *schema.Resource {
return &schema.Resource{ return &schema.Resource{
Create: resourceBlockStorageVolumeAttachV2Create, Create: resourceBlockStorageVolumeAttachV2Create,
Read: resourceBlockStorageVolumeAttachV2Read, Read: resourceBlockStorageVolumeAttachV2Read,
Update: nil,
Delete: resourceBlockStorageVolumeAttachV2Delete, Delete: resourceBlockStorageVolumeAttachV2Delete,
Importer: &schema.ResourceImporter{ Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough, State: schema.ImportStatePassthrough,
@ -233,6 +232,7 @@ func blockStorageVolumeAttachV2AttachMode(v string) (volumeactions.AttachMode, e
var attachError error var attachError error
switch v { switch v {
case "": case "":
attachMode = ""
case "ro": case "ro":
attachMode = volumeactions.ReadOnly attachMode = volumeactions.ReadOnly
case "rw": case "rw":

View File

@ -53,6 +53,7 @@ The following arguments are supported:
* `attach_mode` - (Optional) Specify whether to attach the volume as Read-Only * `attach_mode` - (Optional) Specify whether to attach the volume as Read-Only
(`ro`) or Read-Write (`rw`). Only values of `ro` and `rw` are accepted. (`ro`) or Read-Write (`rw`). Only values of `ro` and `rw` are accepted.
If left unspecified, the Block Storage API will apply a default of `rw`.
## Attributes Reference ## Attributes Reference