from oslo import messaging
from neutron.common import log
+from neutron.common import rpc as n_rpc
from neutron.common import topics
from neutron import manager
from neutron.openstack.common import log as logging
LOG = logging.getLogger(__name__)
-class DVRServerRpcApiMixin(object):
+class DVRServerRpcApi(object):
"""Agent-side RPC (stub) for agent-to-plugin interaction."""
- DVR_RPC_VERSION = "1.0"
+ def __init__(self, topic):
+ target = messaging.Target(topic=topic, version='1.0')
+ self.client = n_rpc.get_client(target)
@log.log
def get_dvr_mac_address_by_host(self, context, host):
self.segmentation_id))
-class OVSPluginApi(agent_rpc.PluginApi, dvr_rpc.DVRServerRpcApiMixin):
+class OVSPluginApi(agent_rpc.PluginApi):
pass
self.dvr_agent = ovs_dvr_neutron_agent.OVSDVRNeutronAgent(
self.context,
- self.plugin_rpc,
+ self.dvr_plugin_rpc,
self.int_br,
self.tun_br,
self.patch_int_ofport,
self.topic = topics.AGENT
self.plugin_rpc = OVSPluginApi(topics.PLUGIN)
self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
+ self.dvr_plugin_rpc = dvr_rpc.DVRServerRpcApi(topics.PLUGIN)
self.state_rpc = agent_rpc.PluginReportStateAPI(topics.PLUGIN)
# RPC network init