Merge "make net_config_override of undercloud.conf work with yaml" into stable/wallaby
This commit is contained in:
commit
25c7f1373a
|
@ -137,7 +137,7 @@ class StandaloneConfig(BaseConfig):
|
|||
help=_(
|
||||
'Path to network config override template. '
|
||||
'Relative paths get computed inside of $HOME. '
|
||||
'Must be in the json format. '
|
||||
'Must be in the json or yaml format. '
|
||||
'Its content overrides anything in t-h-t '
|
||||
'<role>NetConfigOverride. The processed '
|
||||
'template is then passed in Heat via the '
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
"""Plugin action implementation"""
|
||||
|
||||
import json
|
||||
import yaml
|
||||
import logging
|
||||
import netaddr
|
||||
import os
|
||||
|
@ -786,9 +786,9 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=True,
|
|||
os.path.split(data_file)[-1]).render(context).replace(
|
||||
"'", '"').replace('"', '"')
|
||||
try:
|
||||
net_config_json = json.loads(net_config_str)
|
||||
net_config_json = yaml.safe_load(net_config_str)
|
||||
except ValueError:
|
||||
net_config_json = json.loads("{%s}" % net_config_str)
|
||||
net_config_json = yaml.safe_load("{%s}" % net_config_str)
|
||||
|
||||
if 'network_config' not in net_config_json:
|
||||
msg = ('Unsupported data format in net_config_override '
|
||||
|
|
Loading…
Reference in New Issue