From b16e2b4925d234557b58ae382809e12b2e14a151 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 16 Feb 2020 20:01:24 -0500 Subject: [PATCH] Handle CLI wildcard addresses properly If the local API instance is listening on a wildcard, connect to 127.0.0.1 instead. --- client-cli/pvc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client-cli/pvc.py b/client-cli/pvc.py index dcd390dc..9abbb2dd 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -87,6 +87,9 @@ def get_config(store_data, cluster=None): host, port, scheme, api_key = read_from_yaml(cfgfile) else: return { 'badcfg': True } + # Handle an all-wildcard address + if host == '0.0.0.0': + host = '127.0.0.1' else: # This is a static configuration, get the raw details host = cluster_details['host']