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
This commit is contained in:
Thomas Herve 2018-11-20 17:50:45 +01:00
parent f060f25731
commit e22f143cec
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

@ -404,7 +404,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')
@ -451,7 +451,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))
def test_set_tls_parameters_no_ca_found(self):