fixes after rackspace/gophercloud merge
diff --git a/openstack/compute/v2/servers/requests.go b/openstack/compute/v2/servers/requests.go
index cf46600..6e23ada 100644
--- a/openstack/compute/v2/servers/requests.go
+++ b/openstack/compute/v2/servers/requests.go
@@ -733,10 +733,7 @@
}
// GetPassword makes a request against the nova API to get the encrypted administrative password.
-func GetPassword(client *gophercloud.ServiceClient, serverId string) GetPasswordResult {
- var res GetPasswordResult
- _, res.Err = client.Request("GET", passwordURL(client, serverId), gophercloud.RequestOpts{
- JSONResponse: &res.Body,
- })
- return res
+func GetPassword(client *gophercloud.ServiceClient, serverId string) (r GetPasswordResult) {
+ _, r.Err = client.Get(passwordURL(client, serverId), &r.Body, nil)
+ return
}
diff --git a/openstack/compute/v2/servers/results_test.go b/openstack/compute/v2/servers/results_test.go
index 2dba484..5b56055 100644
--- a/openstack/compute/v2/servers/results_test.go
+++ b/openstack/compute/v2/servers/results_test.go
@@ -8,8 +8,8 @@
"fmt"
"testing"
- "github.com/rackspace/gophercloud"
- th "github.com/rackspace/gophercloud/testhelper"
+ "github.com/gophercloud/gophercloud"
+ th "github.com/gophercloud/gophercloud/testhelper"
"golang.org/x/crypto/ssh"
)
diff --git a/openstack/compute/v2/servers/urls_test.go b/openstack/compute/v2/servers/urls_test.go
deleted file mode 100644
index 9015d06..0000000
--- a/openstack/compute/v2/servers/urls_test.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package servers
-
-import (
- "testing"
-
- "github.com/rackspace/gophercloud"
- th "github.com/rackspace/gophercloud/testhelper"
-)
-
-const endpoint = "http://localhost:57909"
-
-func endpointClient() *gophercloud.ServiceClient {
- return &gophercloud.ServiceClient{Endpoint: endpoint}
-}
-
-func TestCreateURL(t *testing.T) {
- actual := createURL(endpointClient())
- expected := endpoint + "servers"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestListURL(t *testing.T) {
- actual := listURL(endpointClient())
- expected := endpoint + "servers"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestListDetailURL(t *testing.T) {
- actual := listDetailURL(endpointClient())
- expected := endpoint + "servers/detail"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestDeleteURL(t *testing.T) {
- actual := deleteURL(endpointClient(), "foo")
- expected := endpoint + "servers/foo"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestGetURL(t *testing.T) {
- actual := getURL(endpointClient(), "foo")
- expected := endpoint + "servers/foo"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestUpdateURL(t *testing.T) {
- actual := updateURL(endpointClient(), "foo")
- expected := endpoint + "servers/foo"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestActionURL(t *testing.T) {
- actual := actionURL(endpointClient(), "foo")
- expected := endpoint + "servers/foo/action"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestMetadatumURL(t *testing.T) {
- actual := metadatumURL(endpointClient(), "foo", "bar")
- expected := endpoint + "servers/foo/metadata/bar"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestMetadataURL(t *testing.T) {
- actual := metadataURL(endpointClient(), "foo")
- expected := endpoint + "servers/foo/metadata"
- th.CheckEquals(t, expected, actual)
-}
-
-func TestPasswordURL(t *testing.T) {
- actual := passwordURL(endpointClient(), "foo")
- expected := endpoint + "servers/foo/os-server-password"
- th.CheckEquals(t, expected, actual)
-}