Class: Chef::Knife::ClusterStop
Instance Method Summary
collapse
#run
#bootstrapper, #configure_dry_run, #confirm_or_exit, #die, #display, #get_relevant_slice, #get_slice, included, #load_cluster_chef, load_deps, #predicate_str, #progressbar_for_threads, #run_bootstrap, #section, #sub_command
Instance Method Details
#confirm_execution(target) ⇒ Object
36
37
38
39
40
|
# File 'lib/chef/knife/cluster_stop.rb', line 36
def confirm_execution(target)
ui.info " Unless these nodes are backed by EBS volumes, this will result in loss of all data"
ui.info " not saved elsewhere. Even if they are EBS backed, there may still be some data loss."
confirm_or_exit("Are you absolutely certain that you want to perform this action? (Type 'Yes' to confirm) ", 'Yes')
end
|
29
30
31
32
33
34
|
# File 'lib/chef/knife/cluster_stop.rb', line 29
def perform_execution(target)
section("Stopping machines")
super(target)
section("Announcing Chef nodes as stopped")
target.send(:delegate_to_servers, :announce_as_stopped)
end
|
#relevant?(server) ⇒ Boolean
25
26
27
|
# File 'lib/chef/knife/cluster_stop.rb', line 25
def relevant?(server)
server.running?
end
|