How to use the sceptre.stack_status.StackStatus function in sceptre

To help you get started, we’ve selected a few sceptre examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Sceptre / sceptre / sceptre / plan / executor.py View on Github external
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}
github Sceptre / sceptre / sceptre / plan / actions.py View on Github external
* 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)
            )