openstack object storage acceptance tests fixes
diff --git a/openstack/objectstorage/v1/containers/results.go b/openstack/objectstorage/v1/containers/results.go
index 780d4ae..c00a4bc 100644
--- a/openstack/objectstorage/v1/containers/results.go
+++ b/openstack/objectstorage/v1/containers/results.go
@@ -2,7 +2,6 @@
import (
"fmt"
- "net/http"
"strings"
"github.com/rackspace/gophercloud"
@@ -97,9 +96,13 @@
}
}
+type commonResult struct {
+ gophercloud.Result
+}
+
// GetResult represents the result of a get operation.
type GetResult struct {
- gophercloud.Result
+ commonResult
}
// ExtractMetadata is a function that takes a GetResult (of type *http.Response)
@@ -118,32 +121,23 @@
return metadata, nil
}
-type headerResult struct {
- gophercloud.Result
-}
-
-// Extract pulls the unmodified headers from a Create, Update, or Delete result.
-func (result headerResult) Extract() (http.Header, error) {
- return result.Header, result.Err
-}
-
// CreateResult represents the result of a create operation. To extract the
// the headers from the HTTP response, you can invoke the 'ExtractHeaders'
// method on the result struct.
type CreateResult struct {
- headerResult
+ commonResult
}
// UpdateResult represents the result of an update operation. To extract the
// the headers from the HTTP response, you can invoke the 'ExtractHeaders'
// method on the result struct.
type UpdateResult struct {
- headerResult
+ commonResult
}
// DeleteResult represents the result of a delete operation. To extract the
// the headers from the HTTP response, you can invoke the 'ExtractHeaders'
// method on the result struct.
type DeleteResult struct {
- headerResult
+ commonResult
}