Class: VagrantPlugins::Vmck::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-vmck/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



13
14
15
16
17
18
19
20
21
22
# File 'lib/vagrant-vmck/config.rb', line 13

def initialize
  @vmck_url = UNSET_VALUE
  @private_key_path = UNSET_VALUE
  @memory = UNSET_VALUE
  @cpus = UNSET_VALUE
  @image_path = UNSET_VALUE
  @storage = UNSET_VALUE
  @name = UNSET_VALUE
  @restrict_network = UNSET_VALUE
end

Instance Attribute Details

#cpusObject

Returns the value of attribute cpus.



7
8
9
# File 'lib/vagrant-vmck/config.rb', line 7

def cpus
  @cpus
end

#image_pathObject

Returns the value of attribute image_path.



8
9
10
# File 'lib/vagrant-vmck/config.rb', line 8

def image_path
  @image_path
end

#memoryObject

Returns the value of attribute memory.



6
7
8
# File 'lib/vagrant-vmck/config.rb', line 6

def memory
  @memory
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/vagrant-vmck/config.rb', line 10

def name
  @name
end

#private_key_pathObject

Returns the value of attribute private_key_path.



5
6
7
# File 'lib/vagrant-vmck/config.rb', line 5

def private_key_path
  @private_key_path
end

#restrict_networkObject

Returns the value of attribute restrict_network.



11
12
13
# File 'lib/vagrant-vmck/config.rb', line 11

def restrict_network
  @restrict_network
end

#storageObject

Returns the value of attribute storage.



9
10
11
# File 'lib/vagrant-vmck/config.rb', line 9

def storage
  @storage
end

#vmck_urlObject

Returns the value of attribute vmck_url.



4
5
6
# File 'lib/vagrant-vmck/config.rb', line 4

def vmck_url
  @vmck_url
end

Instance Method Details

#finalize!Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/vagrant-vmck/config.rb', line 24

def finalize!
  @vmck_url = nil if @vmck_url == UNSET_VALUE
  @private_key_path = nil if @private_key_path == UNSET_VALUE
  @memory = 512 if @memory == UNSET_VALUE
  @cpus = 1 if @cpus == UNSET_VALUE
  @image_path = 'imgbuild-master.qcow2.tar.gz' if @image_path == UNSET_VALUE
  @storage = nil if @storage == UNSET_VALUE
  @name = 'default' if @name == UNSET_VALUE
  @restrict_network = false if @restrict_network == UNSET_VALUE
end