Browse Source

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
changes/44/798744/1
Harald Jensås 1 year ago
parent
commit
a586cb7795
  1. 10
      tripleoclient/tests/v1/tripleo/test_tripleo_deploy.py
  2. 14
      tripleoclient/utils.py

10
tripleoclient/tests/v1/tripleo/test_tripleo_deploy.py

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

14
tripleoclient/utils.py

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

Loading…
Cancel
Save