Example #1
0
    def test_11_add_ibgp_peer(self):
        q = ExaBGPContainer(name='q5', asn=65000, router_id='192.168.0.6')
        time.sleep(q.run())
        self.quaggas['q5'] = q

        self.gobgp.add_peer(q)
        q.add_peer(self.gobgp)
        self.gobgp.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=q)
    def test_11_add_ibgp_peer(self):
        q = ExaBGPContainer(name='q5', asn=65000, router_id='192.168.0.6')
        time.sleep(q.run())
        self.quaggas['q5'] = q

        self.gobgp.add_peer(q)
        q.add_peer(self.gobgp)
        self.gobgp.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=q)
Example #3
0
    def test_02_add_neighbor(self):
        e2 = ExaBGPContainer(name='e2', asn=65001, router_id='192.168.0.4')
        time.sleep(e2.run())
        self.gobgp.add_peer(e2, is_rs_client=True)
        e2.add_peer(self.gobgp)

        self.gobgp.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=e2)
        self.clients[e2.name] = e2
Example #4
0
    def test_02_add_neighbor(self):
        e2 = ExaBGPContainer(name='e2', asn=65001, router_id='192.168.0.4')
        time.sleep(e2.run())
        self.gobgp.add_peer(e2, is_rs_client=True)
        e2.add_peer(self.gobgp)

        self.gobgp.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=e2)
        self.clients[e2.name] = e2
 def test_03_add_peer(self):
     q = ExaBGPContainer(name='q4', asn=65004, router_id='192.168.0.5')
     q.add_route('10.10.0.0/24')
     time.sleep(q.run())
     self.gobgp.add_peer(q)
     q.add_peer(self.gobgp)
     self.gobgp.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=q)
     self.quaggas['q4'] = q
     for q in self.quaggas.itervalues():
         self.assertTrue(len(self.gobgp.get_adj_rib_out(q)) == 0)
Example #6
0
 def test_03_add_peer(self):
     q = ExaBGPContainer(name='q4', asn=65004, router_id='192.168.0.5')
     time.sleep(q.run())
     self.gobgp.add_peer(q)
     q.add_peer(self.gobgp)
     q.add_route('10.10.0.0/24')
     self.gobgp.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=q)
     self.quaggas['q4'] = q
     for q in self.quaggas.values():
         self.assertEqual(len(self.gobgp.get_adj_rib_out(q)), 0)
Example #7
0
    def test_19_check_grpc_add_neighbor(self):
        g1 = self.gobgp
        e1 = ExaBGPContainer(name='e1', asn=65000, router_id='192.168.0.7')
        time.sleep(e1.run())
        e1.add_peer(g1)
        self.quaggas['e1'] = e1
        n = e1.peers[g1]['local_addr'].split('/')[0]
        g1.local('gobgp n add {0} as 65000'.format(n))
        g1.add_peer(e1, reload_config=False)

        g1.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=e1)
Example #8
0
    def test_19_check_grpc_add_neighbor(self):
        g1 = self.gobgp
        e1 = ExaBGPContainer(name='e1', asn=65000, router_id='192.168.0.7')
        time.sleep(e1.run())
        e1.add_peer(g1)
        self.quaggas['e1'] = e1
        n = e1.peers[g1]['local_addr'].split('/')[0]
        g1.local('gobgp n add {0} as 65000'.format(n))
        g1.add_peer(e1, reload_config=False)

        g1.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=e1)