Mercurial > hg > cc > azure
view master/bin/internal/parse_load_balance.py @ 10:2fbefb8d1a9e
wrun.sh: usage catchup
invoke.sh: force terminal allocation on workers
test1.sh: support control of number of worker processes are spawned,
support -t to turn off random delay at startup
count1.sh: actual do the counting in subprocs to avoid disk contention
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Mon, 08 Oct 2018 13:17:23 +0000 |
parents | a7637c994964 |
children |
line wrap: on
line source
#!/usr/bin/env python3 #Parses the output of az network lb show --resource-group $resource --name ${name}LB -o json #Prints a table of instanceId and port. import sys import json if len(sys.argv) == 2: ip = " " + sys.argv[1] else: ip = "" for m in json.load(sys.stdin)['inboundNatRules']: print(m['name'].split('.')[-1] + ' ' + str(m['frontendPort']) + ip)