Class: Vagrant::Smartos::Zones::Config::Zone

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/smartos/zones/config/zone.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeZone

Returns a new instance of Zone.



11
12
13
14
15
16
17
18
19
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 11

def initialize
  @brand = UNSET_VALUE
  @disk_size = nil
  @image = nil
  @kernel_version = UNSET_VALUE
  @memory = nil
  @name = nil
  @synced_folders = []
end

Instance Attribute Details

#brandObject

Returns the value of attribute brand.



8
9
10
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 8

def brand
  @brand
end

#disk_sizeObject

Returns the value of attribute disk_size.



8
9
10
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 8

def disk_size
  @disk_size
end

#imageObject

Returns the value of attribute image.



8
9
10
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 8

def image
  @image
end

#kernel_versionObject

Returns the value of attribute kernel_version.



8
9
10
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 8

def kernel_version
  @kernel_version
end

#memoryObject

Returns the value of attribute memory.



8
9
10
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 8

def memory
  @memory
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 8

def name
  @name
end

#synced_foldersObject (readonly)

Returns the value of attribute synced_folders.



9
10
11
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 9

def synced_folders
  @synced_folders
end

Instance Method Details

#finalize!Object



25
26
27
28
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 25

def finalize!
  @brand = 'joyent' if @brand == UNSET_VALUE
  @kernel_version = '3.16' if @kernel_version == UNSET_VALUE
end

#synced_folder(*args) ⇒ Object



21
22
23
# File 'lib/vagrant/smartos/zones/config/zone.rb', line 21

def synced_folder(*args)
  @synced_folders << args
end