summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-09-07 04:49:50 -0400
committerxudan <xudan16@huawei.com>2017-09-07 04:49:50 -0400
commit0c0e4109cdae9dde8346b92f694e272beb52fae7 (patch)
tree75181491bdfdd35a4b9ee5ccb23517c866f45046
parentf947b12c9f1cfac7f31dfd297581907c417ad8ff (diff)
Modify logs
JIRA: DOVETAIL-498 Change-Id: Ie98fc89cc840b557aa4186c6c2bee2d610432af0 Signed-off-by: xudan <xudan16@huawei.com>
-rw-r--r--dovetail/container.py8
-rw-r--r--dovetail/utils/dovetail_utils.py13
2 files changed, 11 insertions, 10 deletions
diff --git a/dovetail/container.py b/dovetail/container.py
index cf8e14e5..14045165 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -164,7 +164,7 @@ class Container(object):
dt_utils.add_hosts_info(host)
hosts_config += " --add-host "
hosts_config += str(host)
- cls.logger.info('Get hosts info {}.'.format(hosts_config))
+ cls.logger.debug('Get hosts info {}.'.format(host))
except Exception:
cls.logger.warn('Failed to get hosts info in {}, '
'maybe some issues with domain name resolution.'
@@ -192,18 +192,18 @@ class Container(object):
cls.logger.info("https enabled...")
if cacert is not None:
if not os.path.isfile(cacert):
- cls.logger.error("Env variable 'OS_CACERT' is set to {}"
+ cls.logger.error("Env variable 'OS_CACERT' is set to {} "
"but the file does not exist."
.format(cacert))
return None
elif not dovetail_config['config_dir'] in cacert:
- cls.logger.error("Credential file has to be put in {},"
+ cls.logger.error("Credential file has to be put in {}, "
"which can be mount into container."
.format(dovetail_config['config_dir']))
return None
cacert_volume = ' -v %s:%s ' % (cacert, cacert)
else:
- cls.logger.warn("https enabled, OS_CACERT not set, insecure"
+ cls.logger.warn("https enabled, OS_CACERT not set, insecure "
"connection used or OS_CACERT missed")
result_volume = ' -v %s:%s ' % (dovetail_config['result_dir'],
diff --git a/dovetail/utils/dovetail_utils.py b/dovetail/utils/dovetail_utils.py
index 23285e3c..fc007e51 100644
--- a/dovetail/utils/dovetail_utils.py
+++ b/dovetail/utils/dovetail_utils.py
@@ -134,12 +134,13 @@ def get_ext_net_name(env_file, logger=None):
insecure = os.getenv('OS_INSECURE',)
if https_enabled:
logger.info("https enabled...")
- if insecure.lower() == "true":
- insecure_option = ' --insecure '
- else:
- logger.warn("Env variable OS_INSECURE is {}, if https + no "
- "credential used, should be set as True."
- .format(insecure))
+ if insecure:
+ if insecure.lower() == "true":
+ insecure_option = ' --insecure '
+ else:
+ logger.warn("Env variable OS_INSECURE is {}, if https + no "
+ "credential used, should be set as True."
+ .format(insecure))
cmd_check = "openstack %s network list" % insecure_option
ret, msg = exec_cmd(cmd_check, logger)