rename functions
diff --git a/openstack/client.go b/openstack/client.go
index 1d3f4d7..b30d205 100644
--- a/openstack/client.go
+++ b/openstack/client.go
@@ -262,6 +262,7 @@
return &gophercloud.ServiceClient{ProviderClient: client, Endpoint: url}, nil
}
+// NewDBV1 creates a ServiceClient that may be used to access the v1 DB service.
func NewDBV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
eo.ApplyDefaults("database")
url, err := client.EndpointLocator(eo)
diff --git a/openstack/db/v1/instances/requests.go b/openstack/db/v1/instances/requests.go
index 425db13..e2b8ad0 100644
--- a/openstack/db/v1/instances/requests.go
+++ b/openstack/db/v1/instances/requests.go
@@ -172,10 +172,10 @@
return res.Body.(map[string]interface{})["rootEnabled"] == true, err
}
-// RestartService will restart only the MySQL Instance. Restarting MySQL will
+// Restart will restart only the MySQL Instance. Restarting MySQL will
// erase any dynamic configuration settings that you have made within MySQL.
// The MySQL service will be unavailable until the instance restarts.
-func RestartService(client *gophercloud.ServiceClient, id string) ActionResult {
+func Restart(client *gophercloud.ServiceClient, id string) ActionResult {
var res ActionResult
_, res.Err = client.Request("POST", actionURL(client, id), gophercloud.RequestOpts{
@@ -186,9 +186,9 @@
return res
}
-// ResizeInstance changes the memory size of the instance, assuming a valid
+// Resize changes the memory size of the instance, assuming a valid
// flavorRef is provided. It will also restart the MySQL service.
-func ResizeInstance(client *gophercloud.ServiceClient, id, flavorRef string) ActionResult {
+func Resize(client *gophercloud.ServiceClient, id, flavorRef string) ActionResult {
var res ActionResult
type resize struct {
diff --git a/openstack/db/v1/instances/requests_test.go b/openstack/db/v1/instances/requests_test.go
index 9e28df4..3cc2b70 100644
--- a/openstack/db/v1/instances/requests_test.go
+++ b/openstack/db/v1/instances/requests_test.go
@@ -105,21 +105,21 @@
th.AssertEquals(t, true, isEnabled)
}
-func TestRestartService(t *testing.T) {
+func TestRestart(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
HandleRestart(t)
- res := RestartService(fake.ServiceClient(), instanceID)
+ res := Restart(fake.ServiceClient(), instanceID)
th.AssertNoErr(t, res.Err)
}
-func TestResizeInstance(t *testing.T) {
+func TestResize(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
HandleResize(t)
- res := ResizeInstance(fake.ServiceClient(), instanceID, "2")
+ res := Resize(fake.ServiceClient(), instanceID, "2")
th.AssertNoErr(t, res.Err)
}