Class: Chef::Knife::OneandoneBlockStorageAttach

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

Instance Method Summary collapse

Methods included from OneandoneBase

#formated_output, included, #init_client

Instance Method Details

#runObject



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/chef/knife/oneandone_block_storage_attach.rb', line 20

def run
  $stdout.sync = true

  init_client

  block_storage = OneAndOne::BlockStorage.new
  response = block_storage.attach_server(block_storage_id: config[:id], server_id: config[:server_id])

  formated_output(response, true)
  puts "Block storage attached to server #{ui.color('updated', :bold)}"
end