Class: Knifecosmic::CosmicKeypairList

Inherits:
Chef::Knife show all
Includes:
Chef::Knife::KnifecosmicBaseList
Defined in:
lib/chef/knife/cosmic_keypair_list.rb

Instance Method Summary collapse

Methods included from Chef::Knife::KnifecosmicBaseList

included, #list_object, #list_object_fields, #output_format

Instance Method Details

#runObject



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/chef/knife/cosmic_keypair_list.rb', line 29

def run
  validate_base_options
  
  columns = [
    'Name        :name',
    'Fingerprint :fingerprint'
  ]

  params = { 'command' => "listSSHKeyPairs" }
  
  result = connection.list_object(params, "sshkeypair")
  list_object(columns, result)
end