From d6cc77b16f329cf69f1428b3cd540f88959df149 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Fri, 7 Dec 2018 15:15:33 -0500 Subject: [PATCH] functional: retrieve cluster to get stack_id At the moment, if a cluster fails to be created, we fall back to getting the node information from Heat directly. However, this behaviour doesn't work at the moment because `self.cluster` is a copy of the API record on-create which does not have the stack ID yet. This patch makes an extra HTTP request to get the `stack_id` in order to get the server IPs and be able to pull down the correct information. Story: #2002589 Task: #28341 Change-Id: I3fb3542f8ab63f38a23094d579d3df1fcb99a497 --- magnum/tests/functional/python_client_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magnum/tests/functional/python_client_base.py b/magnum/tests/functional/python_client_base.py index e74bc9b7ef..7b636c17c1 100755 --- a/magnum/tests/functional/python_client_base.py +++ b/magnum/tests/functional/python_client_base.py @@ -369,8 +369,9 @@ extendedKeyUsage = clientAuth return nodes def _get_nodes_from_stack(self): + cluster = self.cs.clusters.get(self.cluster.uuid) nodes = [] - stack = self.heat.stacks.get(self.cluster.stack_id) + stack = self.heat.stacks.get(cluster.stack_id) stack_outputs = stack.to_dict().get('outputs', []) output_keys = [] if self.cluster_template.coe == "kubernetes":