...
|
...
|
@@ -37,9 +37,9 @@ if __name__ == "__main__": |
|
|
module = json.load(open(module_file))
|
|
|
for lb_id in module.keys():
|
|
|
if module[lb_id].has_key("domain") and module[lb_id]["domain"]:
|
|
|
modify_alb_weight(args.secretid, args.secretkey, lb_id, module[lb_id]["domain"], ip_weight_dict=module[lb_id]["mappings"], default_weight=args.default_weight)
|
|
|
modify_alb_weight(args.secretid, args.secretkey, lb_id, module[lb_id]["domain"], hostname_weight_dict=module[lb_id]["mappings"], default_weight=args.default_weight)
|
|
|
else:
|
|
|
modify_clb_weight(args.secretid, args.secretkey, lb_id, ip_weight_dict=module[lb_id]["mappings"], default_weight=args.default_weight)
|
|
|
modify_clb_weight(args.secretid, args.secretkey, lb_id, hostname_weight_dict=module[lb_id]["mappings"], default_weight=args.default_weight)
|
|
|
else:
|
|
|
#执行命令行参数
|
|
|
lbs = describe_lbs(args.secretid,args.secretkey)
|
...
|
...
|
|