Set access_policy for messaging's dispatcher
oslo.messaging allow dispatcher to restrict endpoint methods since 5.11.0 in d3a8f280ebd6fd12865fd20c4d772774e39aefa2, set with DefaultRPCAccessPolicy to fix FutureWarning like: 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. Change-Id: I9ffa8e972f2015a5ac1a478252db0e017637132c
This commit is contained in:
committed by
Shubhendu Poothia
parent
54c5d5dc2a
commit
37556080ed
@@ -21,6 +21,7 @@ import os
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_messaging.rpc import dispatcher
|
||||
import signal
|
||||
import time
|
||||
|
||||
@@ -85,10 +86,11 @@ class ConductorManager(object):
|
||||
endpoints = [
|
||||
endp.ConductorEndpoint(ragent),
|
||||
]
|
||||
self.server = oslo_messaging.get_rpc_server(transport,
|
||||
target,
|
||||
endpoints,
|
||||
executor='threading')
|
||||
access_policy = dispatcher.DefaultRPCAccessPolicy
|
||||
self.server = oslo_messaging.get_rpc_server(
|
||||
transport, target,
|
||||
endpoints, executor='threading',
|
||||
access_policy=access_policy)
|
||||
|
||||
self.server.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user