示例#1
0
def list_(args):
    """ Print summary info for all running stacks, or all stacks
        in any state (e.g. terminated) if args.only_running == True

    """

    cloud = get_current_cloud()
    stacks = cloud.list_stacks(only_running=args.only_running)

    print_table(print_stack_summary, headers, stacks, use_color=args.color)
示例#2
0
def list_(args):
    """ Print summary info for all running instances, or all instances
        in any state (e.g. terminated) if args.only_running == True

    """

    # Get Config.py
    cloud = get_current_cloud(args.cloud)

    instances = cloud.list_instances()
    print_table(print_instance_summary, headers, instances,
                use_color=args.color)
    return instances
示例#3
0
def list_(args):
    """ Print summary info for all running instances, or all instances
        in any state (e.g. terminated) if args.only_running == True

    """

    cloud = get_current_cloud()
    instances = cloud.list_instances(only_running=args.only_running)

    if args.order == 'name':
        instances.sort(key=lambda i: i.tags.get(args.order))

    print_table(print_instance_summary, headers, instances,
                use_color=args.color)