Class: Chef::Knife::OneandoneSshKeyRename

Inherits:
Chef::Knife
  • Object
show all
Includes:
OneandoneBase
Defined in:
lib/chef/knife/oneandone_ssh_key_rename.rb

Instance Method Summary collapse

Methods included from OneandoneBase

#formated_output, included, #init_client

Instance Method Details

#runObject



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/chef/knife/oneandone_ssh_key_rename.rb', line 24

def run
  $stdout.sync = true

  init_client

  ssh_key = OneAndOne::SshKey.new
  response = ssh_key.modify(ssh_key_id: config[:id], name: config[:name], description: config[:description])

  formated_output(response, true)
  puts "SSH Key updated #{ui.color('updated', :bold)}"
end