remove 'get' prefix in methods
diff --git a/openstack/storage/v1/accounts/requests.go b/openstack/storage/v1/accounts/requests.go
index d5b623a..c738573 100644
--- a/openstack/storage/v1/accounts/requests.go
+++ b/openstack/storage/v1/accounts/requests.go
@@ -22,7 +22,7 @@
h["X-Account-Meta-"+k] = v
}
- _, err := perigee.Request("POST", getAccountURL(c), perigee.Options{
+ _, err := perigee.Request("POST", accountURL(c), perigee.Options{
MoreHeaders: h,
OkCodes: []int{204},
})
@@ -38,7 +38,7 @@
h[k] = v
}
- resp, err := perigee.Request("HEAD", getAccountURL(c), perigee.Options{
+ resp, err := perigee.Request("HEAD", accountURL(c), perigee.Options{
MoreHeaders: h,
OkCodes: []int{204},
})
diff --git a/openstack/storage/v1/accounts/urls.go b/openstack/storage/v1/accounts/urls.go
index ae78ff2..53b1343 100644
--- a/openstack/storage/v1/accounts/urls.go
+++ b/openstack/storage/v1/accounts/urls.go
@@ -2,7 +2,7 @@
import "github.com/rackspace/gophercloud"
-// getAccountURL returns the URI for making Account requests.
-func getAccountURL(c *gophercloud.ServiceClient) string {
+// accountURL returns the URI for making Account requests.
+func accountURL(c *gophercloud.ServiceClient) string {
return c.Endpoint
}
diff --git a/openstack/storage/v1/containers/requests.go b/openstack/storage/v1/containers/requests.go
index 2aa263a..d7ab2ba 100644
--- a/openstack/storage/v1/containers/requests.go
+++ b/openstack/storage/v1/containers/requests.go
@@ -56,10 +56,13 @@
return p
}
- url := getAccountURL(c) + query
- pager := pagination.NewPager(c, url, createPage)
- pager.Headers = headers
- return pager
+ url := accountURL(c) + query
+ resp, err := perigee.Request("GET", url, perigee.Options{
+ MoreHeaders: h,
+ Accept: contentType,
+ OkCodes: []int{200, 204},
+ })
+ return &resp.HttpResponse, err
}
// Create is a function that creates a new container.
@@ -76,7 +79,7 @@
h["X-Container-Meta-"+k] = v
}
- url := getContainerURL(c, opts.Name)
+ url := containerURL(c, opts.Name)
_, err := perigee.Request("PUT", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{201, 204},
@@ -95,7 +98,7 @@
query := utils.BuildQuery(opts.Params)
- url := getContainerURL(c, opts.Name) + query
+ url := containerURL(c, opts.Name) + query
_, err := perigee.Request("DELETE", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{204},
@@ -115,7 +118,7 @@
h["X-Container-Meta-"+k] = v
}
- url := getContainerURL(c, opts.Name)
+ url := containerURL(c, opts.Name)
_, err := perigee.Request("POST", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{204},
@@ -132,7 +135,7 @@
h["X-Container-Meta-"+k] = v
}
- url := getContainerURL(c, opts.Name)
+ url := containerURL(c, opts.Name)
resp, err := perigee.Request("HEAD", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{204},
diff --git a/openstack/storage/v1/containers/urls.go b/openstack/storage/v1/containers/urls.go
index 4084bcc..2a06f95 100644
--- a/openstack/storage/v1/containers/urls.go
+++ b/openstack/storage/v1/containers/urls.go
@@ -2,12 +2,12 @@
import "github.com/rackspace/gophercloud"
-// getAccountURL returns the URI used to list Containers.
-func getAccountURL(c *gophercloud.ServiceClient) string {
+// accountURL returns the URI used to list Containers.
+func accountURL(c *gophercloud.ServiceClient) string {
return c.Endpoint
}
-// getContainerURL returns the URI for making Container requests.
-func getContainerURL(c *gophercloud.ServiceClient, container string) string {
+// containerURL returns the URI for making Container requests.
+func containerURL(c *gophercloud.ServiceClient, container string) string {
return c.ServiceURL(container)
}
diff --git a/openstack/storage/v1/objects/requests.go b/openstack/storage/v1/objects/requests.go
index 67aba34..91b2b42 100644
--- a/openstack/storage/v1/objects/requests.go
+++ b/openstack/storage/v1/objects/requests.go
@@ -60,7 +60,7 @@
return p
}
- url := getContainerURL(c, opts.Container) + query
+ url := containerURL(c, opts.Container) + query
pager := pagination.NewPager(c, url, createPage)
pager.Headers = headers
return pager
@@ -78,7 +78,7 @@
query := utils.BuildQuery(opts.Params)
- url := getObjectURL(c, opts.Container, opts.Name) + query
+ url := objectURL(c, opts.Container, opts.Name) + query
resp, err := perigee.Request("GET", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{200},
@@ -111,7 +111,7 @@
}
}
- url := getObjectURL(c, opts.Container, opts.Name) + query
+ url := objectURL(c, opts.Container, opts.Name) + query
_, err := perigee.Request("PUT", url, perigee.Options{
ReqBody: reqBody,
MoreHeaders: h,
@@ -130,7 +130,7 @@
h["Destination"] = fmt.Sprintf("/%s/%s", opts.NewContainer, opts.NewName)
- url := getObjectURL(c, opts.Container, opts.Name)
+ url := objectURL(c, opts.Container, opts.Name)
_, err := perigee.Request("COPY", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{201},
@@ -144,7 +144,7 @@
query := utils.BuildQuery(opts.Params)
- url := getObjectURL(c, opts.Container, opts.Name) + query
+ url := objectURL(c, opts.Container, opts.Name) + query
_, err := perigee.Request("DELETE", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{204},
@@ -161,7 +161,7 @@
h[k] = v
}
- url := getObjectURL(c, opts.Container, opts.Name)
+ url := objectURL(c, opts.Container, opts.Name)
resp, err := perigee.Request("HEAD", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{204},
@@ -181,7 +181,7 @@
h["X-Object-Meta-"+k] = v
}
- url := getObjectURL(c, opts.Container, opts.Name)
+ url := objectURL(c, opts.Container, opts.Name)
_, err := perigee.Request("POST", url, perigee.Options{
MoreHeaders: h,
OkCodes: []int{202},
diff --git a/openstack/storage/v1/objects/urls.go b/openstack/storage/v1/objects/urls.go
index 5a52aed..a377960 100644
--- a/openstack/storage/v1/objects/urls.go
+++ b/openstack/storage/v1/objects/urls.go
@@ -2,12 +2,12 @@
import "github.com/rackspace/gophercloud"
-// getObjectURL returns the URI for making Object requests.
-func getObjectURL(c *gophercloud.ServiceClient, container, object string) string {
+// objectURL returns the URI for making Object requests.
+func objectURL(c *gophercloud.ServiceClient, container, object string) string {
return c.ServiceURL(container, object)
}
-// getContainerURL returns the URI for making Container requests.
-func getContainerURL(c *gophercloud.ServiceClient, container string) string {
+// containerURL returns the URI for making Container requests.
+func containerURL(c *gophercloud.ServiceClient, container string) string {
return c.ServiceURL(container)
}