Merge "Don't resolve Heat stack output when unnecessary"

This commit is contained in:
Zuul 2018-11-15 21:08:34 +00:00 committed by Gerrit Code Review
commit d531c93cb6
3 changed files with 4 additions and 4 deletions

View File

@ -143,7 +143,7 @@ class DeployStackAction(templates.ProcessTemplatesAction):
# check to see if the stack exists # check to see if the stack exists
heat = self.get_orchestration_client(context) heat = self.get_orchestration_client(context)
try: try:
stack = heat.stacks.get(self.container) stack = heat.stacks.get(self.container, resolve_outputs=False)
except heat_exc.HTTPNotFound: except heat_exc.HTTPNotFound:
stack = None stack = None

View File

@ -110,8 +110,7 @@ class DeletePlanAction(base.TripleOAction):
# heat throws HTTPNotFound if the stack is not found # heat throws HTTPNotFound if the stack is not found
try: try:
stack = self.get_orchestration_client(context).stacks.get( stack = self.get_orchestration_client(context).stacks.get(
self.container self.container, resolve_outputs=False)
)
except heatexceptions.HTTPNotFound: except heatexceptions.HTTPNotFound:
pass pass
else: else:

View File

@ -262,7 +262,8 @@ class DeletePlanActionTest(base.TestCase):
# test that stack exists # test that stack exists
action = plan.DeletePlanAction(self.container_name) action = plan.DeletePlanAction(self.container_name)
self.assertRaises(exception.StackInUseError, action.run, self.ctx) self.assertRaises(exception.StackInUseError, action.run, self.ctx)
heat.stacks.get.assert_called_with(self.container_name) heat.stacks.get.assert_called_with(
self.container_name, resolve_outputs=False)
@mock.patch('tripleo_common.actions.base.TripleOAction.get_object_client') @mock.patch('tripleo_common.actions.base.TripleOAction.get_object_client')
@mock.patch( @mock.patch(