aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Sedovic <tsedovic@redhat.com>2014-06-25 15:03:16 +0200
committerTomas Sedovic <tsedovic@redhat.com>2014-09-10 11:30:15 +0200
commit9e262a51e9777d2653f4dec64dc0c17c09ec4917 (patch)
treedb15af5a688f70c426d8ff3e282309b5e3a5d463
parentcdfe285f791ede790e8ba1ab246807a9a2af1b41 (diff)
Deprecate Role and ImageBuilder metadata handling
Our templates and elements no longer depend on `OpenStack::Role` or `OpenStack::ImageBuilder::Elements` metadata. Using either now prints out a deprecation warning. Change-Id: I91e79b00bacca8caf13d4b6fa83d90e9c20b241c
-rw-r--r--tripleo_heat_merge/merge.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tripleo_heat_merge/merge.py b/tripleo_heat_merge/merge.py
index 49aee6f2..b5bec0f4 100644
--- a/tripleo_heat_merge/merge.py
+++ b/tripleo_heat_merge/merge.py
@@ -332,6 +332,9 @@ def merge(templates, master_role=None, slave_roles=None,
# XXX Assuming ImageId is always a Ref
ikey_val = end_template[lang.parameters][rbody[lang.properties][image_key][lang.get_param]]
del end_template[lang.parameters][rbody[lang.properties][image_key][lang.get_param]]
+ if 'OpenStack::Role' in rbody.get(lang.metadata, {}):
+ sys.stderr.write("WARNING: OpenStack::Role is deprecated"
+ " and will be removed in a later release\n");
role = rbody.get(lang.metadata, {}).get('OpenStack::Role', r)
role = translate_role(role, master_role, slave_roles)
if role != r:
@@ -342,6 +345,10 @@ def merge(templates, master_role=None, slave_roles=None,
if m in end_template[lang.resources][role].get(lang.metadata, {}):
if m == 'OpenStack::ImageBuilder::Elements':
end_template[lang.resources][role][lang.metadata][m].extend(mbody)
+ sys.stderr.write(
+ "WARNING: OpenStack::ImageBuilder::Elements"
+ " is deprecated and will be removed in a"
+ " later release\n");
continue
if mbody != end_template[lang.resources][role][lang.metadata][m]:
errors.append('Role %s metadata key %s conflicts.' %