def _setup_rpc(self): self.topic = bgp_consts.BGP_PLUGIN self.conn = n_rpc.create_connection() self.agent_notifiers[bgp_consts.AGENT_TYPE_BGP_ROUTING] = ( bgp_dr_rpc_agent_api.BgpDrAgentNotifyApi()) self._bgp_rpc = self.agent_notifiers[bgp_consts.AGENT_TYPE_BGP_ROUTING] self.endpoints = [bs_rpc.BgpSpeakerRpcCallback()] self.conn.create_consumer(self.topic, self.endpoints, fanout=False) self.conn.consume_in_threads()
def setUp(self): self.plugin_p = mock.patch('neutron.manager.NeutronManager.' 'get_service_plugins') self.plugin = self.plugin_p.start() self.callback = bgp_speaker_rpc.BgpSpeakerRpcCallback() super(TestBgpSpeakerRpcCallback, self).setUp()
def setUp(self): super(TestBgpSpeakerRpcCallback, self).setUp() self.plugin = mock.Mock() directory.add_plugin(bgp_ext.ALIAS, self.plugin) self.callback = bgp_speaker_rpc.BgpSpeakerRpcCallback()