Drop RpcProxy usage from MetadataPluginApi
Drop the usage of the RpcProxy compatibility class from MetadataPluginApi. The equivalent direct usage of oslo.messaging APIs are used instead. Part of blueprint drop-rpc-compat. Change-Id: I1764dd715237bc76dae2789121850f69b8f82888
This commit is contained in:
parent
e38e259c28
commit
833e601242
@ -46,23 +46,20 @@ from neutron import wsgi
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MetadataPluginAPI(n_rpc.RpcProxy):
|
||||
class MetadataPluginAPI(object):
|
||||
"""Agent-side RPC (stub) for agent-to-plugin interaction.
|
||||
|
||||
API version history:
|
||||
1.0 - Initial version.
|
||||
"""
|
||||
|
||||
BASE_RPC_API_VERSION = '1.0'
|
||||
|
||||
def __init__(self, topic):
|
||||
super(MetadataPluginAPI, self).__init__(
|
||||
topic=topic, default_version=self.BASE_RPC_API_VERSION)
|
||||
target = messaging.Target(topic=topic, version='1.0')
|
||||
self.client = n_rpc.get_client(target)
|
||||
|
||||
def get_ports(self, context, filters):
|
||||
return self.call(context,
|
||||
self.make_msg('get_ports',
|
||||
filters=filters))
|
||||
cctxt = self.client.prepare()
|
||||
return cctxt.call(context, 'get_ports', filters=filters)
|
||||
|
||||
|
||||
class MetadataProxyHandler(object):
|
||||
|
Loading…
x
Reference in New Issue
Block a user