handle impending oslo.messaging deprecation
When running trove, I see this deprecation message. /usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py:200: FutureWarning: The access_policy argument is changing its default value to <class 'oslo_messaging.rpc.dispatcher.DefaultRPCAccessPolicy'> in version '?', please update the code to explicitly set None as the value: access_policy defaults to LegacyRPCAccessPolicy which exposes private methods. Explicitly set access_policy to DefaultRPCAccessPolicy or ExplicitRPCAccessPolicy.access_policy) For now, I'm setting this to LegacyRPCAccessPolicy, will be making other changes in this area before long and will make our own access policy anyway. Change-Id: Ib0dc68620bbd6105349c10976695c502f6d76c13 Depends-On: Id5be526a0418db5d00cbf5cbceb4993274989e72
This commit is contained in:
parent
191e3036e1
commit
631b886cf1
13
trove/rpc.py
13
trove/rpc.py
@ -31,6 +31,7 @@ __all__ = [
|
||||
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
from oslo_messaging.rpc import dispatcher
|
||||
|
||||
import trove.common.exception
|
||||
from trove.common.rpc import secure_serializer as ssz
|
||||
@ -118,11 +119,13 @@ def get_server(target, endpoints, key, serializer=None,
|
||||
serializer = secure_serializer(
|
||||
sz.TroveRequestContextSerializer(serializer), key)
|
||||
|
||||
return messaging.get_rpc_server(TRANSPORT,
|
||||
target,
|
||||
endpoints,
|
||||
executor=executor,
|
||||
serializer=serializer)
|
||||
return messaging.get_rpc_server(
|
||||
TRANSPORT,
|
||||
target,
|
||||
endpoints,
|
||||
executor=executor,
|
||||
serializer=serializer,
|
||||
access_policy=dispatcher.LegacyRPCAccessPolicy)
|
||||
|
||||
|
||||
def get_notifier(service=None, host=None, publisher_id=None):
|
||||
|
Loading…
Reference in New Issue
Block a user