openstack object storage acceptance tests fixes
diff --git a/openstack/objectstorage/v1/objects/results.go b/openstack/objectstorage/v1/objects/results.go
index e662b69..f85f1ac 100644
--- a/openstack/objectstorage/v1/objects/results.go
+++ b/openstack/objectstorage/v1/objects/results.go
@@ -2,7 +2,6 @@
import (
"fmt"
- "net/http"
"strings"
"github.com/rackspace/gophercloud"
@@ -96,9 +95,13 @@
}
}
+type commonResult struct {
+ gophercloud.Result
+}
+
// DownloadResult is a *http.Response that is returned from a call to the Download function.
type DownloadResult struct {
- gophercloud.Result
+ commonResult
}
// ExtractContent is a function that takes a DownloadResult (of type *http.Response)
@@ -112,7 +115,7 @@
// GetResult is a *http.Response that is returned from a call to the Get function.
type GetResult struct {
- gophercloud.Result
+ commonResult
}
// ExtractMetadata is a function that takes a GetResult (of type *http.Response)
@@ -131,32 +134,22 @@
return metadata, nil
}
-type headerResult struct {
- gophercloud.Result
-}
-
-// Extract returns the unmodified HTTP response headers from a Create, Update, or Delete call, as
-// well as any errors that occurred during the call.
-func (result headerResult) Extract() (http.Header, error) {
- return result.Header, result.Err
-}
-
// CreateResult represents the result of a create operation.
type CreateResult struct {
- headerResult
+ commonResult
}
// UpdateResult represents the result of an update operation.
type UpdateResult struct {
- headerResult
+ commonResult
}
// DeleteResult represents the result of a delete operation.
type DeleteResult struct {
- headerResult
+ commonResult
}
// CopyResult represents the result of a copy operation.
type CopyResult struct {
- headerResult
+ commonResult
}