diff --git a/tripleo_common/tests/utils/test_config.py b/tripleo_common/tests/utils/test_config.py index 12a8171ae..167510446 100644 --- a/tripleo_common/tests/utils/test_config.py +++ b/tripleo_common/tests/utils/test_config.py @@ -70,6 +70,9 @@ class TestConfig(base.TestCase): elif config == 'step_config': expected_calls += [call('/tmp/tht/%s/%s.pp' % (role, config))] + elif config == 'param_config': + expected_calls += [call('/tmp/tht/%s/%s.json' % + (role, config))] else: expected_calls += [call('/tmp/tht/%s/%s.yaml' % (role, config))] @@ -608,6 +611,9 @@ class TestConfig(base.TestCase): elif config == 'step_config': expected_calls += [call('/tmp/tht/%s/%s.pp' % (role, config))] + elif config == 'param_config': + expected_calls += [call('/tmp/tht/%s/%s.json' % + (role, config))] else: expected_calls += [call('/tmp/tht/%s/%s.yaml' % (role, config))] diff --git a/tripleo_common/utils/config.py b/tripleo_common/utils/config.py index 63fb3fd8b..1f0b49749 100644 --- a/tripleo_common/utils/config.py +++ b/tripleo_common/utils/config.py @@ -213,6 +213,10 @@ class Config(object): filepath = os.path.join(role_path, 'step_config.pp') with self._open_file(filepath) as step_config: step_config.write(role[config]) + elif config == 'param_config': + filepath = os.path.join(role_path, 'param_config.json') + with self._open_file(filepath) as param_config: + param_config.write(json.dumps(role[config])) elif config == 'ansible_group_vars': # NOTE(aschultz): ansible group vars are for specific role # services so we merge them in with the others so they