Honor role and networks file constants

Prior to change Ic9db8d852fbfa50f4ac574ebe524c1fb1d85c588
the tripleoclient constants OVERCLOUD_ROLES_FILE and
OVERCLOUD_NETWORKS_FILE was used as the defaults.

This was changed to use the defaults in process-templates.py

This restores the previous behaviour, honoring the tripleoclient
constants.

Closes-Bug: #1934010
Change-Id: Ie133a6718ca50f30fee7a48fc83ff0e89d84d2dc
This commit is contained in:
Harald Jensås 2021-06-29 21:26:18 +02:00
parent 77fc34f447
commit a586cb7795
2 changed files with 10 additions and 12 deletions

View File

@ -524,10 +524,12 @@ class TestDeployUndercloud(TestPluginV1):
mock_process_hiera, mock_open, mock_os, mock_yaml_dump, mock_process_hiera, mock_open, mock_os, mock_yaml_dump,
mock_yaml_load, mock_time): mock_yaml_load, mock_time):
parsed_args = self.check_parser(self.cmd, parsed_args = self.check_parser(
['--local-ip', '127.0.0.1/8', self.cmd, ['--local-ip', '127.0.0.1/8',
'--templates', 'tht_from', '--templates', 'tht_from',
'--output-dir', 'tht_to'], []) '--output-dir', 'tht_to',
'--roles-file', '/roles_file,yaml',
'--networks-file', '/networks_file.yaml'], [])
dropin = 'tht_from/standalone-stack-vstate-dropin.yaml' dropin = 'tht_from/standalone-stack-vstate-dropin.yaml'
self.cmd.output_dir = 'tht_to' self.cmd.output_dir = 'tht_to'
self.cmd.tht_render = 'tht_from' self.cmd.tht_render = 'tht_from'

View File

@ -1773,15 +1773,11 @@ def jinja_render_files(log, templates, working_dir,
templates, 'tools/process-templates.py') templates, 'tools/process-templates.py')
args = [python_cmd, process_templates] args = [python_cmd, process_templates]
if roles_file: roles_file_path = get_roles_file_path(roles_file, base_path)
roles_file_path = get_roles_file_path( args.extend(['--roles-data', roles_file_path])
roles_file, base_path)
args.extend(['--roles-data', roles_file_path])
if networks_file: networks_file_path = get_networks_file_path(networks_file, base_path)
networks_file_path = get_networks_file_path( args.extend(['--network-data', networks_file_path])
networks_file, base_path)
args.extend(['--network-data', networks_file_path])
if base_path: if base_path:
args.extend(['-p', base_path]) args.extend(['-p', base_path])