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.



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

def initialize(definition)
  @definition = definition
end

Instance Method Details

#agent_stagesObject



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/bosh/stemcell/stage_collection.rb', line 27

def agent_stages
  case agent
  when Agent::Go
    [
      :bosh_ruby,
      :bosh_go_agent,
      :bosh_micro_go,
      :aws_cli,
    ]
  when Agent::Ruby
    [
      :bosh_ruby,
      :bosh_agent,
      :bosh_micro,
    ]
  end
end

#extract_operating_system_stagesObject



21
22
23
24
25
# File 'lib/bosh/stemcell/stage_collection.rb', line 21

def extract_operating_system_stages
  [
    :untar_base_os_image,
  ]
end

#infrastructure_stagesObject



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

def infrastructure_stages
  case infrastructure
  when Infrastructure::Aws then
    aws_stages
  when Infrastructure::OpenStack then
    openstack_stages
  when Infrastructure::Vsphere then
    vsphere_stages
  when Infrastructure::Vcloud then
    vcloud_stages
  when Infrastructure::Warden then
    warden_stages
  end
end

#openstack_stagesObject



60
61
62
63
64
65
66
# File 'lib/bosh/stemcell/stage_collection.rb', line 60

def openstack_stages
  if operating_system.instance_of?(OperatingSystem::Centos)
    centos_openstack_stages
  else
    default_openstack_stages
  end
end

#operating_system_stagesObject



12
13
14
15
16
17
18
19
# File 'lib/bosh/stemcell/stage_collection.rb', line 12

def operating_system_stages
  case operating_system
  when OperatingSystem::Centos then
    centos_os_stages + common_os_stages
  when OperatingSystem::Ubuntu then
    ubuntu_os_stages + common_os_stages
  end
end

#vcloud_stagesObject



76
77
78
79
80
81
82
# File 'lib/bosh/stemcell/stage_collection.rb', line 76

def vcloud_stages
  if operating_system.instance_of?(OperatingSystem::Centos)
    centos_vcloud_stages
  else
    default_vcloud_stages
  end
end

#vsphere_stagesObject



68
69
70
71
72
73
74
# File 'lib/bosh/stemcell/stage_collection.rb', line 68

def vsphere_stages
  if operating_system.instance_of?(OperatingSystem::Centos)
    centos_vsphere_stages
  else
    default_vsphere_stages
  end
end