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__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class MetadataPluginAPI(n_rpc.RpcProxy):
|
class MetadataPluginAPI(object):
|
||||||
"""Agent-side RPC (stub) for agent-to-plugin interaction.
|
"""Agent-side RPC (stub) for agent-to-plugin interaction.
|
||||||
|
|
||||||
API version history:
|
API version history:
|
||||||
1.0 - Initial version.
|
1.0 - Initial version.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
BASE_RPC_API_VERSION = '1.0'
|
|
||||||
|
|
||||||
def __init__(self, topic):
|
def __init__(self, topic):
|
||||||
super(MetadataPluginAPI, self).__init__(
|
target = messaging.Target(topic=topic, version='1.0')
|
||||||
topic=topic, default_version=self.BASE_RPC_API_VERSION)
|
self.client = n_rpc.get_client(target)
|
||||||
|
|
||||||
def get_ports(self, context, filters):
|
def get_ports(self, context, filters):
|
||||||
return self.call(context,
|
cctxt = self.client.prepare()
|
||||||
self.make_msg('get_ports',
|
return cctxt.call(context, 'get_ports', filters=filters)
|
||||||
filters=filters))
|
|
||||||
|
|
||||||
|
|
||||||
class MetadataProxyHandler(object):
|
class MetadataProxyHandler(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user