Example #1
0
File: run.py Project: uho/cftpl
def delete_stack(config, password):
    stack = CFStack(config, password)
    if not stack.get_stack():
        print("No running stack detected.")
        return None
    print('{}\t{}\t{}'.format(stack.stack_id, stack.stack_name, stack.stack_status))
    yesno = raw_input('Should I delete {}? '.format(stack.stack_name))
    if yesno.lower() in ('y', 'j', 'ja', 'yes'):
        print('Deleting stack {}...'.format(stack.name), end='')
        stack.delete()
        print('done.')
        print_stack_events(stack)
    else:
        print('Keeping "{}" for now.'.format(stack.stack_id))
Example #2
0
def delete_stack(config, password):
    stack = CFStack(config, password)
    if not stack.get_stack():
        print("No running stack detected.")
        return None
    print('{}\t{}\t{}'.format(stack.stack_id, stack.stack_name,
                              stack.stack_status))
    yesno = raw_input('Should I delete {}? '.format(stack.stack_name))
    if yesno.lower() in ('y', 'j', 'ja', 'yes'):
        print('Deleting stack {}...'.format(stack.name), end='')
        stack.delete()
        print('done.')
        print_stack_events(stack)
    else:
        print('Keeping "{}" for now.'.format(stack.stack_id))
Example #3
0
 def test_delete(self):
     stack = CFStack(self.test_config, self.test_password)
     result = stack.delete()
     self.boto_mock.return_value.delete_stack.assert_called_with(
         self.test_config['STACK_NAME'])
Example #4
0
 def test_delete(self):
     stack = CFStack(self.test_config, self.test_password)
     result = stack.delete()
     self.boto_mock.return_value.delete_stack.assert_called_with(self.test_config['STACK_NAME'])