in taskcat/_cfn/threaded.py [0:0]
def _import_stacks_per_client(clients, uid, project_name, tests):
# pylint: disable=too-many-locals
stacks = Stacks()
client, region = clients
for page in client.get_paginator("describe_stacks").paginate():
for stack_props in page["Stacks"]:
if stack_props.get("ParentId"):
continue
match = False
project = ""
test = ""
for tag in stack_props["Tags"]:
k, v = (tag["Key"], tag["Value"])
if k == "taskcat-id" and v == uid.hex:
match = True
elif k == "taskcat-test-name" and v in tests:
test = v
elif k == "taskcat-project-name" and v == project_name:
project = v
if match and test and project:
stack = Stack.import_existing(
stack_props,
tests[test].template,
region[0],
test,
uid,
)
stacks.append(stack)
return stacks