Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
and intial Stack Statuses.
:param command: The command to execute on the Stack.
:type command: str
:param launch_order: A list containing sets of Stacks that can be\
executed concurrently.
:type launch_order: list
"""
self.logger = logging.getLogger(__name__)
self.command = command
self.launch_order = launch_order
self.num_threads = len(max(launch_order, key=len))
self.stack_statuses = {stack: StackStatus.PENDING
for batch in launch_order for stack in batch}
* in_progress
* failed
:param status: The CloudFormation Stack status to simplify.
:type status: str
:returns: The Stack's simplified status
:rtype: sceptre.stack_status.StackStatus
"""
if status.endswith("ROLLBACK_COMPLETE"):
return StackStatus.FAILED
elif status.endswith("_COMPLETE"):
return StackStatus.COMPLETE
elif status.endswith("_IN_PROGRESS"):
return StackStatus.IN_PROGRESS
elif status.endswith("_FAILED"):
return StackStatus.FAILED
else:
raise UnknownStackStatusError(
"{0} is unknown".format(status)
)