Class: Mccloud::Command::KeypairCommand
- Defined in:
- lib/mccloud/command/keypair.rb
Instance Attribute Summary
Attributes inherited from GroupBase
Instance Method Summary collapse
- #generate(name = nil) ⇒ Object
-
#list(selection = nil) ⇒ Object
method_options :test => :boolean.
Methods inherited from GroupBase
Methods included from Helpers
Constructor Details
This class inherits a constructor from Mccloud::Command::GroupBase
Instance Method Details
#generate(name = nil) ⇒ Object
18 19 20 21 22 |
# File 'lib/mccloud/command/keypair.rb', line 18 def generate(name=nil) rsa_key=::Mccloud::Util::SSHKey.generate({ :comment => "mykey"}) env.ui.info rsa_key.ssh_public_key env.ui.info rsa_key.rsa_private_key end |
#list(selection = nil) ⇒ Object
method_options :test => :boolean
10 11 12 13 14 15 |
# File 'lib/mccloud/command/keypair.rb', line 10 def list(selection=nil) env.config.keypairs.each do |name,provider| env.ui.info("Keypair name:#{name}") end end |