...
|
...
|
@@ -37,7 +37,11 @@ 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"], hostname_weight_dict=module[lb_id]["mappings"], default_weight=args.default_weight)
|
|
|
if type(module[lb_id]["domain"]) is list:
|
|
|
for domain in module[lb_id]["domain"]:
|
|
|
modify_alb_weight(args.secretid, args.secretkey, lb_id, domain, hostname_weight_dict=module[lb_id]["mappings"], default_weight=args.default_weight)
|
|
|
else:
|
|
|
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, hostname_weight_dict=module[lb_id]["mappings"], default_weight=args.default_weight)
|
|
|
else:
|
...
|
...
|
|