fix wrong format of NO_PROXY in temp configuration file

the configuration validator will switch the .ini configuration file to
a temp configuration file(/tmp/config/cgcs_config).
this patch fixed the wrong format of NO_PROXY under section DOCKER_PROXY
in the temp configuration file.

Closes-bug: 1814833

Change-Id: I347ef37a92676fa74548846c95a730b86cc25337
Signed-off-by: SidneyAn <ran1.an@intel.com>
This commit is contained in:
SidneyAn 2019-02-14 05:37:58 +08:00 committed by Ran An
parent c34dcbb2da
commit 41618bb3cb
1 changed files with 3 additions and 2 deletions

View File

@ -999,8 +999,9 @@ class ConfigValidator(object):
# check no_proxy
if self.conf.has_option('DOCKER_PROXY', 'DOCKER_NO_PROXY'):
docker_no_proxy_list_str = self.conf.get(
'DOCKER_PROXY', 'DOCKER_NO_PROXY').split(',')
for no_proxy_str in docker_no_proxy_list_str:
'DOCKER_PROXY', 'DOCKER_NO_PROXY')
docker_no_proxy_list = docker_no_proxy_list_str.split(',')
for no_proxy_str in docker_no_proxy_list:
if not is_valid_domain_or_ip(no_proxy_str):
raise ConfigFail(
"Invalid DOCKER_NO_PROXY value of %s." %