コード例 #1
0
    def setUp(self):
        super(TestBaGPipeBGPAgentSingleService, self).setUp()

        self.agent = agent.BaGPipeBGPAgent('Linux bridge agent')
        self.agent._send_attach_local_port = mock.Mock()
        self.agent._send_detach_local_port = mock.Mock()

        self.service1 = mock.Mock(name='SERVICE1')
        self.agent.register_build_callback(self.service1.name,
                                           self.service1._build_port_info)
コード例 #2
0
    def initialize(self, connection, driver_type):

        if driver_type != ovs_agt_constants.EXTENSION_DRIVER_TYPE:
            raise Exception("This extension is currently working only with the"
                            " OVS Agent")

        # Create an HTTP client for BaGPipe BGP component REST service
        self.bagpipe_bgp_agent = bagpipe_bgp_agent.BaGPipeBGPAgent(
            n_const.AGENT_TYPE_OVS,
            connection,
            int_br=self.int_br,
            tun_br=self.tun_br,
        )
コード例 #3
0
    def __init__(self, *args, **kwargs):
        super(OVSBagpipeNeutronAgent, self).__init__(*args, **kwargs)

        # Creates an HTTP client for BaGPipe BGP component REST service
        self.bgp_agent = (bagpipe_bgp_agent.BaGPipeBGPAgent(
            q_const.AGENT_TYPE_OVS,
            int_br=self.int_br,
            tun_br=self.tun_br,
            patch_int_ofport=self.patch_int_ofport,
            local_vlan_map=self.local_vlan_map,
            setup_entry_for_arp_reply=self.setup_entry_for_arp_reply))

        self.bgp_agent.setup_rpc(self.endpoints, self.connection, self.topic)
コード例 #4
0
    def initialize(self, connection, driver_type):

        # Create an HTTP client for BaGPipe BGP component REST service
        self.bagpipe_bgp_agent = bagpipe_bgp_agent.BaGPipeBGPAgent(
            n_const.AGENT_TYPE_LINUXBRIDGE, connection)