Class: Bosh::Stemcell::StageCollection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/bosh/stemcell/stage_collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(definition) ⇒ StageCollection

Returns a new instance of StageCollection.


9
10
11
# File 'lib/bosh/stemcell/stage_collection.rb', line 9

def initialize(definition)
  @definition = definition
end

Instance Method Details

#agent_stagesObject


32
33
34
35
36
37
38
39
40
41
# File 'lib/bosh/stemcell/stage_collection.rb', line 32

def agent_stages
  [
    :bosh_ruby,
    :bosh_go_agent,
    :bosh_micro_go,
    :aws_cli,
    :logrotate_config,
    :dev_tools_config,
  ].reject{ |s| Bosh::Stemcell::Arch.ppc64le? and [:bosh_ruby, :bosh_micro_go].include?(s) }
end

#build_stemcell_image_stagesObject


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/bosh/stemcell/stage_collection.rb', line 43

def build_stemcell_image_stages
  stages = case infrastructure
  when Infrastructure::Aws then
    aws_stages
  when Infrastructure::OpenStack then
    openstack_stages
  when Infrastructure::Vsphere then
    vsphere_vcloud_stages
  when Infrastructure::Vcloud then
    vsphere_vcloud_stages
  when Infrastructure::Warden then
    warden_stages
  when Infrastructure::Azure then
    azure_stages
  when Infrastructure::Softlayer then
    softlayer_stages
  end

  stages.concat(finish_stemcell_stages)
end

#extract_operating_system_stagesObject


26
27
28
29
30
# File 'lib/bosh/stemcell/stage_collection.rb', line 26

def extract_operating_system_stages
  [
    :untar_base_os_image,
  ]
end

#operating_system_stagesObject


13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/bosh/stemcell/stage_collection.rb', line 13

def operating_system_stages
  case operating_system
    when OperatingSystem::Centos then
      centos_os_stages
    when OperatingSystem::Rhel then
      rhel_os_stages
    when OperatingSystem::Ubuntu then
      ubuntu_os_stages
    when OperatingSystem::Photonos then
      photonos_os_stages
  end
end

#package_stemcell_stages(disk_format) ⇒ Object


64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/bosh/stemcell/stage_collection.rb', line 64

def package_stemcell_stages(disk_format)
  case disk_format
    when 'raw' then
      raw_package_stages
    when 'qcow2' then
      qcow2_package_stages
    when 'ovf' then
      ovf_package_stages
    when 'vhd' then
      vhd_package_stages
    when 'files' then
      files_package_stages
  end
end