Method: Deployment::Methods::CDB#get_cdb_parameters

Defined in:
lib/depengine/dsl/cdb.rb

#get_cdb_parameters(version) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/depengine/dsl/cdb.rb', line 10

def get_cdb_parameters(version)
  Helper.validates_presence_of version, "version parameter is missing"
  Helper.validates_presence_of $recipe_config['cdb_host'], \
                               "cdb_host parameter is missing"
  Helper.validates_presence_of $recipe_config['cdb_context'], \
                               "cdb_context parameter is missing"
  Helper.validates_presence_of $recipe_config[:module_name], \
                               "module_name parameter is missing"

  cdb          = Provider::CDB.new
  cdb.protocol = 'http'
  cdb.host     = $recipe_config['cdb_host']
  cdb.context  = $recipe_config['cdb_context']
  cdb.env      = $recipe_config[:env]

  cdb.get_parameters(File.join( $recipe_config[:env], \
                            $recipe_config[:module_name] ), version)
end