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
diff --git a/openstack/compute/v2/extensions/keypairs/requests_test.go b/openstack/compute/v2/extensions/keypairs/requests_test.go
index 502a154..67d1833 100644
--- a/openstack/compute/v2/extensions/keypairs/requests_test.go
+++ b/openstack/compute/v2/extensions/keypairs/requests_test.go
@@ -66,6 +66,6 @@
defer th.TeardownHTTP()
HandleDeleteSuccessfully(t)
- err := Delete(client.ServiceClient(), "deletedkey").Extract()
+ err := Delete(client.ServiceClient(), "deletedkey").ExtractErr()
th.AssertNoErr(t, err)
}
diff --git a/openstack/compute/v2/extensions/keypairs/results.go b/openstack/compute/v2/extensions/keypairs/results.go
index dc49f99..f1a0d8e 100644
--- a/openstack/compute/v2/extensions/keypairs/results.go
+++ b/openstack/compute/v2/extensions/keypairs/results.go
@@ -90,5 +90,5 @@
// DeleteResult is the response from a Delete operation. Call its Extract method to determine if
// the call succeeded or failed.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
diff --git a/openstack/compute/v2/servers/results.go b/openstack/compute/v2/servers/results.go
index 63cc257..53946ba 100644
--- a/openstack/compute/v2/servers/results.go
+++ b/openstack/compute/v2/servers/results.go
@@ -41,7 +41,7 @@
// DeleteResult temporarily contains the response from an Delete call.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// RebuildResult temporarily contains the response from a Rebuild call.
@@ -51,7 +51,7 @@
// ActionResult represents the result of server action operations, like reboot
type ActionResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// Server exposes only the standard OpenStack fields corresponding to a given server on the user's account.
diff --git a/openstack/identity/v3/endpoints/results.go b/openstack/identity/v3/endpoints/results.go
index 2aa0483..1281122 100644
--- a/openstack/identity/v3/endpoints/results.go
+++ b/openstack/identity/v3/endpoints/results.go
@@ -43,7 +43,7 @@
// DeleteResult is the deferred result of an Delete call.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// Endpoint describes the entry point for another service's API.
diff --git a/openstack/identity/v3/services/results.go b/openstack/identity/v3/services/results.go
index d90b1bd..1d0d141 100644
--- a/openstack/identity/v3/services/results.go
+++ b/openstack/identity/v3/services/results.go
@@ -44,7 +44,7 @@
// DeleteResult is the deferred result of an Delete call.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// Service is the result of a list or information query.
diff --git a/openstack/networking/v2/extensions/layer3/floatingips/results.go b/openstack/networking/v2/extensions/layer3/floatingips/results.go
index 84719fd..1519ad2 100644
--- a/openstack/networking/v2/extensions/layer3/floatingips/results.go
+++ b/openstack/networking/v2/extensions/layer3/floatingips/results.go
@@ -78,7 +78,7 @@
// DeleteResult represents the result of an update operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// FloatingIPPage is the page returned by a pager when traversing over a
diff --git a/openstack/networking/v2/extensions/layer3/routers/results.go b/openstack/networking/v2/extensions/layer3/routers/results.go
index 2ce1e6c..bdad4cb 100755
--- a/openstack/networking/v2/extensions/layer3/routers/results.go
+++ b/openstack/networking/v2/extensions/layer3/routers/results.go
@@ -122,7 +122,7 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// InterfaceInfo represents information about a particular router interface. As
diff --git a/openstack/networking/v2/extensions/lbaas/members/results.go b/openstack/networking/v2/extensions/lbaas/members/results.go
index 447fe29..3cad339 100644
--- a/openstack/networking/v2/extensions/lbaas/members/results.go
+++ b/openstack/networking/v2/extensions/lbaas/members/results.go
@@ -118,5 +118,5 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
diff --git a/openstack/networking/v2/extensions/lbaas/monitors/results.go b/openstack/networking/v2/extensions/lbaas/monitors/results.go
index 7f7ff97..d595abd 100644
--- a/openstack/networking/v2/extensions/lbaas/monitors/results.go
+++ b/openstack/networking/v2/extensions/lbaas/monitors/results.go
@@ -143,5 +143,5 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
diff --git a/openstack/networking/v2/extensions/lbaas/pools/results.go b/openstack/networking/v2/extensions/lbaas/pools/results.go
index 0f95e15..07ec85e 100644
--- a/openstack/networking/v2/extensions/lbaas/pools/results.go
+++ b/openstack/networking/v2/extensions/lbaas/pools/results.go
@@ -137,7 +137,7 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// AssociateResult represents the result of an association operation.
diff --git a/openstack/networking/v2/extensions/lbaas/vips/results.go b/openstack/networking/v2/extensions/lbaas/vips/results.go
index 39c980a..e1092e7 100644
--- a/openstack/networking/v2/extensions/lbaas/vips/results.go
+++ b/openstack/networking/v2/extensions/lbaas/vips/results.go
@@ -162,5 +162,5 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
diff --git a/openstack/networking/v2/extensions/security/groups/results.go b/openstack/networking/v2/extensions/security/groups/results.go
index 9df3268..49db261 100644
--- a/openstack/networking/v2/extensions/security/groups/results.go
+++ b/openstack/networking/v2/extensions/security/groups/results.go
@@ -104,5 +104,5 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
diff --git a/openstack/networking/v2/extensions/security/rules/results.go b/openstack/networking/v2/extensions/security/rules/results.go
index 6684272..6e13857 100644
--- a/openstack/networking/v2/extensions/security/rules/results.go
+++ b/openstack/networking/v2/extensions/security/rules/results.go
@@ -129,5 +129,5 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
diff --git a/openstack/networking/v2/networks/results.go b/openstack/networking/v2/networks/results.go
index 9b39e8c..3ecedde 100644
--- a/openstack/networking/v2/networks/results.go
+++ b/openstack/networking/v2/networks/results.go
@@ -42,7 +42,7 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// Network represents, well, a network.
diff --git a/openstack/networking/v2/ports/results.go b/openstack/networking/v2/ports/results.go
index 2d72c35..2511ff5 100644
--- a/openstack/networking/v2/ports/results.go
+++ b/openstack/networking/v2/ports/results.go
@@ -42,7 +42,7 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// IP is a sub-struct that represents an individual IP.
diff --git a/openstack/networking/v2/subnets/results.go b/openstack/networking/v2/subnets/results.go
index 70aa543..1910f17 100644
--- a/openstack/networking/v2/subnets/results.go
+++ b/openstack/networking/v2/subnets/results.go
@@ -42,7 +42,7 @@
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- gophercloud.ExtractErrResult
+ gophercloud.ErrResult
}
// AllocationPool represents a sub-range of cidr available for dynamic