From 116158a3b1c70eef5fe728a7668887264b534768 Mon Sep 17 00:00:00 2001 From: ricolin Date: Sun, 8 Jan 2017 13:39:02 +0800 Subject: [PATCH] Check `resource_validate` before validate external Check `resource_validate` first to make sure, we will not validate external resources (which will required to provide actrual resource id to check if existed) in template-validate. Closes-Bug: #1654752 Change-Id: I01ee79b8a3cccb85dae23a96f56a66197187198a --- heat/engine/stack.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/heat/engine/stack.py b/heat/engine/stack.py index 3af5354904..3e6976e782 100644 --- a/heat/engine/stack.py +++ b/heat/engine/stack.py @@ -840,13 +840,12 @@ class Stack(collections.Mapping): if res.name not in unique_defn_names: continue try: - if res.external_id is not None: - res.validate_external() - continue - if self.resource_validate: + if res.external_id is not None: + res.validate_external() + continue result = res.validate() - else: + elif res.external_id is None: result = res.validate_template() except exception.HeatException as ex: LOG.debug('%s', ex)