Merge "Remove deprecated internal rpc function"

This commit is contained in:
Zuul 2023-12-16 18:34:15 +00:00 committed by Gerrit Code Review
commit 41e61b84f2
2 changed files with 0 additions and 30 deletions

View File

@ -15,8 +15,6 @@
"""Client side of the heat engine RPC API."""
import warnings
from oslo_utils import excutils
from oslo_utils import reflection
@ -114,17 +112,6 @@ class EngineClient(object):
return excutils.exception_filter(error_name_matches)
def ignore_error_named(self, error, name):
"""Raises the error unless its local name matches the supplied name.
:param error: Remote raised error to derive the local name from.
:param name: Name to compare local name to.
"""
warnings.warn("Use ignore_error_by_name() to get a context manager "
"instead.",
DeprecationWarning)
return self.ignore_error_by_name(name)(error)
def identify_stack(self, ctxt, stack_name):
"""Returns the full stack identifier for a single, live stack.

View File

@ -74,23 +74,6 @@ class EngineRpcAPITestCase(common.HeatTestCase):
self.assertRaises(exception.NotFound, should_raise, ex)
self.assertRaises(exception.NotFound, should_raise, exr)
def test_ignore_error_named(self):
ex = exception.NotFound()
exr = self._to_remote_error(ex)
self.rpcapi.ignore_error_named(ex, 'NotFound')
self.rpcapi.ignore_error_named(exr, 'NotFound')
self.assertRaises(
exception.NotFound,
self.rpcapi.ignore_error_named,
ex,
'NotSupported')
self.assertRaises(
exception.NotFound,
self.rpcapi.ignore_error_named,
exr,
'NotSupported')
def _test_engine_api(self, method, rpc_method, **kwargs):
ctxt = utils.dummy_context()
expected_retval = 'foo' if method == 'call' else None