diff options
author | Amrith Kumar <amrith@amrith.org> | 2016-12-06 12:59:05 -0500 |
---|---|---|
committer | Amrith Kumar <amrith@amrith.org> | 2017-04-25 06:55:21 -0400 |
commit | 631b886cf10041b22cc201bd0fa6a1ba720dbadd (patch) | |
tree | 38f712a37dda94f84f854886629be4fae0f614d2 /trove/rpc.py | |
parent | 191e3036e1384efc3438487674a442e43503999a (diff) | |
download | trove-631b886cf10041b22cc201bd0fa6a1ba720dbadd.tar.gz |
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
Diffstat (limited to 'trove/rpc.py')
-rw-r--r-- | trove/rpc.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/trove/rpc.py b/trove/rpc.py index dff472ee..50748aea 100644 --- a/trove/rpc.py +++ b/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): |