From 9e262a51e9777d2653f4dec64dc0c17c09ec4917 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Wed, 25 Jun 2014 15:03:16 +0200 Subject: 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 --- tripleo_heat_merge/merge.py | 7 +++++++ 1 file changed, 7 insertions(+) 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.' % -- cgit 1.2.3-korg