# File lib/chef/knife/cluster_kill.rb, line 69 def confirm_execution(target) nodes = target.map(&:node).compact machines = target.map(&:machine).compact delete_message = [ (((!config[:chef]) || nodes.empty?) ? nil : "#{nodes.length} chef nodes"), (((!config[:cloud]) || machines.empty?) ? nil : "#{machines.length} fog servers") ].compact.join(" and ") confirm_or_exit("Are you absolutely certain that you want to delete #{delete_message}? (Type 'Yes' to confirm) ", 'Yes') end
# File lib/chef/knife/cluster_kill.rb, line 59 def display(target, *args, &block) super permanent = target.select(&:permanent?) ui.info Formatador.display_line("servers with [red]'permanent=true'[reset] ignored: [blue]#{permanent.map(&:name).inspect}[reset]. (To kill, change 'permanent' to false, run knife cluster sync, and re-try)") unless permanent.empty? bogus = target.select(&:bogus?) ui.info Formatador.display_line("[red]Bogus servers detected[reset]: [blue]#{bogus.map(&:name).inspect}[reset]") unless bogus.empty? end
Execute every last mf’ing one of em
# File lib/chef/knife/cluster_kill.rb, line 47 def perform_execution(target) if config[:cloud] section("Killing Cloud Computers") target.kill :providers => :iaas end if config[:chef] section("Killing Chef") target.kill :providers => :chef end end
Generated with the Darkfish Rdoc Generator 2.