Adding DeleteResult for rackspace.blockstorage.v1.snapshots.Delete
diff --git a/rackspace/blockstorage/v1/snapshots/delegate.go b/rackspace/blockstorage/v1/snapshots/delegate.go
index 3ae2438..aacef7c 100644
--- a/rackspace/blockstorage/v1/snapshots/delegate.go
+++ b/rackspace/blockstorage/v1/snapshots/delegate.go
@@ -67,8 +67,8 @@
}
// Delete will delete the existing Snapshot 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 Snapshot with the provided ID. To extract the Snapshot
diff --git a/rackspace/blockstorage/v1/snapshots/delegate_test.go b/rackspace/blockstorage/v1/snapshots/delegate_test.go
index fad7636..1a02b46 100644
--- a/rackspace/blockstorage/v1/snapshots/delegate_test.go
+++ b/rackspace/blockstorage/v1/snapshots/delegate_test.go
@@ -92,6 +92,6 @@
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)
}
diff --git a/rackspace/blockstorage/v1/snapshots/results.go b/rackspace/blockstorage/v1/snapshots/results.go
index 0fab282..a43bee9 100644
--- a/rackspace/blockstorage/v1/snapshots/results.go
+++ b/rackspace/blockstorage/v1/snapshots/results.go
@@ -71,6 +71,11 @@
gophercloud.Result
}
+// DeleteResult represents the result of a delete operation
+type DeleteResult struct {
+ os.DeleteResult
+}
+
func commonExtract(resp interface{}, err error) (*Snapshot, error) {
if err != nil {
return nil, err