Class: Bosh::Stemcell::Infrastructure::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/stemcell/infrastructure.rb

Direct Known Subclasses

Aws, NullInfrastructure, OpenStack, Vcloud, Vsphere, Warden

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



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

def initialize(options = {})
  @name = options.fetch(:name)
  @supports_light_stemcell = options.fetch(:supports_light_stemcell, false)
  @hypervisor = options.fetch(:hypervisor)
  @default_disk_size = options.fetch(:default_disk_size)
end

Instance Attribute Details

#default_disk_sizeObject (readonly)

Returns the value of attribute default_disk_size.



23
24
25
# File 'lib/bosh/stemcell/infrastructure.rb', line 23

def default_disk_size
  @default_disk_size
end

#hypervisorObject (readonly)

Returns the value of attribute hypervisor.



23
24
25
# File 'lib/bosh/stemcell/infrastructure.rb', line 23

def hypervisor
  @hypervisor
end

#nameObject (readonly)

Returns the value of attribute name.



23
24
25
# File 'lib/bosh/stemcell/infrastructure.rb', line 23

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



32
33
34
35
36
# File 'lib/bosh/stemcell/infrastructure.rb', line 32

def ==(other)
  name == other.name &&
    hypervisor == other.hypervisor &&
    default_disk_size == other.default_disk_size
end