Changed all stacks retrieval with filtered search

Filtered search is more efficient.

Change-Id: Ic29c6044b5549070580948fba4728b7f480b1f2a
This commit is contained in:
Andrew Lazarev 2015-07-17 15:45:12 -07:00
parent 3ea2e295fb
commit 4b4e6d4d22
1 changed files with 2 additions and 4 deletions

View File

@ -129,10 +129,8 @@ class ClusterStack(object):
if not update_existing:
b.execute_with_retries(heat.stacks.create, **kwargs)
else:
for stack in b.execute_with_retries(heat.stacks.list):
if stack.stack_name == self.cluster.name:
b.execute_with_retries(stack.update, **kwargs)
break
stack = h.get_stack(self.cluster.name)
b.execute_with_retries(stack.update, **kwargs)
self.heat_stack = h.get_stack(self.cluster.name)