def call_list(region, RV, TYP, ARCH): if args.list_allimages: amazon_ec2_lib.list_all_ec2RHELimages(region, RV, TYP, ARCH) if args.list_allinstances: amazon_ec2_lib.list_all_runningInst(region) if args.noof_instances: amazon_ec2_lib.noof_instances(region)
def call_list(region): if args.list_allimages: amazon_ec2_lib.list_all_ec2RHELimages(region) if args.list_allinstances: amazon_ec2_lib.list_all_runningInst(region)
print regions if args.region and REG == "all": for reg in list_reg_name: print "\nWorking with the Region :", reg if args.clear_all: amazon_ec2_lib.terminate_delete_instances(reg) if args.terminate_allinstances: amazon_ec2_lib.terminate_all_instances(reg) if args.delete_allebsvols: amazon_ec2_lib.delete_ebs_volumes(reg) if args.list_allimages: amazon_ec2_lib.list_all_ec2RHELimages(reg) if args.list_allinstances: amazon_ec2_lib.list_all_runningInst(reg) if args.find_instanceid: stat = amazon_ec2_lib.find_instanceId(reg, IPADDR) if stat == "found": break if args.display_instanceinfo: amazon_ec2_lib.display_instanceInfo(reg, INSID) elif args.region and REG in list_reg_name: print "\nWorking with the Region :", REG if args.clear_all: amazon_ec2_lib.terminate_delete_instances(REG) if args.terminate_allinstances: amazon_ec2_lib.terminate_all_instances(REG) if args.delete_allebsvols: amazon_ec2_lib.delete_ebs_volumes(REG) if args.list_allimages: