mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
* Short-circuit legacy network module prefix->action mapping
* Modified a non-short-circuit compound conditional in a legacy networking path that attempted to resolve an action for any module name containing `_`. The bug was always present, but the typical presentation (an ImportError) was ignored prior to 2.19.
* The legacy networking path should be deprecated and removed in 2.20- a module could still be run under the wrong action if one with a matching prefix is found.
* unit test fix
(cherry picked from commit d6efb7db8a)
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
This commit is contained in:
@@ -273,8 +273,7 @@ class TestTaskExecutor(unittest.TestCase):
|
||||
|
||||
self.assertIs(mock.sentinel.handler, handler)
|
||||
|
||||
action_loader.has_plugin.assert_has_calls([mock.call(action, collection_list=te._task.collections),
|
||||
mock.call(module_prefix, collection_list=te._task.collections)])
|
||||
action_loader.has_plugin.assert_has_calls([mock.call(action, collection_list=te._task.collections)])
|
||||
|
||||
action_loader.get.assert_called_with(
|
||||
'ansible.legacy.normal', task=te._task, connection=te._connection,
|
||||
|
||||
Reference in New Issue
Block a user