Set heatclient exceptions to verbose

By setting the verbose flag on the heatclient exception module, we allow
the traceback to be included in the error message, which in turns is
returned to tripleoclient for the user.

Change-Id: I45c54e6591690625c5160517bbbdfec2eb5e5e26
Closes-Bug: #1804268
(cherry picked from commit e22f143cec)
This commit is contained in:
Thomas Herve 2018-11-20 17:50:45 +01:00 committed by Emilien Macchi
parent 6fcfd9e720
commit 85722e0410
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,4 @@
from heatclient import exc as heat_exc
# Setup Heat to give us tracebacks on errors.
heat_exc.verbose = 1

View File

@ -402,7 +402,7 @@ class DeployStackActionTest(base.TestCase):
action = deployment.DeployStackAction(1, 'overcloud')
expected = actions.Result(
error="Error during stack creation: ERROR: Oops")
error="Error during stack creation: ERROR: Oops\n")
self.assertEqual(expected, action.run(mock_ctx))
@mock.patch('tripleo_common.actions.deployment.time')
@ -449,7 +449,7 @@ class DeployStackActionTest(base.TestCase):
action = deployment.DeployStackAction(1, 'overcloud')
expected = actions.Result(
error="Error during stack update: ERROR: Oops")
error="Error during stack update: ERROR: Oops\n")
self.assertEqual(expected, action.run(mock_ctx))