From d3c5f9eccf240162687ec0aa026e1b1065a982d6 Mon Sep 17 00:00:00 2001
From: Dimitrios Markou <mardim@intracom-telecom.com>
Date: Fri, 23 Feb 2018 16:13:09 +0200
Subject: Bug Fix: Move heat_timeout variable higher

If a heat_template was used by a testcase the heat_timeout
variable was not getting initialized and that caused errors
in the Shade python module.

JIRA: YARDSTICK-1027

Change-Id: Ic0bf15b13cc00595964a97f8150dc5e6f2b7e1d7
Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
---
 yardstick/benchmark/contexts/heat.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index d873ee8a1..7b7f1be32 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -102,6 +102,8 @@ class HeatContext(Context):
         self._user = attrs.get("user")
 
         self.template_file = attrs.get("heat_template")
+
+        self.heat_timeout = attrs.get("timeout", DEFAULT_HEAT_TIMEOUT)
         if self.template_file:
             self.heat_parameters = attrs.get("heat_parameters")
             return
@@ -113,8 +115,6 @@ class HeatContext(Context):
 
         self._flavor = attrs.get("flavor")
 
-        self.heat_timeout = attrs.get("timeout", DEFAULT_HEAT_TIMEOUT)
-
         self.placement_groups = [PlacementGroup(name, self, pg_attrs["policy"])
                                  for name, pg_attrs in attrs.get(
                                  "placement_groups", {}).items()]
-- 
cgit