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 commitd9811e94ea
) (cherry picked from commitd31c419d7e
)
This commit is contained in:
parent
96886e8c6b
commit
19efd014ee
|
@ -171,7 +171,7 @@ class TestConfig(base.TestCase):
|
||||||
% step)
|
% step)
|
||||||
playbook_tasks = self.config._write_tasks_per_step(
|
playbook_tasks = self.config._write_tasks_per_step(
|
||||||
self.config.stack_outputs.get('RoleData')[role]
|
self.config.stack_outputs.get('RoleData')[role]
|
||||||
['upgrade_tasks'], role, filepath, step)
|
['upgrade_tasks'], filepath, step)
|
||||||
self.assertTrue(os.path.isfile(filepath))
|
self.assertTrue(os.path.isfile(filepath))
|
||||||
self.assertEqual(expected_tasks[role][step], playbook_tasks)
|
self.assertEqual(expected_tasks[role][step], playbook_tasks)
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ class Config(object):
|
||||||
return os.fdopen(
|
return os.fdopen(
|
||||||
os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600), 'w')
|
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):
|
def step_in_task(task, step):
|
||||||
whenexpr = task.get('when', None)
|
whenexpr = task.get('when', None)
|
||||||
|
@ -262,7 +262,7 @@ class Config(object):
|
||||||
for i in range(constants.DEFAULT_STEPS_MAX):
|
for i in range(constants.DEFAULT_STEPS_MAX):
|
||||||
filepath = os.path.join(role_path, '%s_step%s.yaml'
|
filepath = os.path.join(role_path, '%s_step%s.yaml'
|
||||||
% (config, i))
|
% (config, i))
|
||||||
self._write_tasks_per_step(role[config], role_name,
|
self._write_tasks_per_step(role[config],
|
||||||
filepath, i)
|
filepath, i)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue