Sha256: ce1dc4780ca0283eea0602a90a11a6da131d656c76496531b817306391396e03

Contents?: true

Size: 655 Bytes

Versions: 13

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

13 entries across 13 versions & 1 rubygems

Version Path
ironfan-4.11.5 lib/ironfan/dsl/cluster.rb
ironfan-4.11.4 lib/ironfan/dsl/cluster.rb
ironfan-4.11.3 lib/ironfan/dsl/cluster.rb
ironfan-4.11.2 lib/ironfan/dsl/cluster.rb
ironfan-4.11.2.pre3 lib/ironfan/dsl/cluster.rb
ironfan-4.11.2.pre2 lib/ironfan/dsl/cluster.rb
ironfan-4.11.2.pre lib/ironfan/dsl/cluster.rb
ironfan-4.11.1 lib/ironfan/dsl/cluster.rb
ironfan-4.11.0 lib/ironfan/dsl/cluster.rb
ironfan-4.10.4 lib/ironfan/dsl/cluster.rb
ironfan-4.10.3 lib/ironfan/dsl/cluster.rb
ironfan-4.10.2 lib/ironfan/dsl/cluster.rb
ironfan-4.10.1 lib/ironfan/dsl/cluster.rb