Bug Fix: Move heat_timeout variable higher 29/52529/2
authorDimitrios Markou <mardim@intracom-telecom.com>
Fri, 23 Feb 2018 14:13:09 +0000 (16:13 +0200)
committerRoss Brattain <ross.b.brattain@intel.com>
Fri, 23 Feb 2018 21:30:31 +0000 (21:30 +0000)
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

index d873ee8..7b7f1be 100644 (file)
@@ -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()]