Browse Source

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
changes/75/623575/2
Mohammed Naser 3 years ago
parent
commit
d6cc77b16f
  1. 3
      magnum/tests/functional/python_client_base.py

3
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":

Loading…
Cancel
Save