Permalink
Browse files

Normalize the hash storage pass to include the barclamp name

  • Loading branch information...
1 parent 8098a5e commit 8bec60e0fb02902e24694e8c080bb3a8b7a78d8f @galthaus galthaus committed Aug 13, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 crowbar_framework/app/models/keystone_service.rb
@@ -18,7 +18,7 @@ class KeystoneService < ServiceObject
def proposal_dependencies(prop_config)
answer = []
hash = prop_config.config_hash
- if hash["sql_engine"] == "mysql"
+ if hash["keystone"]["sql_engine"] == "mysql"
answer << { "barclamp" => "mysql", "inst" => hash["mysql_instance"] }
end
answer
@@ -34,7 +34,7 @@ def create_proposal
end
hash = base.config_hash
- hash["mysql_instance"] = ""
+ hash["keystone"]["mysql_instance"] = ""
begin
mysql = Barclamp.find_by_name("mysql")
# Look for active roles
@@ -44,15 +44,15 @@ def create_proposal
mysqls = mysql.proposals
end
unless mysqls.empty?
- hash["mysql_instance"] = mysqls[0].name
+ hash["keystone"]["mysql_instance"] = mysqls[0].name
end
- hash["sql_engine"] = "mysql"
+ hash["keystone"]["sql_engine"] = "mysql"
rescue
@logger.info("Keystone create_proposal: no mysql found")
- hash["sql_engine"] = "mysql"
+ hash["keystone"]["sql_engine"] = "mysql"
end
- hash[:service][:token] = '%012d' % rand(1e12)
+ hash["keystone"][:service][:token] = '%012d' % rand(1e12)
base.config_hash = hash

0 comments on commit 8bec60e

Please sign in to comment.