class MetadataPluginAPI(object):
- """Agent-side RPC (stub) for agent-to-plugin interaction.
+ """Agent-side RPC for metadata agent-to-plugin interaction.
+
+ This class implements the client side of an rpc interface used by the
+ metadata service to make calls back into the Neutron plugin. The server
+ side is defined in
+ neutron.api.rpc.handlers.metadata_rpc.MetadataRpcCallback. For more
+ information about changing rpc interfaces, see
+ doc/source/devref/rpc_api.rst.
API version history:
1.0 - Initial version.
"""
def __init__(self, topic):
- target = messaging.Target(topic=topic, version='1.0')
+ target = messaging.Target(topic=topic,
+ namespace=n_const.RPC_NAMESPACE_METADATA,
+ version='1.0')
self.client = n_rpc.get_client(target)
def get_ports(self, context, filters):
from oslo import messaging
+from neutron.common import constants
from neutron import manager
class MetadataRpcCallback(object):
- """Metadata agent RPC callback in plugin implementations."""
+ """Metadata agent RPC callback in plugin implementations.
+
+ This class implements the server side of an rpc interface used by the
+ metadata service to make calls back into the Neutron plugin. The client
+ side is defined in neutron.agent.metadata.agent.MetadataPluginAPI. For
+ more information about changing rpc interfaces, see
+ doc/source/devref/rpc_api.rst.
+ """
# 1.0 MetadataPluginAPI BASE_RPC_API_VERSION
- target = messaging.Target(version='1.0')
+ target = messaging.Target(version='1.0',
+ namespace=constants.RPC_NAMESPACE_METADATA)
@property
def plugin(self):
# RPC Interface for agents to call DHCP API implemented on the plugin side
RPC_NAMESPACE_DHCP_PLUGIN = 'dhcp'
+# RPC interface for the metadata service to get info from the plugin side
+RPC_NAMESPACE_METADATA = 'metadata'