diff --git a/ironic/drivers/base.py b/ironic/drivers/base.py index 05abca17f4..3e671339c3 100644 --- a/ironic/drivers/base.py +++ b/ironic/drivers/base.py @@ -655,11 +655,15 @@ def _passthru(http_methods, method=None, async=None, async_call=None, for a synchronous passthru method. If False, don't lock the node. Defaults to True. """ + # TODO(rloo): In Stein cycle, remove support for 'async' parameter. + # The default value for 'async_call' should then be changed + # to True. if async_call is None: if async is not None: LOG.warning( - 'async parameter is deprecated, please use async_call instead.' - 'deprecated parameter will be removed in the next cycle.' + 'The "async" parameter is deprecated, please use "async_call" ' + 'instead. The "async" parameter will be removed in the Stein ' + 'cycle.' ) async_call = async else: @@ -667,8 +671,9 @@ def _passthru(http_methods, method=None, async=None, async_call=None, else: if async is not None: raise TypeError( - "async_call and async parameters couldn't be used together, " - "use async_call instead of async" + "'async_call' and 'async' parameters cannot be used together. " + "Use 'async_call' instead of 'async' since 'async' is " + "deprecated and will be removed in the Stein cycle." ) def handle_passthru(func): diff --git a/releasenotes/notes/async-deprecate-b3d81d7968ea47e5.yaml b/releasenotes/notes/async-deprecate-b3d81d7968ea47e5.yaml index 4deb448f89..48f6131600 100644 --- a/releasenotes/notes/async-deprecate-b3d81d7968ea47e5.yaml +++ b/releasenotes/notes/async-deprecate-b3d81d7968ea47e5.yaml @@ -1,4 +1,9 @@ --- other: - async parameter of passthru and driver_passthru decorators is deprecated - and will be removed in next cycle. async_call should be used instead. + For out-of-tree drivers that have `vendor passthru methods + `_. + The ``async`` parameter of the ``passthru`` and ``driver_passthru`` + decorators is deprecated and will be removed in the Stein cycle. + Please use its replacement instead, the ``async_call`` parameter. + For more information, see `bug 1751306 + `_.