# ELB doesn't seem to be on the same platform as the rest of AWS; doesn't support filtering
# ELB doesn't seem to be on the same platform as the rest of AWS; doesn't support filtering
aws elb --output json describe-load-balancers | \
aws elb --output json describe-load-balancers | \
python -c"import json,sys; lst = [str(lb['LoadBalancerName']) for lb in json.load(sys.stdin)['LoadBalancerDescriptions'] if lb['VPCId'] == '$1']; print '\n'.join(lst)"
python -c"import json,sys; lst = [str(lb['LoadBalancerName']) for lb in json.load(sys.stdin)['LoadBalancerDescriptions'] if lb['VPCId'] == '$1']; print('\n'.join(lst))"
@@ -170,7 +170,7 @@ function get-kubeconfig-basicauth() {
...
@@ -170,7 +170,7 @@ function get-kubeconfig-basicauth() {
# KUBE_PASSWORD
# KUBE_PASSWORD
function gen-kube-basicauth(){
function gen-kube-basicauth(){
KUBE_USER=admin
KUBE_USER=admin
KUBE_PASSWORD=$(python -c'import string,random; print "".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16))')
KUBE_PASSWORD=$(python -c'import string,random; print("".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16)))')
}
}
# Get the bearer token for the current-context in kubeconfig if one exists.
# Get the bearer token for the current-context in kubeconfig if one exists.