コード例 #1
0
 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()
コード例 #2
0
 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()
コード例 #3
0
 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()