Class: Cloudmaster::Configuration

Inherits:
BasicConfiguration show all
Defined in:
app/configuration.rb

Constant Summary

Constants inherited from BasicConfiguration

BasicConfiguration::DEFAULT_CONFIG_FILES, BasicConfiguration::DEFAULT_SEARCH_PATH

Instance Attribute Summary collapse

Attributes inherited from BasicConfiguration

#aws

Instance Method Summary collapse

Methods inherited from BasicConfiguration

add_config_files, add_search_paths, #keys, setup_config_files, setup_search_path

Constructor Details

#initialize(config_files = [], opts = []) ⇒ Configuration

Create a config structure by reading the given config_filenames. The base class handles the aws config and the default config.



16
17
18
19
20
21
22
23
24
25
26
# File 'app/configuration.rb', line 16

def initialize(config_files = [], opts = [])
  @pools = []
  @default = {}
  @opts = opts
  # search for config files in this directory too
  super(config_files, [ File.dirname(__FILE__)])
  @default.merge!({:user_data => { 
    :aws_env => @aws[:aws_env],
    :aws_access_key => @aws[:aws_access_key],
  :aws_secret_key => @aws[:aws_secret_key]}})
end

Instance Attribute Details

#defaultObject (readonly)

Returns the value of attribute default.



12
13
14
# File 'app/configuration.rb', line 12

def default
  @default
end

#poolsObject (readonly)

Returns the value of attribute pools.



12
13
14
# File 'app/configuration.rb', line 12

def pools
  @pools
end

Instance Method Details

#refreshObject



28
29
30
31
32
# File 'app/configuration.rb', line 28

def refresh
  @pools = []
  @default = {}
  super
end