class Chef::Knife::SceVolumeAttach
Public Instance Methods
run()
click to toggle source
# File lib/chef/knife/sce_volume_attach.rb, line 28 def run $stdout.sync = true validate! (1..@name_args.length-1).each do |idx| puts "Attaching volume #{@name_args[idx]} to #{name_args[0]}" begin res = connection.modify_instance(@name_args[0], { "type" => "attach", "storageID" => @name_args[idx] }) rescue Exception => e ui.error("There was an error while attaching volume #{@name_args[idx]}. Error is #{e.to_s}") end end end