Adding DeleteResult for rackspace.blockstorage.v1.volumes.Delete
diff --git a/rackspace/blockstorage/v1/volumes/delegate.go b/rackspace/blockstorage/v1/volumes/delegate.go
index 4f14454..eb9ae56 100644
--- a/rackspace/blockstorage/v1/volumes/delegate.go
+++ b/rackspace/blockstorage/v1/volumes/delegate.go
@@ -28,8 +28,8 @@
}
// Delete will delete the existing Volume with the provided ID.
-func Delete(client *gophercloud.ServiceClient, id string) error {
- return os.Delete(client, id)
+func Delete(client *gophercloud.ServiceClient, id string) DeleteResult {
+ return DeleteResult{os.Delete(client, id)}
}
// Get retrieves the Volume with the provided ID. To extract the Volume object
diff --git a/rackspace/blockstorage/v1/volumes/delegate_test.go b/rackspace/blockstorage/v1/volumes/delegate_test.go
index 2383c54..b44564c 100644
--- a/rackspace/blockstorage/v1/volumes/delegate_test.go
+++ b/rackspace/blockstorage/v1/volumes/delegate_test.go
@@ -89,8 +89,8 @@
os.MockDeleteResponse(t)
- err := Delete(fake.ServiceClient(), "d32019d3-bc6e-4319-9c1d-6722fc136a22")
- th.AssertNoErr(t, err)
+ res := Delete(fake.ServiceClient(), "d32019d3-bc6e-4319-9c1d-6722fc136a22")
+ th.AssertNoErr(t, res.Err)
}
func TestUpdate(t *testing.T) {
diff --git a/rackspace/blockstorage/v1/volumes/results.go b/rackspace/blockstorage/v1/volumes/results.go
index c7c2cc4..9435dca 100644
--- a/rackspace/blockstorage/v1/volumes/results.go
+++ b/rackspace/blockstorage/v1/volumes/results.go
@@ -25,6 +25,11 @@
os.UpdateResult
}
+// DeleteResult represents the result of a delete operation
+type DeleteResult struct {
+ os.DeleteResult
+}
+
func commonExtract(resp interface{}, err error) (*Volume, error) {
if err != nil {
return nil, err