Parent

Methods

Included Modules

Class/Module Index [+]

Quicksearch

Chef::Knife::ClusterList

Public Instance Methods

run() click to toggle source
# File lib/chef/knife/cluster_list.rb, line 39
def run
  load_ironfan
  configure_dry_run

  data = Ironfan.cluster_filenames.map do |name, path|
    as_table = { :cluster => name, :path => path }
    if config[:facets]
      facets = Ironfan.load_cluster(name).facets.to_a.map(&:name).join(', ')
      as_table.merge!(:facets => facets)
    end
    as_table
  end

  ui.info "Cluster Path: #{ Ironfan.cluster_path.join ", " }"
  headers = config[:facets] ? [:cluster, :facets, :path] : [:cluster, :path] 
  Formatador.display_compact_table(data, headers)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.