Class: Chef::Knife::OneandoneBlockStorageDetach

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

Instance Method Summary collapse

Methods included from OneandoneBase

#formated_output, included, #init_client

Instance Method Details

#runObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/chef/knife/oneandone_block_storage_detach.rb', line 15

def run
  $stdout.sync = true

  init_client

  block_storage = OneAndOne::BlockStorage.new
  response = block_storage.detach_server(block_storage_id: config[:id])

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