aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@TRAFCLASS-PACKET1.fuel.local>2016-03-15 08:16:39 -0400
committeruser <user@TRAFCLASS-PACKET1.fuel.local>2016-03-15 08:16:54 -0400
commit6a4bd2c4bdce07b945ab61e1151e67da99be7489 (patch)
treeff9517b649c09fa1b9f0464076e583bbdaa3d886
parent224c6b9e8e21c1d445cf7f0e506d1e5ace1f9042 (diff)
Improvement of debug messages to the user
Change-Id: I09fa9cd865021701f53e0df2a2cd79d60ea04d6c Signed-off-by: user <user@TRAFCLASS-PACKET1.fuel.local>
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/deployment_unit.py9
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/heat_manager.py3
-rw-r--r--yardstick/vTC/apexlake/tests/deployment_unit_test.py5
-rw-r--r--yardstick/vTC/apexlake/tests/heat_manager_test.py4
4 files changed, 17 insertions, 4 deletions
diff --git a/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py b/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py
index 596ee7a96..22fec1392 100644
--- a/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py
+++ b/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py
@@ -50,7 +50,8 @@ class DeploymentUnit:
time.sleep(5)
status = self.heat_manager.check_stack_status(stack_name)
return True
- except:
+ except Exception as e:
+ common.LOG.debug(e.message)
return False
def destroy_all_deployed_stacks(self):
@@ -80,14 +81,16 @@ class DeploymentUnit:
self.heat_manager.create_stack(template_file, stack_name,
parameters)
deployed = True
- except:
+ except Exception as e:
+ common.LOG.debug(e.message)
deployed = False
if not deployed and 'COMPLETE' in \
self.heat_manager.check_stack_status(stack_name):
try:
self.destroy_heat_template(stack_name)
- except:
+ except Exception as e:
+ common.LOG.debug(e.message)
pass
status = self.heat_manager.check_stack_status(stack_name)
diff --git a/yardstick/vTC/apexlake/experimental_framework/heat_manager.py b/yardstick/vTC/apexlake/experimental_framework/heat_manager.py
index ab3df5c38..7400ebd21 100644
--- a/yardstick/vTC/apexlake/experimental_framework/heat_manager.py
+++ b/yardstick/vTC/apexlake/experimental_framework/heat_manager.py
@@ -97,6 +97,7 @@ class HeatManager:
if stack.stack_name == stack_name:
self.heat.stacks.delete(stack.id)
return True
- except:
+ except Exception as e:
+ common.LOG.debug(e.message)
pass
return False
diff --git a/yardstick/vTC/apexlake/tests/deployment_unit_test.py b/yardstick/vTC/apexlake/tests/deployment_unit_test.py
index 81171670c..cec834e56 100644
--- a/yardstick/vTC/apexlake/tests/deployment_unit_test.py
+++ b/yardstick/vTC/apexlake/tests/deployment_unit_test.py
@@ -13,8 +13,10 @@
# limitations under the License.
import unittest
+import logging
import mock
import experimental_framework.deployment_unit as mut
+import experimental_framework.common as common
__author__ = 'vmriccox'
@@ -166,6 +168,7 @@ class TestDeploymentUnit(unittest.TestCase):
template_file = ''
stack_name = ''
parameters = ''
+ common.LOG = logging.getLogger()
output = du.deploy_heat_template(template_file, stack_name,
parameters, 0)
self.assertEqual(output, True)
@@ -180,6 +183,7 @@ class TestDeploymentUnit(unittest.TestCase):
template_file = ''
stack_name = ''
parameters = ''
+ common.LOG = logging.getLogger()
output = du.deploy_heat_template(template_file, stack_name,
parameters, 0)
self.assertEqual(output, True)
@@ -197,6 +201,7 @@ class TestDeploymentUnit(unittest.TestCase):
template_file = ''
stack_name = ''
parameters = ''
+ common.LOG = logging.getLogger()
output = du.deploy_heat_template(template_file, stack_name,
parameters, 0)
self.assertEqual(output, True)
diff --git a/yardstick/vTC/apexlake/tests/heat_manager_test.py b/yardstick/vTC/apexlake/tests/heat_manager_test.py
index f1d3d0028..0fe8554cd 100644
--- a/yardstick/vTC/apexlake/tests/heat_manager_test.py
+++ b/yardstick/vTC/apexlake/tests/heat_manager_test.py
@@ -13,6 +13,9 @@
# limitations under the License.
import unittest
+import logging
+import experimental_framework.common as common
+
from experimental_framework import heat_manager
import mock
@@ -172,6 +175,7 @@ class TestHeatManager_2(unittest.TestCase):
pass
def test_delete_stack_for_success_2(self):
+ common.LOG = logging.getLogger()
self.assertFalse(self.heat_manager.delete_stack('stack_1'))