Browse Source

Merge "[TRAIN-Only] Remove __init__ from base strategy" into stable/train

changes/25/763625/1
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
5f2a5f292a
3 changed files with 27 additions and 16 deletions
  1. +0
    -16
      tripleo_ansible/ansible_plugins/strategy/tripleo_base.py
  2. +14
    -0
      tripleo_ansible/ansible_plugins/strategy/tripleo_free.py
  3. +13
    -0
      tripleo_ansible/ansible_plugins/strategy/tripleo_linear.py

+ 0
- 16
tripleo_ansible/ansible_plugins/strategy/tripleo_base.py View File

@@ -36,22 +36,6 @@ display = Display()

class TripleoBase(StrategyBase):

def __init__(self, *args, **kwargs):
super(TripleoBase, self).__init__(*args, **kwargs)
self._any_errors_fatal = False
self._callback_sent = False
self._has_work = False
self._host_pinned = False
self._hosts_left = []
self._iterator = None
self._play_context = None
self._strat_results = []
self.noop_task = None
self._fail_cache = {}
# these were defined in 2.9
self._has_hosts_cache = False
self._has_hosts_cache_all = False

def _print(self, msg, host=None, level=1):
display.verbose(msg, host=host, caplevel=level)



+ 14
- 0
tripleo_ansible/ansible_plugins/strategy/tripleo_free.py View File

@@ -80,6 +80,20 @@ class StrategyModule(BASE.TripleoBase):

def __init__(self, *args, **kwargs):
super(StrategyModule, self).__init__(*args, **kwargs)
self._any_errors_fatal = False
self._callback_sent = False
self._has_work = False
self._host_pinned = False
self._hosts_left = []
self._iterator = None
self._play_context = None
self._strat_results = []
self.noop_task = None
self._fail_cache = {}
# these were defined in 2.9
self._has_hosts_cache = False
self._has_hosts_cache_all = False
# free specific vars
self._last_host = 0
self._workers_free = 0
self._run_once_tasks = set()


+ 13
- 0
tripleo_ansible/ansible_plugins/strategy/tripleo_linear.py View File

@@ -75,6 +75,19 @@ class StrategyModule(BASE.TripleoBase):

def __init__(self, *args, **kwargs):
super(StrategyModule, self).__init__(*args, **kwargs)
self._any_errors_fatal = False
self._callback_sent = False
self._has_work = False
self._host_pinned = False
self._hosts_left = []
self._iterator = None
self._play_context = None
self._strat_results = []
self.noop_task = None
self._fail_cache = {}
# these were defined in 2.9
self._has_hosts_cache = False
self._has_hosts_cache_all = False

def _create_noop_task(self):
"""Create noop task"""


Loading…
Cancel
Save