Exemple #1
0
Fichier : main.py Projet : eofs/aws
def elb_zones_handler(parser, args):
    service = ELBService(settings)
    name = args.balancer
    zone_names = args.zone
    add = True
    if 'disable' == args.status:
        add = False

    try:
        zones = service.zones(name, zone_names, add)
    except AttributeError:
        # TODO Remote this try/except after https://github.com/boto/boto/pull/1492 is merged into master.
        pass

    print elb_table(service.list(names=[name]))
Exemple #2
0
def elb_zones_handler(parser, args):
    service = ELBService(settings)
    name = args.balancer
    zone_names = args.zone
    add = True
    if 'disable' == args.status:
        add = False

    try:
        zones = service.zones(name, zone_names, add)
    except AttributeError:
        # TODO Remote this try/except after https://github.com/boto/boto/pull/1492 is merged into master.
        pass

    print elb_table(service.list(names=[name]))
Exemple #3
0
Fichier : main.py Projet : eofs/aws
def elb_deregister_handler(parser, args):
    service = ELBService(settings)
    name = args.balancer
    instance_ids = args.instance
    instances = service.deregister(name, instance_ids)
    print ec2_table(instances)
Exemple #4
0
Fichier : main.py Projet : eofs/aws
def elb_list_handler(parser, args):
    service = ELBService(settings)
    if 'regions' == args.type:
        list_regions(service)
    else:
        print elb_table(service.list())
Exemple #5
0
Fichier : main.py Projet : eofs/aws
def elb_delete_handler(parser, args):
    service = ELBService(settings)
    name = args.balancer
    service.delete(name)
    print elb_table(service.list())
Exemple #6
0
def elb_deregister_handler(parser, args):
    service = ELBService(settings)
    name = args.balancer
    instance_ids = args.instance
    instances = service.deregister(name, instance_ids)
    print ec2_table(instances)
Exemple #7
0
def elb_list_handler(parser, args):
    service = ELBService(settings)
    if 'regions' == args.type:
        list_regions(service)
    else:
        print elb_table(service.list())
Exemple #8
0
def elb_delete_handler(parser, args):
    service = ELBService(settings)
    name = args.balancer
    service.delete(name)
    print elb_table(service.list())