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]))
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)
def elb_list_handler(parser, args): service = ELBService(settings) if 'regions' == args.type: list_regions(service) else: print elb_table(service.list())
def elb_delete_handler(parser, args): service = ELBService(settings) name = args.balancer service.delete(name) print elb_table(service.list())