Sha256: 14bcf1213b9128431f954a54e3b41fb6c00c98d79fc9f8b30ec1e22102c0bf8a

Contents?: true

Size: 832 Bytes

Versions: 15

Compression:

Stored size: 832 Bytes

Contents

require 'bosh/stemcell/infrastructure'
require 'bosh/stemcell/operating_system'
require 'bosh/stemcell/agent'

module Bosh::Stemcell
  class Definition
    attr_reader :infrastructure, :operating_system, :agent

    def self.for(infrastructure_name, operating_system_name, agent_name)
      new(
        Bosh::Stemcell::Infrastructure.for(infrastructure_name),
        Bosh::Stemcell::OperatingSystem.for(operating_system_name),
        Bosh::Stemcell::Agent.for(agent_name),
      )
    end

    def initialize(infrastructure, operating_system, agent)
      @infrastructure = infrastructure
      @operating_system = operating_system
      @agent = agent
    end

    def ==(other)
      infrastructure == other.infrastructure &&
        operating_system == other.operating_system &&
        agent == other.agent
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bosh-stemcell-1.2427.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2416.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2411.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2409.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2398.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2384.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2375.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2372.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2366.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2361.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2355.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2354.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2347.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2341.0 lib/bosh/stemcell/definition.rb
bosh-stemcell-1.2334.0 lib/bosh/stemcell/definition.rb