comment types; remove ok codes
diff --git a/openstack/storage/v1/containers/containers.go b/openstack/storage/v1/containers/containers.go
index 2a5efe1..3a00647 100644
--- a/openstack/storage/v1/containers/containers.go
+++ b/openstack/storage/v1/containers/containers.go
@@ -6,30 +6,37 @@
"strings"
)
+// Container is a structure that holds information related to a storage container.
type Container map[string]interface{}
+// ListOpts is a structure that holds parameters for listing containers.
type ListOpts struct {
Full bool
Params map[string]string
}
+// CreateOpts is a structure that holds parameters for creating a container.
type CreateOpts struct {
Name string
Metadata map[string]string
Headers map[string]string
}
+// DeleteOpts is a structure that holds parameters for deleting a container.
type DeleteOpts struct {
Name string
Params map[string]string
}
+// UpdateOpts is a structure that holds parameters for updating, creating, or deleting a
+// container's metadata.
type UpdateOpts struct {
Name string
Metadata map[string]string
Headers map[string]string
}
+// GetOpts is a structure that holds parameters for getting a container's metadata.
type GetOpts struct {
Name string
Metadata map[string]string
diff --git a/openstack/storage/v1/containers/requests.go b/openstack/storage/v1/containers/requests.go
index df7cc30..b6d3a89 100644
--- a/openstack/storage/v1/containers/requests.go
+++ b/openstack/storage/v1/containers/requests.go
@@ -7,7 +7,10 @@
"net/http"
)
+// ListResult is a *http.Response that is returned from a call to the List function.
type ListResult *http.Response
+
+// GetResult is a *http.Response that is returned from a call to the Get function.
type GetResult *http.Response
// List is a function that retrieves all objects in a container. It also returns the details
@@ -30,7 +33,6 @@
url := c.GetAccountURL() + query
resp, err := perigee.Request("GET", url, perigee.Options{
MoreHeaders: h,
- OkCodes: []int{200, 204},
Accept: contentType,
})
return &resp.HttpResponse, err
@@ -56,7 +58,6 @@
url := c.GetContainerURL(opts.Name)
_, err = perigee.Request("PUT", url, perigee.Options{
MoreHeaders: h,
- OkCodes: []int{201, 204},
})
if err == nil {
ci = Container{
@@ -78,7 +79,6 @@
url := c.GetContainerURL(opts.Name) + query
_, err = perigee.Request("DELETE", url, perigee.Options{
MoreHeaders: h,
- OkCodes: []int{204},
})
return err
}
@@ -101,7 +101,6 @@
url := c.GetContainerURL(opts.Name)
_, err = perigee.Request("POST", url, perigee.Options{
MoreHeaders: h,
- OkCodes: []int{204},
})
return err
}
@@ -121,7 +120,6 @@
url := c.GetContainerURL(opts.Name)
resp, err := perigee.Request("HEAD", url, perigee.Options{
MoreHeaders: h,
- OkCodes: []int{204},
})
return &resp.HttpResponse, err
}