use 'MaybeXXXX' functions in gophercloud package
diff --git a/openstack/blockstorage/v1/snapshots/requests.go b/openstack/blockstorage/v1/snapshots/requests.go
index fad5adf..40b44d8 100644
--- a/openstack/blockstorage/v1/snapshots/requests.go
+++ b/openstack/blockstorage/v1/snapshots/requests.go
@@ -2,7 +2,6 @@
import (
"github.com/rackspace/gophercloud"
- "github.com/rackspace/gophercloud/openstack/utils"
"github.com/rackspace/gophercloud/pagination"
"github.com/racker/perigee"
@@ -39,9 +38,9 @@
Snapshot: snapshot{},
}
- reqBody.Snapshot.Description = utils.MaybeString(opts.Description)
- reqBody.Snapshot.Name = utils.MaybeString(opts.Name)
- reqBody.Snapshot.VolumeID = utils.MaybeString(opts.VolumeID)
+ reqBody.Snapshot.Description = gophercloud.MaybeString(opts.Description)
+ reqBody.Snapshot.Name = gophercloud.MaybeString(opts.Name)
+ reqBody.Snapshot.VolumeID = gophercloud.MaybeString(opts.VolumeID)
reqBody.Snapshot.Force = opts.Force
diff --git a/openstack/blockstorage/v1/volumes/requests.go b/openstack/blockstorage/v1/volumes/requests.go
index ab741c6..bca27db 100644
--- a/openstack/blockstorage/v1/volumes/requests.go
+++ b/openstack/blockstorage/v1/volumes/requests.go
@@ -2,7 +2,6 @@
import (
"github.com/rackspace/gophercloud"
- "github.com/rackspace/gophercloud/openstack/utils"
"github.com/rackspace/gophercloud/pagination"
"github.com/racker/perigee"
@@ -45,14 +44,14 @@
Volume: volume{},
}
- reqBody.Volume.Availability = utils.MaybeString(opts.Availability)
- reqBody.Volume.Description = utils.MaybeString(opts.Description)
- reqBody.Volume.ImageID = utils.MaybeString(opts.ImageID)
- reqBody.Volume.Name = utils.MaybeString(opts.Name)
- reqBody.Volume.Size = utils.MaybeInt(opts.Size)
- reqBody.Volume.SnapshotID = utils.MaybeString(opts.SnapshotID)
- reqBody.Volume.SourceVolID = utils.MaybeString(opts.SourceVolID)
- reqBody.Volume.VolumeType = utils.MaybeString(opts.VolumeType)
+ reqBody.Volume.Availability = gophercloud.MaybeString(opts.Availability)
+ reqBody.Volume.Description = gophercloud.MaybeString(opts.Description)
+ reqBody.Volume.ImageID = gophercloud.MaybeString(opts.ImageID)
+ reqBody.Volume.Name = gophercloud.MaybeString(opts.Name)
+ reqBody.Volume.Size = gophercloud.MaybeInt(opts.Size)
+ reqBody.Volume.SnapshotID = gophercloud.MaybeString(opts.SnapshotID)
+ reqBody.Volume.SourceVolID = gophercloud.MaybeString(opts.SourceVolID)
+ reqBody.Volume.VolumeType = gophercloud.MaybeString(opts.VolumeType)
var res CreateResult
_, res.Err = perigee.Request("POST", createURL(client), perigee.Options{
@@ -136,8 +135,8 @@
Volume: update{},
}
- reqBody.Volume.Description = utils.MaybeString(opts.Description)
- reqBody.Volume.Name = utils.MaybeString(opts.Name)
+ reqBody.Volume.Description = gophercloud.MaybeString(opts.Description)
+ reqBody.Volume.Name = gophercloud.MaybeString(opts.Name)
var res UpdateResult
diff --git a/openstack/blockstorage/v1/volumetypes/requests.go b/openstack/blockstorage/v1/volumetypes/requests.go
index ab7e790..afe650d 100644
--- a/openstack/blockstorage/v1/volumetypes/requests.go
+++ b/openstack/blockstorage/v1/volumetypes/requests.go
@@ -3,7 +3,6 @@
import (
"github.com/racker/perigee"
"github.com/rackspace/gophercloud"
- "github.com/rackspace/gophercloud/openstack/utils"
"github.com/rackspace/gophercloud/pagination"
)
@@ -31,7 +30,7 @@
VolumeType: volumeType{},
}
- reqBody.VolumeType.Name = utils.MaybeString(opts.Name)
+ reqBody.VolumeType.Name = gophercloud.MaybeString(opts.Name)
reqBody.VolumeType.ExtraSpecs = opts.ExtraSpecs
var res CreateResult