ExtractErrResult -> ErrResult; Extract -> ExtractErr
diff --git a/openstack/blockstorage/v1/snapshots/results.go b/openstack/blockstorage/v1/snapshots/results.go
index c531a04..e595798 100644
--- a/openstack/blockstorage/v1/snapshots/results.go
+++ b/openstack/blockstorage/v1/snapshots/results.go
@@ -61,7 +61,7 @@
// DeleteResult contains the response body and error from a Delete request.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// ListResult is a pagination.Pager that is returned from a call to the List function.
diff --git a/openstack/blockstorage/v1/volumes/results.go b/openstack/blockstorage/v1/volumes/results.go
index 0572558..c6ddbb5 100644
--- a/openstack/blockstorage/v1/volumes/results.go
+++ b/openstack/blockstorage/v1/volumes/results.go
@@ -61,7 +61,7 @@
// DeleteResult contains the response body and error from a Delete request.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// ListResult is a pagination.pager that is returned from a call to the List function.
diff --git a/openstack/blockstorage/v1/volumetypes/requests.go b/openstack/blockstorage/v1/volumetypes/requests.go
index 32d323d..87e20f6 100644
--- a/openstack/blockstorage/v1/volumetypes/requests.go
+++ b/openstack/blockstorage/v1/volumetypes/requests.go
@@ -55,12 +55,13 @@
}
// Delete will delete the volume type with the provided ID.
-func Delete(client *gophercloud.ServiceClient, id string) error {
- _, err := perigee.Request("DELETE", deleteURL(client, id), perigee.Options{
+func Delete(client *gophercloud.ServiceClient, id string) DeleteResult {
+ var res DeleteResult
+ _, res.Err = perigee.Request("DELETE", deleteURL(client, id), perigee.Options{
MoreHeaders: client.AuthenticatedHeaders(),
OkCodes: []int{202},
})
- return err
+ return res
}
// Get will retrieve the volume type with the provided ID. To extract the volume
diff --git a/openstack/blockstorage/v1/volumetypes/requests_test.go b/openstack/blockstorage/v1/volumetypes/requests_test.go
index 8b11786..8d40bfe 100644
--- a/openstack/blockstorage/v1/volumetypes/requests_test.go
+++ b/openstack/blockstorage/v1/volumetypes/requests_test.go
@@ -113,6 +113,6 @@
w.WriteHeader(http.StatusAccepted)
})
- err := Delete(client.ServiceClient(), "d32019d3-bc6e-4319-9c1d-6722fc136a22")
+ err := Delete(client.ServiceClient(), "d32019d3-bc6e-4319-9c1d-6722fc136a22").ExtractErr()
th.AssertNoErr(t, err)
}
diff --git a/openstack/blockstorage/v1/volumetypes/results.go b/openstack/blockstorage/v1/volumetypes/results.go
index a13f7c1..c049a04 100644
--- a/openstack/blockstorage/v1/volumetypes/results.go
+++ b/openstack/blockstorage/v1/volumetypes/results.go
@@ -23,6 +23,11 @@
commonResult
}
+// DeleteResult contains the response error from a Delete request.
+type DeleteResult struct {
+ gophercloud.ErrResult
+}
+
// ListResult is a pagination.Pager that is returned from a call to the List function.
type ListResult struct {
pagination.SinglePageBase