Class: Chef::Knife::ClusterList

Inherits:
Chef::Knife show all
Includes:
ClusterChef::KnifeCommon
Defined in:
lib/chef/knife/cluster_list.rb

Instance Method Summary collapse

Methods included from ClusterChef::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

#runObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/chef/knife/cluster_list.rb', line 32

def run
  load_cluster_chef
  configure_dry_run

  hash = ClusterChef.cluster_filenames

  table = []
  hash.keys.sort.each do |key|
    table.push( { :cluster => key, :path => hash[key] } )
  end

  ui.info "Cluster Path: #{ ClusterChef.cluster_path.join ", " }"

  Formatador.display_compact_table(table, [:cluster,:path])

end