Class: ClusterChef::Script
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- ClusterChef::Script
- Includes:
- KnifeCommon
- Defined in:
- lib/chef/knife/generic_command.rb
Direct Known Subclasses
Chef::Knife::ClusterBootstrap, Chef::Knife::ClusterKill, Chef::Knife::ClusterProxy, Chef::Knife::ClusterStart, Chef::Knife::ClusterStop, Chef::Knife::ClusterSync
Instance Method Summary collapse
Methods included from KnifeCommon
#bootstrapper, #configure_dry_run, #confirm_execution, #confirm_or_exit, #die, #display, #get_relevant_slice, #get_slice, included, #load_cluster_chef, load_deps, #predicate_str, #progressbar_for_threads, #relevant?, #run_bootstrap, #section, #sub_command
Instance Method Details
#perform_execution(target) ⇒ Object
62 63 64 |
# File 'lib/chef/knife/generic_command.rb', line 62 def perform_execution(target) target.send(sub_command) end |
#run ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/chef/knife/generic_command.rb', line 39 def run load_cluster_chef die() if @name_args.empty? configure_dry_run target = get_relevant_slice(* @name_args) die("No nodes to #{sub_command}, exiting", 1) if target.empty? ui.info(["\n", ui.color("Running #{sub_command}", :cyan), " on #{target.joined_names}..."].join()) unless config[:yes] ui.info("") confirm_execution(target) end # perform_execution(target) ui.info("") ui.info "Finished! Current state:" display(target) end |