Пример #1
0
    def test_validate_valid(self):

        valid_statuses = [
            # Successful creation of one or more stacks.
            'CREATE_COMPLETE',
            # Successful update of one or more stacks.
            'UPDATE_COMPLETE',
            # Successful return of one or more stacks to a previous working state after a failed stack update.
            'UPDATE_ROLLBACK_COMPLETE',
            # Ongoing removal of old resources for one or more stacks after a successful stack update. For stack updates that require resources to be replaced, AWS CloudFormation creates the new resources first and then deletes the old resources to help reduce any interruptions with your stack. In this state, the stack has been updated and is, usable, but AWS CloudFormation is still deleting the old resources.
            'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'
        ]

        for status in valid_statuses:
            stack = Stack()
            stack.stack_name = 'TestStack-' + status
            stack.stack_status = status

            self.assertEquals(stack.stack_status, status)
            try:
                validate_stack(stack)
            except StackNotReadyException:
                self.fail(
                    'validate_stack threw an exception on a valid value ' +
                    status)
Пример #2
0
	def test_validate_valid(self):

		valid_statuses = [
			# Successful creation of one or more stacks.
			'CREATE_COMPLETE',
			# Successful update of one or more stacks.
			'UPDATE_COMPLETE',
			# Successful return of one or more stacks to a previous working state after a failed stack update.
			'UPDATE_ROLLBACK_COMPLETE',
			# Ongoing removal of old resources for one or more stacks after a successful stack update. For stack updates that require resources to be replaced, AWS CloudFormation creates the new resources first and then deletes the old resources to help reduce any interruptions with your stack. In this state, the stack has been updated and is, usable, but AWS CloudFormation is still deleting the old resources.
			'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'
		]

		for status in valid_statuses:
			stack = Stack()
			stack.stack_name = 'TestStack-' + status
			stack.stack_status = status

			self.assertEquals(stack.stack_status, status)
			try:
				validate_stack(stack)
			except StackNotReadyException:
				self.fail('validate_stack threw an exception on a valid value ' + status)
Пример #3
0
def validate_stack(stack):
    return cf_stack.validate_stack(stack)
Пример #4
0
def validate_stack(stack):
	return cf_stack.validate_stack(stack)