class Chef::Knife::ProfitbricksServerReboot
Public Instance Methods
run()
click to toggle source
# File lib/chef/knife/profitbricks_server_reboot.rb, line 16 def run connection @name_args.each do |server_id| begin server = ProfitBricks::Server.get(Chef::Config[:knife][:datacenter_id], server_id) rescue Excon::Errors::NotFound ui.error("Server ID #{server_id} not found. Skipping.") next end server.reboot ui.warn("Server #{server.id} is rebooting") end end