Sha256: 90a62396b87e6cfed22a318877c313319f330686f45b4921ebf5f1e78a97cb0c

Contents?: true

Size: 1.35 KB

Versions: 36

Compression:

Stored size: 1.35 KB

Contents

#
# Author:: Philip (flip) Kromer (<flip@infochimps.com>)
# Copyright:: Copyright (c) 2011 Infochimps, Inc
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))

class Chef
  class Knife
    class ClusterList < Knife
      include Ironfan::KnifeCommon

      deps do
        require 'formatador'
      end

      banner "knife cluster list (options)"

      def run
        load_ironfan
        configure_dry_run

        hash = Ironfan.cluster_filenames

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

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

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

      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ironfan-4.6.1 lib/chef/knife/cluster_list.rb
ironfan-4.6.0 lib/chef/knife/cluster_list.rb
ironfan-4.5.2 lib/chef/knife/cluster_list.rb
ironfan-4.5.1 lib/chef/knife/cluster_list.rb
ironfan-4.5.0 lib/chef/knife/cluster_list.rb
ironfan-4.4.3 lib/chef/knife/cluster_list.rb
ironfan-4.4.2 lib/chef/knife/cluster_list.rb
ironfan-4.4.1 lib/chef/knife/cluster_list.rb
ironfan-4.4.0 lib/chef/knife/cluster_list.rb
ironfan-4.3.4 lib/chef/knife/cluster_list.rb
ironfan-4.3.3 lib/chef/knife/cluster_list.rb
ironfan-4.3.2 lib/chef/knife/cluster_list.rb
ironfan-4.3.1 lib/chef/knife/cluster_list.rb
ironfan-4.3.0 lib/chef/knife/cluster_list.rb
ironfan-4.2.3 lib/chef/knife/cluster_list.rb
ironfan-4.2.2 lib/chef/knife/cluster_list.rb
ironfan-4.2.1 lib/chef/knife/cluster_list.rb
ironfan-4.2.0 lib/chef/knife/cluster_list.rb
ironfan-4.1.1 lib/chef/knife/cluster_list.rb
ironfan-4.1.0 lib/chef/knife/cluster_list.rb