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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



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

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)
  @disk_formats = options.fetch(:disk_formats)
end

Instance Attribute Details

#default_disk_sizeObject (readonly)

Returns the value of attribute default_disk_size.



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

def default_disk_size
  @default_disk_size
end

#disk_formatsObject (readonly)

Returns the value of attribute disk_formats.



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

def disk_formats
  @disk_formats
end

#hypervisorObject (readonly)

Returns the value of attribute hypervisor.



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

def hypervisor
  @hypervisor
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



45
46
47
48
49
# File 'lib/bosh/stemcell/infrastructure.rb', line 45

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

#additional_cloud_propertiesObject



41
42
43
# File 'lib/bosh/stemcell/infrastructure.rb', line 41

def additional_cloud_properties
  {}
end

#default_disk_formatObject



37
38
39
# File 'lib/bosh/stemcell/infrastructure.rb', line 37

def default_disk_format
  disk_formats.first
end