diff options
Diffstat (limited to 'dovetail/utils/dovetail_utils.py')
-rw-r--r-- | dovetail/utils/dovetail_utils.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dovetail/utils/dovetail_utils.py b/dovetail/utils/dovetail_utils.py index 8112d28d..f74da3a2 100644 --- a/dovetail/utils/dovetail_utils.py +++ b/dovetail/utils/dovetail_utils.py @@ -120,17 +120,18 @@ def source_env(env_file): def check_https_enabled(logger=None): logger.debug("Checking if https enabled or not...") - cmd = "openstack catalog show identity |awk '/public/ {print $4}'| \ - grep 'https'" + cmd = ("openstack catalog show identity |awk '/public/ {print $4}'") ret, msg = exec_cmd(cmd, logger) - return ret + if ret == 0 and "https://" in msg: + return True + return False def get_ext_net_name(env_file, logger=None): https_enabled = check_https_enabled(logger) insecure_option = '' insecure = os.getenv('OS_INSECURE',) - if https_enabled == 0: + if https_enabled: logger.info("https enabled...") if insecure.lower() == "true": insecure_option = ' --insecure ' |