Add Nova get-password support
Add support to get a encrypted administrative password for a server
through a GET on: /v2.1/{tenant_id}/servers/{server_id}/os-server-password
optionally decrypting the password if a private key is supplied.
The same operation with OpenStack CLI is done with:
nova get-password <server_id> [private_key.pem]
diff --git a/openstack/compute/v2/servers/urls_test.go b/openstack/compute/v2/servers/urls_test.go
index 17a1d28..9015d06 100644
--- a/openstack/compute/v2/servers/urls_test.go
+++ b/openstack/compute/v2/servers/urls_test.go
@@ -66,3 +66,9 @@
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)
+}