Sha256: 2dabab5cde9bbd8ee0c62c980bb275e36898252fe7d615e9a744b3f25c57b53d

Contents?: true

Size: 655 Bytes

Versions: 39

Compression:

Stored size: 655 Bytes

Contents

module Ironfan
  class Dsl

    class Cluster < Ironfan::Dsl::Compute
      collection :facets,       Ironfan::Dsl::Facet,   :resolver => :deep_resolve

      def initialize(attrs={},&block)
        super
        self.cluster_role       Ironfan::Dsl::Role.new(:name => "#{attrs[:name]}_cluster")
      end

      # Utility method to reference all servers from constituent facets
      def servers
        result = Gorillib::ModelCollection.new(:item_type => Ironfan::Dsl::Server, :key_method => :full_name)
        facets.each {|f| f.servers.each {|s| result << s} }
        result
      end

      def cluster_name()        name;   end
    end

  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
ironfan-4.9.10 lib/ironfan/dsl/cluster.rb
ironfan-4.9.9 lib/ironfan/dsl/cluster.rb
ironfan-4.9.8 lib/ironfan/dsl/cluster.rb
ironfan-4.9.7 lib/ironfan/dsl/cluster.rb
ironfan-4.9.6 lib/ironfan/dsl/cluster.rb
ironfan-4.9.5 lib/ironfan/dsl/cluster.rb
ironfan-4.9.4 lib/ironfan/dsl/cluster.rb
ironfan-4.9.3 lib/ironfan/dsl/cluster.rb
ironfan-4.9.2 lib/ironfan/dsl/cluster.rb
ironfan-4.9.1 lib/ironfan/dsl/cluster.rb
ironfan-4.9.0 lib/ironfan/dsl/cluster.rb
ironfan-4.8.7 lib/ironfan/dsl/cluster.rb
ironfan-4.8.6 lib/ironfan/dsl/cluster.rb
ironfan-4.8.5 lib/ironfan/dsl/cluster.rb
ironfan-4.8.4 lib/ironfan/dsl/cluster.rb
ironfan-4.8.3 lib/ironfan/dsl/cluster.rb
ironfan-4.8.2 lib/ironfan/dsl/cluster.rb
ironfan-4.8.1 lib/ironfan/dsl/cluster.rb
ironfan-4.8.0 lib/ironfan/dsl/cluster.rb
ironfan-4.7.7 lib/ironfan/dsl/cluster.rb