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/requests_test.go b/openstack/compute/v2/servers/requests_test.go
index e042074..6e23c52 100644
--- a/openstack/compute/v2/servers/requests_test.go
+++ b/openstack/compute/v2/servers/requests_test.go
@@ -124,6 +124,15 @@
th.AssertNoErr(t, res.Err)
}
+func TestGetPassword(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ HandlePasswordGetSuccessfully(t)
+
+ res := GetPassword(client.ServiceClient(), "1234asdf")
+ th.AssertNoErr(t, res.Err)
+}
+
func TestRebootServer(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()