Rename getFooURL to fooURL.
diff --git a/openstack/compute/v2/flavors/requests.go b/openstack/compute/v2/flavors/requests.go
index 4d67d04..47eb172 100644
--- a/openstack/compute/v2/flavors/requests.go
+++ b/openstack/compute/v2/flavors/requests.go
@@ -33,14 +33,14 @@
return FlavorPage{pagination.LinkedPageBase{LastHTTPResponse: r}}
}
- return pagination.NewPager(client, getListURL(client, lfo), createPage)
+ return pagination.NewPager(client, listURL(client, lfo), createPage)
}
// Get instructs OpenStack to provide details on a single flavor, identified by its ID.
// Use ExtractFlavor to convert its result into a Flavor.
func Get(client *gophercloud.ServiceClient, id string) GetResult {
var gr GetResult
- gr.Err = perigee.Get(getFlavorURL(client, id), perigee.Options{
+ gr.Err = perigee.Get(flavorURL(client, id), perigee.Options{
Results: &gr.Resp,
MoreHeaders: client.Provider.AuthenticatedHeaders(),
})
diff --git a/openstack/compute/v2/flavors/urls.go b/openstack/compute/v2/flavors/urls.go
index 0e2d7c2..9e5b562 100644
--- a/openstack/compute/v2/flavors/urls.go
+++ b/openstack/compute/v2/flavors/urls.go
@@ -8,7 +8,7 @@
"github.com/rackspace/gophercloud"
)
-func getListURL(client *gophercloud.ServiceClient, lfo ListFilterOptions) string {
+func listURL(client *gophercloud.ServiceClient, lfo ListFilterOptions) string {
v := url.Values{}
if lfo.ChangesSince != "" {
v.Set("changes-since", lfo.ChangesSince)
@@ -32,6 +32,6 @@
return client.ServiceURL("flavors", "detail") + tail
}
-func getFlavorURL(client *gophercloud.ServiceClient, id string) string {
+func flavorURL(client *gophercloud.ServiceClient, id string) string {
return client.ServiceURL("flavors", id)
}
diff --git a/openstack/compute/v2/images/requests.go b/openstack/compute/v2/images/requests.go
index 91d2b2a..a0b2cbf 100644
--- a/openstack/compute/v2/images/requests.go
+++ b/openstack/compute/v2/images/requests.go
@@ -57,14 +57,14 @@
return ListPage{pagination.LinkedPageBase{LastHTTPResponse: r}}
}
- return pagination.NewPager(client, getListURL(client), createPage)
+ return pagination.NewPager(client, listURL(client), createPage)
}
// Get acquires additional detail about a specific image by ID.
// Use ExtractImage() to intepret the result as an openstack Image.
func Get(client *gophercloud.ServiceClient, id string) GetResult {
var result GetResult
- _, result.Err = perigee.Request("GET", getImageURL(client, id), perigee.Options{
+ _, result.Err = perigee.Request("GET", imageURL(client, id), perigee.Options{
MoreHeaders: client.Provider.AuthenticatedHeaders(),
Results: &result.Resp,
OkCodes: []int{200},
diff --git a/openstack/compute/v2/images/urls.go b/openstack/compute/v2/images/urls.go
index 93fa8d2..4ae2269 100644
--- a/openstack/compute/v2/images/urls.go
+++ b/openstack/compute/v2/images/urls.go
@@ -2,10 +2,10 @@
import "github.com/rackspace/gophercloud"
-func getListURL(client *gophercloud.ServiceClient) string {
+func listURL(client *gophercloud.ServiceClient) string {
return client.ServiceURL("images", "detail")
}
-func getImageURL(client *gophercloud.ServiceClient, id string) string {
+func imageURL(client *gophercloud.ServiceClient, id string) string {
return client.ServiceURL("images", id)
}
diff --git a/openstack/compute/v2/servers/requests.go b/openstack/compute/v2/servers/requests.go
index 5d34a74..f75c7cd 100644
--- a/openstack/compute/v2/servers/requests.go
+++ b/openstack/compute/v2/servers/requests.go
@@ -60,13 +60,13 @@
return ListPage{pagination.LinkedPageBase{LastHTTPResponse: r}}
}
- return pagination.NewPager(client, getDetailURL(client), createPage)
+ return pagination.NewPager(client, detailURL(client), createPage)
}
// Create requests a server to be provisioned to the user in the current tenant.
func Create(client *gophercloud.ServiceClient, opts map[string]interface{}) CreateResult {
var result CreateResult
- _, result.Err = perigee.Request("POST", getListURL(client), perigee.Options{
+ _, result.Err = perigee.Request("POST", listURL(client), perigee.Options{
Results: &result.Resp,
ReqBody: map[string]interface{}{
"server": opts,
@@ -79,7 +79,7 @@
// Delete requests that a server previously provisioned be removed from your account.
func Delete(client *gophercloud.ServiceClient, id string) error {
- _, err := perigee.Request("DELETE", getServerURL(client, id), perigee.Options{
+ _, err := perigee.Request("DELETE", serverURL(client, id), perigee.Options{
MoreHeaders: client.Provider.AuthenticatedHeaders(),
OkCodes: []int{204},
})
@@ -89,7 +89,7 @@
// Get requests details on a single server, by ID.
func Get(client *gophercloud.ServiceClient, id string) GetResult {
var result GetResult
- _, result.Err = perigee.Request("GET", getServerURL(client, id), perigee.Options{
+ _, result.Err = perigee.Request("GET", serverURL(client, id), perigee.Options{
Results: &result.Resp,
MoreHeaders: client.Provider.AuthenticatedHeaders(),
})
@@ -99,7 +99,7 @@
// Update requests that various attributes of the indicated server be changed.
func Update(client *gophercloud.ServiceClient, id string, opts map[string]interface{}) UpdateResult {
var result UpdateResult
- _, result.Err = perigee.Request("PUT", getServerURL(client, id), perigee.Options{
+ _, result.Err = perigee.Request("PUT", serverURL(client, id), perigee.Options{
Results: &result.Resp,
ReqBody: map[string]interface{}{
"server": opts,
@@ -119,7 +119,7 @@
req.ChangePassword.AdminPass = newPassword
- _, err := perigee.Request("POST", getActionURL(client, id), perigee.Options{
+ _, err := perigee.Request("POST", actionURL(client, id), perigee.Options{
ReqBody: req,
MoreHeaders: client.Provider.AuthenticatedHeaders(),
OkCodes: []int{202},
@@ -184,7 +184,7 @@
}
}
- _, err := perigee.Request("POST", getActionURL(client, id), perigee.Options{
+ _, err := perigee.Request("POST", actionURL(client, id), perigee.Options{
ReqBody: struct {
C map[string]string `json:"reboot"`
}{
@@ -252,7 +252,7 @@
additional["imageRef"] = imageRef
additional["adminPass"] = password
- _, result.Err = perigee.Request("POST", getActionURL(client, id), perigee.Options{
+ _, result.Err = perigee.Request("POST", actionURL(client, id), perigee.Options{
ReqBody: struct {
R map[string]interface{} `json:"rebuild"`
}{
@@ -273,7 +273,7 @@
// If you like it, call ConfirmResize() to commit the resize permanently.
// Otherwise, call RevertResize() to restore the old configuration.
func Resize(client *gophercloud.ServiceClient, id, flavorRef string) error {
- _, err := perigee.Request("POST", getActionURL(client, id), perigee.Options{
+ _, err := perigee.Request("POST", actionURL(client, id), perigee.Options{
ReqBody: struct {
R map[string]interface{} `json:"resize"`
}{
@@ -288,7 +288,7 @@
// ConfirmResize confirms a previous resize operation on a server.
// See Resize() for more details.
func ConfirmResize(client *gophercloud.ServiceClient, id string) error {
- _, err := perigee.Request("POST", getActionURL(client, id), perigee.Options{
+ _, err := perigee.Request("POST", actionURL(client, id), perigee.Options{
ReqBody: map[string]interface{}{"confirmResize": nil},
MoreHeaders: client.Provider.AuthenticatedHeaders(),
OkCodes: []int{204},
@@ -299,7 +299,7 @@
// RevertResize cancels a previous resize operation on a server.
// See Resize() for more details.
func RevertResize(client *gophercloud.ServiceClient, id string) error {
- _, err := perigee.Request("POST", getActionURL(client, id), perigee.Options{
+ _, err := perigee.Request("POST", actionURL(client, id), perigee.Options{
ReqBody: map[string]interface{}{"revertResize": nil},
MoreHeaders: client.Provider.AuthenticatedHeaders(),
OkCodes: []int{202},
diff --git a/openstack/compute/v2/servers/urls.go b/openstack/compute/v2/servers/urls.go
index 7cfda39..52be73e 100644
--- a/openstack/compute/v2/servers/urls.go
+++ b/openstack/compute/v2/servers/urls.go
@@ -2,18 +2,18 @@
import "github.com/rackspace/gophercloud"
-func getListURL(client *gophercloud.ServiceClient) string {
+func listURL(client *gophercloud.ServiceClient) string {
return client.ServiceURL("servers")
}
-func getDetailURL(client *gophercloud.ServiceClient) string {
+func detailURL(client *gophercloud.ServiceClient) string {
return client.ServiceURL("servers", "detail")
}
-func getServerURL(client *gophercloud.ServiceClient, id string) string {
+func serverURL(client *gophercloud.ServiceClient, id string) string {
return client.ServiceURL("servers", id)
}
-func getActionURL(client *gophercloud.ServiceClient, id string) string {
+func actionURL(client *gophercloud.ServiceClient, id string) string {
return client.ServiceURL("servers", id, "action")
}