Rename gophercloud.CommonResult references.
diff --git a/openstack/blockstorage/v1/apiversions/results.go b/openstack/blockstorage/v1/apiversions/results.go
index ea2f7f5..c2ec935 100644
--- a/openstack/blockstorage/v1/apiversions/results.go
+++ b/openstack/blockstorage/v1/apiversions/results.go
@@ -43,7 +43,7 @@
// GetResult represents the result of a get operation.
type GetResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts an API version resource.
diff --git a/openstack/blockstorage/v1/snapshots/results.go b/openstack/blockstorage/v1/snapshots/results.go
index dc94a32..c5c3470 100644
--- a/openstack/blockstorage/v1/snapshots/results.go
+++ b/openstack/blockstorage/v1/snapshots/results.go
@@ -88,7 +88,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract will get the Snapshot object out of the commonResult object.
diff --git a/openstack/blockstorage/v1/volumes/results.go b/openstack/blockstorage/v1/volumes/results.go
index 78eb6c1..421e4ca 100644
--- a/openstack/blockstorage/v1/volumes/results.go
+++ b/openstack/blockstorage/v1/volumes/results.go
@@ -64,7 +64,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract will get the Volume object out of the commonResult object.
diff --git a/openstack/blockstorage/v1/volumetypes/results.go b/openstack/blockstorage/v1/volumetypes/results.go
index 77cc1f5..cdd641b 100644
--- a/openstack/blockstorage/v1/volumetypes/results.go
+++ b/openstack/blockstorage/v1/volumetypes/results.go
@@ -48,7 +48,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract will get the Volume Type object out of the commonResult object.
diff --git a/openstack/common/extensions/results.go b/openstack/common/extensions/results.go
index 4827072..123c33f 100755
--- a/openstack/common/extensions/results.go
+++ b/openstack/common/extensions/results.go
@@ -9,7 +9,7 @@
// GetResult temporarily stores the result of a Get call.
// Use its Extract() method to interpret it as an Extension.
type GetResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract interprets a GetResult as an Extension.
diff --git a/openstack/compute/v2/flavors/results.go b/openstack/compute/v2/flavors/results.go
index 1e274e3..c96a3a7 100644
--- a/openstack/compute/v2/flavors/results.go
+++ b/openstack/compute/v2/flavors/results.go
@@ -14,7 +14,7 @@
// GetResult temporarily holds the reponse from a Get call.
type GetResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract provides access to the individual Flavor returned by the Get function.
diff --git a/openstack/compute/v2/images/results.go b/openstack/compute/v2/images/results.go
index 3c22eeb..ff0ae53 100644
--- a/openstack/compute/v2/images/results.go
+++ b/openstack/compute/v2/images/results.go
@@ -8,7 +8,7 @@
// GetResult temporarily stores a Get response.
type GetResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract interprets a GetResult as an Image.
diff --git a/openstack/compute/v2/servers/results.go b/openstack/compute/v2/servers/results.go
index d284ed8..15003d8 100644
--- a/openstack/compute/v2/servers/results.go
+++ b/openstack/compute/v2/servers/results.go
@@ -7,7 +7,7 @@
)
type serverResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract interprets any serverResult as a Server, if possible.
diff --git a/openstack/identity/v2/tokens/requests.go b/openstack/identity/v2/tokens/requests.go
index c25a72b..7f71865 100644
--- a/openstack/identity/v2/tokens/requests.go
+++ b/openstack/identity/v2/tokens/requests.go
@@ -74,7 +74,7 @@
func Create(client *gophercloud.ServiceClient, auth AuthOptionsBuilder) CreateResult {
request, err := auth.ToTokenCreateMap()
if err != nil {
- return CreateResult{gophercloud.CommonResult{Err: err}}
+ return CreateResult{gophercloud.Result{Err: err}}
}
var result CreateResult
diff --git a/openstack/identity/v2/tokens/results.go b/openstack/identity/v2/tokens/results.go
index e88b2c7..543907c 100644
--- a/openstack/identity/v2/tokens/results.go
+++ b/openstack/identity/v2/tokens/results.go
@@ -71,7 +71,7 @@
// CreateResult defers the interpretation of a created token.
// Use ExtractToken() to interpret it as a Token, or ExtractServiceCatalog() to interpret it as a service catalog.
type CreateResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// ExtractToken returns the just-created Token from a CreateResult.
@@ -129,5 +129,5 @@
// createErr quickly packs an error in a CreateResult.
func createErr(err error) CreateResult {
- return CreateResult{gophercloud.CommonResult{Err: err}}
+ return CreateResult{gophercloud.Result{Err: err}}
}
diff --git a/openstack/identity/v3/endpoints/results.go b/openstack/identity/v3/endpoints/results.go
index d1c2472..94182b2 100644
--- a/openstack/identity/v3/endpoints/results.go
+++ b/openstack/identity/v3/endpoints/results.go
@@ -7,7 +7,7 @@
)
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract interprets a GetResult, CreateResult or UpdateResult as a concrete Endpoint.
@@ -33,7 +33,7 @@
// createErr quickly wraps an error in a CreateResult.
func createErr(err error) CreateResult {
- return CreateResult{commonResult{gophercloud.CommonResult{Err: err}}}
+ return CreateResult{commonResult{gophercloud.Result{Err: err}}}
}
// UpdateResult is the deferred result of an Update call.
diff --git a/openstack/identity/v3/services/results.go b/openstack/identity/v3/services/results.go
index e4e068b..2d03c32 100644
--- a/openstack/identity/v3/services/results.go
+++ b/openstack/identity/v3/services/results.go
@@ -8,7 +8,7 @@
)
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract interprets a GetResult, CreateResult or UpdateResult as a concrete Service.
diff --git a/openstack/identity/v3/tokens/requests.go b/openstack/identity/v3/tokens/requests.go
index c8587b6..db45cc5 100644
--- a/openstack/identity/v3/tokens/requests.go
+++ b/openstack/identity/v3/tokens/requests.go
@@ -242,7 +242,7 @@
if result.Err != nil {
return result
}
- result.header = response.HttpResponse.Header
+ result.Headers = response.HttpResponse.Header
return result
}
@@ -258,7 +258,7 @@
if result.Err != nil {
return result
}
- result.header = response.HttpResponse.Header
+ result.Headers = response.HttpResponse.Header
return result
}
diff --git a/openstack/identity/v3/tokens/results.go b/openstack/identity/v3/tokens/results.go
index 1be98cb..1e6538d 100644
--- a/openstack/identity/v3/tokens/results.go
+++ b/openstack/identity/v3/tokens/results.go
@@ -1,7 +1,6 @@
package tokens
import (
- "net/http"
"time"
"github.com/mitchellh/mapstructure"
@@ -10,10 +9,7 @@
// commonResult is the deferred result of a Create or a Get call.
type commonResult struct {
- gophercloud.CommonResult
-
- // header stores the headers from the original HTTP response because token responses are returned in an X-Subject-Token header.
- header http.Header
+ gophercloud.Result
}
// Extract interprets a commonResult as a Token.
@@ -31,7 +27,7 @@
var token Token
// Parse the token itself from the stored headers.
- token.ID = r.header.Get("X-Subject-Token")
+ token.ID = r.Headers.Get("X-Subject-Token")
err := mapstructure.Decode(r.Resp, &response)
if err != nil {
@@ -52,10 +48,7 @@
// createErr quickly creates a CreateResult that reports an error.
func createErr(err error) CreateResult {
return CreateResult{
- commonResult: commonResult{
- CommonResult: gophercloud.CommonResult{Err: err},
- header: nil,
- },
+ commonResult: commonResult{Result: gophercloud.Result{Err: err}},
}
}
diff --git a/openstack/networking/v2/extensions/layer3/floatingips/results.go b/openstack/networking/v2/extensions/layer3/floatingips/results.go
index 43892f0..cdb6803 100644
--- a/openstack/networking/v2/extensions/layer3/floatingips/results.go
+++ b/openstack/networking/v2/extensions/layer3/floatingips/results.go
@@ -40,7 +40,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract a result and extracts a FloatingIP resource.
diff --git a/openstack/networking/v2/extensions/layer3/routers/results.go b/openstack/networking/v2/extensions/layer3/routers/results.go
index eae647f..0ef1795 100755
--- a/openstack/networking/v2/extensions/layer3/routers/results.go
+++ b/openstack/networking/v2/extensions/layer3/routers/results.go
@@ -87,7 +87,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a router.
@@ -143,7 +143,7 @@
// InterfaceResult represents the result of interface operations, such as
// AddInterface() and RemoveInterface().
type InterfaceResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts an information struct.
diff --git a/openstack/networking/v2/extensions/lbaas/members/results.go b/openstack/networking/v2/extensions/lbaas/members/results.go
index b006551..1db37ae 100644
--- a/openstack/networking/v2/extensions/lbaas/members/results.go
+++ b/openstack/networking/v2/extensions/lbaas/members/results.go
@@ -83,7 +83,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a router.
diff --git a/openstack/networking/v2/extensions/lbaas/monitors/results.go b/openstack/networking/v2/extensions/lbaas/monitors/results.go
index 656ab1d..b35b4c6 100644
--- a/openstack/networking/v2/extensions/lbaas/monitors/results.go
+++ b/openstack/networking/v2/extensions/lbaas/monitors/results.go
@@ -108,7 +108,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a monitor.
diff --git a/openstack/networking/v2/extensions/lbaas/pools/results.go b/openstack/networking/v2/extensions/lbaas/pools/results.go
index 4233176..d326e0b 100644
--- a/openstack/networking/v2/extensions/lbaas/pools/results.go
+++ b/openstack/networking/v2/extensions/lbaas/pools/results.go
@@ -102,7 +102,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a router.
diff --git a/openstack/networking/v2/extensions/lbaas/vips/results.go b/openstack/networking/v2/extensions/lbaas/vips/results.go
index 5925adc..c2bbc1c 100644
--- a/openstack/networking/v2/extensions/lbaas/vips/results.go
+++ b/openstack/networking/v2/extensions/lbaas/vips/results.go
@@ -127,7 +127,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a router.
diff --git a/openstack/networking/v2/extensions/security/groups/results.go b/openstack/networking/v2/extensions/security/groups/results.go
index 617d690..54ad6f0 100644
--- a/openstack/networking/v2/extensions/security/groups/results.go
+++ b/openstack/networking/v2/extensions/security/groups/results.go
@@ -74,7 +74,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a security group.
diff --git a/openstack/networking/v2/extensions/security/rules/results.go b/openstack/networking/v2/extensions/security/rules/results.go
index ca8435e..a1a8f7b 100644
--- a/openstack/networking/v2/extensions/security/rules/results.go
+++ b/openstack/networking/v2/extensions/security/rules/results.go
@@ -99,7 +99,7 @@
}
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a security rule.
diff --git a/openstack/networking/v2/networks/results.go b/openstack/networking/v2/networks/results.go
index e605fcf..eefdc7c 100644
--- a/openstack/networking/v2/networks/results.go
+++ b/openstack/networking/v2/networks/results.go
@@ -7,7 +7,7 @@
)
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a network resource.
diff --git a/openstack/networking/v2/ports/results.go b/openstack/networking/v2/ports/results.go
index cedd658..4ead2eb 100644
--- a/openstack/networking/v2/ports/results.go
+++ b/openstack/networking/v2/ports/results.go
@@ -7,7 +7,7 @@
)
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a port resource.
diff --git a/openstack/networking/v2/subnets/results.go b/openstack/networking/v2/subnets/results.go
index 3c9ef71..3b4976a 100644
--- a/openstack/networking/v2/subnets/results.go
+++ b/openstack/networking/v2/subnets/results.go
@@ -7,7 +7,7 @@
)
type commonResult struct {
- gophercloud.CommonResult
+ gophercloud.Result
}
// Extract is a function that accepts a result and extracts a subnet resource.