Class: Bosh::Director::CompiledPackageGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/compiled_package_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(release_version, stemcell) ⇒ CompiledPackageGroup

Returns a new instance of CompiledPackageGroup.



3
4
5
6
# File 'lib/bosh/director/compiled_package_group.rb', line 3

def initialize(release_version, stemcell)
  @release_version = release_version
  @stemcell = stemcell
end

Instance Attribute Details

#release_versionObject (readonly)

Returns the value of attribute release_version.



25
26
27
# File 'lib/bosh/director/compiled_package_group.rb', line 25

def release_version
  @release_version
end

Instance Method Details

#compiled_packagesObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/bosh/director/compiled_package_group.rb', line 8

def compiled_packages
  @compiled_packages ||= @release_version.packages.map do |package|
    package_dependency_key = KeyGenerator.new.dependency_key_from_models(package, @release_version)

    Models::CompiledPackage[
      :package_id => package.id,
      :stemcell_os => @stemcell.operating_system,
      :stemcell_version => @stemcell.version,
      :dependency_key => package_dependency_key
    ]
  end.compact
end

#stemcell_sha1Object



21
22
23
# File 'lib/bosh/director/compiled_package_group.rb', line 21

def stemcell_sha1
  @stemcell.sha1
end