Browse Source

config-download remove role arg from _write_tasks_per_step()

This arg has never been used, let's just remove it.

Change-Id: I2781cae14663094d531ad70c3d412b3153b46612
(cherry picked from commit d9811e94ea)
(cherry picked from commit d31c419d7e)
changes/78/742978/2
Emilien Macchi 2 weeks ago
parent
commit
19efd014ee
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      tripleo_common/tests/utils/test_config.py
  2. +2
    -2
      tripleo_common/utils/config.py

+ 1
- 1
tripleo_common/tests/utils/test_config.py View File

@@ -171,7 +171,7 @@ class TestConfig(base.TestCase):
% step)
playbook_tasks = self.config._write_tasks_per_step(
self.config.stack_outputs.get('RoleData')[role]
['upgrade_tasks'], role, filepath, step)
['upgrade_tasks'], filepath, step)
self.assertTrue(os.path.isfile(filepath))
self.assertEqual(expected_tasks[role][step], playbook_tasks)



+ 2
- 2
tripleo_common/utils/config.py View File

@@ -115,7 +115,7 @@ class Config(object):
return os.fdopen(
os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600), 'w')

def _write_tasks_per_step(self, tasks, role, filepath, step):
def _write_tasks_per_step(self, tasks, filepath, step):

def step_in_task(task, step):
whenexpr = task.get('when', None)
@@ -262,7 +262,7 @@ class Config(object):
for i in range(constants.DEFAULT_STEPS_MAX):
filepath = os.path.join(role_path, '%s_step%s.yaml'
% (config, i))
self._write_tasks_per_step(role[config], role_name,
self._write_tasks_per_step(role[config],
filepath, i)

try:


Loading…
Cancel
Save