Fix default value of RPC dispatcher access_policy
Change-Id: I4d30ff269b2e34f4409e8d1ce822eb93918cf5a2 Closes-Bug: #1712393
This commit is contained in:
parent
c2338ee325
commit
3a9c01ffe9
@ -170,9 +170,7 @@ class RPCDispatcher(dispatcher.DispatcherBase):
|
||||
raise TypeError('access_policy must be a subclass of '
|
||||
'RPCAccessPolicyBase')
|
||||
else:
|
||||
# TODO(pvinci): Change to DefaultRPCAccessPolicy when setting to
|
||||
# DefaultRCPAccessPolicy no longer breaks in tempest tests.
|
||||
self.access_policy = LegacyRPCAccessPolicy()
|
||||
self.access_policy = DefaultRPCAccessPolicy()
|
||||
|
||||
@staticmethod
|
||||
def _is_namespace(target, namespace):
|
||||
|
@ -130,8 +130,6 @@ __all__ = [
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from debtcollector.updating import updated_kwarg_default_value
|
||||
|
||||
from oslo_messaging._i18n import _LE
|
||||
from oslo_messaging.rpc import dispatcher as rpc_dispatcher
|
||||
from oslo_messaging import server as msg_server
|
||||
@ -187,15 +185,6 @@ class RPCServer(msg_server.MessageHandlingServer):
|
||||
del failure
|
||||
|
||||
|
||||
@updated_kwarg_default_value('access_policy', None,
|
||||
rpc_dispatcher.DefaultRPCAccessPolicy,
|
||||
message='access_policy defaults to '
|
||||
'LegacyRPCAccessPolicy which '
|
||||
'exposes private methods. Explicitly '
|
||||
'set access_policy to '
|
||||
'DefaultRPCAccessPolicy or '
|
||||
'ExplicitRPCAccessPolicy.',
|
||||
version='?')
|
||||
def get_rpc_server(transport, target, endpoints,
|
||||
executor='blocking', serializer=None, access_policy=None):
|
||||
"""Construct an RPC server.
|
||||
@ -212,7 +201,7 @@ def get_rpc_server(transport, target, endpoints,
|
||||
:param serializer: an optional entity serializer
|
||||
:type serializer: Serializer
|
||||
:param access_policy: an optional access policy.
|
||||
Defaults to LegacyRPCAccessPolicy
|
||||
Defaults to DefaultRPCAccessPolicy
|
||||
:type access_policy: RPCAccessPolicyBase
|
||||
"""
|
||||
dispatcher = rpc_dispatcher.RPCDispatcher(endpoints, serializer,
|
||||
|
@ -158,7 +158,6 @@ class TestRPCServer(test_utils.BaseTestCase, ServerSetupMixin):
|
||||
oslo_messaging.get_rpc_server(transport, target,
|
||||
endpoints, serializer=serializer)
|
||||
self.assertEqual([
|
||||
mock.call(mock.ANY, category=FutureWarning, stacklevel=3),
|
||||
mock.call("blocking executor is deprecated. Executor default will "
|
||||
"be removed. Use explicitly threading or eventlet "
|
||||
"instead in version 'pike' and will be removed in "
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Change the default value of RPC dispatcher access_policy
|
||||
to DefaultRPCAccessPolicy.
|
Loading…
Reference in New Issue
Block a user