diff options
author | Ruby Loo <rloo@oath.com> | 2018-04-06 10:02:05 -0400 |
---|---|---|
committer | Ruby Loo <rloo@oath.com> | 2018-04-06 10:02:05 -0400 |
commit | 3e92382d2ebbc65b9240f8620afede86cf57ba7e (patch) | |
tree | 5f04a4e003de23fd56a52072e950220991e4f8a3 /ironic/drivers/base.py | |
parent | f5605d13e67c71c46538bafa5f7ddc18fb7427a6 (diff) | |
download | ironic-3e92382d2ebbc65b9240f8620afede86cf57ba7e.tar.gz |
Clarify deprecation of "async" parameter
For vendor passthru decorators, the "async" parameter is deprecated.
This clarifies the messaging we emit (via logs and release notes), and
adds a TODO so we don't forget to delete the "async" parameter in
Stein cycle.
This is a follow up to Change-Id: I6299aafd30faae9a93df2cb901c1505df47e6b45.
Change-Id: I63ddf453584f4e7e8d2fa778ec50b8debcb86bf4
Task: 9289
Story: 1751306
Diffstat (limited to 'ironic/drivers/base.py')
-rw-r--r-- | ironic/drivers/base.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ironic/drivers/base.py b/ironic/drivers/base.py index 05abca17f..3e671339c 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): |