Class: VagrantPlugins::Filoo::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::Filoo::Config
- Defined in:
- lib/vagrant_filoo/config.rb
Instance Attribute Summary collapse
-
#additional_nic ⇒ Object
Returns the value of attribute additional_nic.
-
#cd_image_name ⇒ Object
Returns the value of attribute cd_image_name.
-
#cpu ⇒ Object
Returns the value of attribute cpu.
-
#filoo_api_entry_point ⇒ Object
Returns the value of attribute filoo_api_entry_point.
-
#filoo_api_key ⇒ String
The access key ID for accessing Filoo.
-
#hdd ⇒ Object
Returns the value of attribute hdd.
-
#ram ⇒ Object
Returns the value of attribute ram.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#security_groups=(value) ⇒ Object
set security_groups.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/vagrant_filoo/config.rb', line 20 def initialize() @filoo_api_key = nil @filoo_api_entry_point = nil @cd_image_name = nil @type = nil @cpu = nil @ram = nil @hdd = nil @additional_nic = nil end |
Instance Attribute Details
#additional_nic ⇒ Object
Returns the value of attribute additional_nic.
18 19 20 |
# File 'lib/vagrant_filoo/config.rb', line 18 def additional_nic @additional_nic end |
#cd_image_name ⇒ Object
Returns the value of attribute cd_image_name.
13 14 15 |
# File 'lib/vagrant_filoo/config.rb', line 13 def cd_image_name @cd_image_name end |
#cpu ⇒ Object
Returns the value of attribute cpu.
15 16 17 |
# File 'lib/vagrant_filoo/config.rb', line 15 def cpu @cpu end |
#filoo_api_entry_point ⇒ Object
Returns the value of attribute filoo_api_entry_point.
10 11 12 |
# File 'lib/vagrant_filoo/config.rb', line 10 def filoo_api_entry_point @filoo_api_entry_point end |
#filoo_api_key ⇒ String
The access key ID for accessing Filoo.
9 10 11 |
# File 'lib/vagrant_filoo/config.rb', line 9 def filoo_api_key @filoo_api_key end |
#hdd ⇒ Object
Returns the value of attribute hdd.
17 18 19 |
# File 'lib/vagrant_filoo/config.rb', line 17 def hdd @hdd end |
#ram ⇒ Object
Returns the value of attribute ram.
16 17 18 |
# File 'lib/vagrant_filoo/config.rb', line 16 def ram @ram end |
#type ⇒ Object
Returns the value of attribute type.
14 15 16 |
# File 'lib/vagrant_filoo/config.rb', line 14 def type @type end |
Instance Method Details
#finalize! ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/vagrant_filoo/config.rb', line 37 def finalize! # Try to get access keys from standard FILOO environment variables; they # will default to nil if the environment variables are not present. @filoo_api_key = ENV['FILOO_API_KEY'] if @filoo_api_key == nil @filoo_api_entry_point = ENV['FILOO_API_ENTRY_POINT'] if @filoo_api_entry_point == nil #set default values for machine @cd_image_name = 'Debian 7.7 - 64bit' if @cd_image_name == nil @type = 'dynamic' if @type == nil @cpu = 1 if @cpu == nil @ram = 128 if @ram == nil @hdd = 10 if @hdd == nil @additional_nic = false if @additional_nic == nil end |
#security_groups=(value) ⇒ Object
set security_groups
32 33 34 35 |
# File 'lib/vagrant_filoo/config.rb', line 32 def security_groups=(value) # convert value to array if necessary @security_groups = value.is_a?(Array) ? value : [value] end |