Class: Euca::Keypair
Constant Summary collapse
- TYPE_ID =
"keypair"- TYPE_ATTRS =
%w(type id fingerprint)
Class Method Summary collapse
Class Method Details
.create(email, path = "~/.ssh") ⇒ Object
9 10 11 12 13 14 |
# File 'lib/euca/api/keypair.rb', line 9 def self.create email, path = "~/.ssh" keyfile = "#{path}/#{email}.id" keypairs = euca("create-keypair", email, ">", keyfile) Euca.sh :chmod, 600, keyfile {"id" => email} end |
.destroy(id) ⇒ Object
16 17 18 |
# File 'lib/euca/api/keypair.rb', line 16 def self.destroy id euca("delete-keypair", id).first end |