Remove hack for backwards compatible v2_playbook_on_start callback

Just after release of 2.0.0 (in 2.0.0.1) we had a change to the API of
callbacks without bumping the API version.  We added the playbook to the
arguments passed to the callbacks.

This wasn't in the Tower callback at the time.  In order to prevent
breaking that callback we added a temporary hack to inspect the
callback's API to decide if we needed to call it with arguments or not.

We scheduled the hack for removal in January 2017.  Since that's now
past, removing the hack.

Change signed off by matburt on the Tower side.
This commit is contained in:
Toshio Kuratomi 2017-04-28 11:43:56 -07:00
parent 0d5fe8fd94
commit 500de1f557
2 changed files with 1 additions and 40 deletions

View file

@ -48,30 +48,6 @@ class TestTaskQueueManagerCallbacks(unittest.TestCase):
def tearDown(self):
pass
def test_task_queue_manager_callbacks_v2_playbook_on_start_legacy(self):
"""
Assert that no exceptions are raised when sending a Playbook
start callback to a legacy callback module plugin.
"""
register = self._register
class LegacyCallbackModule(CallbackBase):
"""
This is a callback module with the legacy
method signature for `v2_playbook_on_start`.
"""
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'legacy_module'
def v2_playbook_on_start(self):
register(self)
callback_module = LegacyCallbackModule()
self._tqm._callback_plugins.append(callback_module)
self._tqm.send_callback('v2_playbook_on_start', self._playbook)
register.assert_called_once_with(callback_module)
def test_task_queue_manager_callbacks_v2_playbook_on_start(self):
"""
Assert that no exceptions are raised when sending a Playbook