2012-02-23 04:38:44 -05:00
|
|
|
Shindo.tests('Fog::Compute[:openstack] | keypair requests', ['openstack']) do
|
|
|
|
|
|
|
|
@keypair_format = {
|
|
|
|
"public_key" => String,
|
|
|
|
"private_key" => String,
|
|
|
|
"user_id" => String,
|
|
|
|
"name" => String,
|
|
|
|
"fingerprint" => String
|
|
|
|
}
|
|
|
|
|
|
|
|
@keypair_list_format = {
|
|
|
|
"public_key" => String,
|
|
|
|
"name" => String,
|
|
|
|
"fingerprint" => String
|
|
|
|
}
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
tests('#create_key_pair((key_name, public_key = nil))').formats({"keypair" => @keypair_format}) do
|
|
|
|
Fog::Compute[:openstack].create_key_pair('from_shindo_test').body
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('#list_key_pairs').formats({"keypairs" => [{"keypair" => @keypair_list_format}]}) do
|
2012-02-27 06:59:53 -05:00
|
|
|
Fog::Compute[:openstack].list_key_pairs.body
|
2012-02-23 04:38:44 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
tests('#delete_key_pair(key_name)').succeeds do
|
2012-02-27 06:59:53 -05:00
|
|
|
Fog::Compute[:openstack].delete_key_pair('from_shindo_test')
|
2012-02-23 04:38:44 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|