comparison master/bin/internal/parse_load_balance.py @ 7:a7637c994964

cull_network.py, parse_load_balance.py, vmss_setup.sh x 2, vmss_create.sh: From kenneth, slight mods in some cases share.sh: Distribute files to workers wrun.sh, invoke.sh: From last year, slight mods
author Henry S. Thompson <ht@markup.co.uk>
date Sun, 30 Sep 2018 20:53:43 +0000
parents
children
comparison
equal deleted inserted replaced
6:a3b30e707e83 7:a7637c994964
1 #!/usr/bin/env python3
2 #Parses the output of az network lb show --resource-group $resource --name ${name}LB -o json
3 #Prints a table of instanceId and port.
4 import sys
5 import json
6 if len(sys.argv) == 2:
7 ip = " " + sys.argv[1]
8 else:
9 ip = ""
10 for m in json.load(sys.stdin)['inboundNatRules']:
11 print(m['name'].split('.')[-1] + ' ' + str(m['frontendPort']) + ip)