From be5af1a35e6bbb9e517fd953a5fe0e2467676b91 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Wed, 19 Mar 2014 15:16:32 -0700 Subject: Switch overcloud to software-config This migrates the overcloud to using OS::Heat::StructuredConfig and OS::Heat::StructuredDeployment. With those tools, we can decouple servers from software configuration and begin to deprecate features in tripleo_heat_merge. Change-Id: Ice85f0711e90d0fabf1d1bc4698201c4d6758508 --- tripleo_heat_merge/merge.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tripleo_heat_merge') diff --git a/tripleo_heat_merge/merge.py b/tripleo_heat_merge/merge.py index 4571d289..127a0e03 100644 --- a/tripleo_heat_merge/merge.py +++ b/tripleo_heat_merge/merge.py @@ -292,7 +292,11 @@ def merge(templates, master_role=None, slave_roles=None, errors.append('Role %s metadata key %s conflicts.' % (role, m)) continue - end_template['Resources'][role]['Metadata'][m] = mbody + role_res = end_template['Resources'][role] + if role_res['Type'] == 'OS::Heat::StructuredConfig': + end_template['Resources'][role]['Properties']['config'][m] = mbody + else: + end_template['Resources'][role]['Metadata'][m] = mbody continue if 'Resources' not in end_template: end_template['Resources'] = {} @@ -315,6 +319,8 @@ def merge(templates, master_role=None, slave_roles=None, include_content = resolve_params(include_content, replace_param, replace_value) + if 'Resources' not in end_template: + end_template['Resources'] = {} end_template['Resources'][r] = include_content else: if r in end_template.get('Resources', {}): -- cgit 1.2.3-korg