2018-05-11 16:02:10 -05:00
|
|
|
from swsscommon import swsscommon
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import time
|
|
|
|
import json
|
2019-05-08 01:40:40 -05:00
|
|
|
import pytest
|
2018-05-11 16:02:10 -05:00
|
|
|
|
2018-11-10 15:40:02 -06:00
|
|
|
def test_InvalidNexthop(dvs, testlog):
|
2018-05-11 16:02:10 -05:00
|
|
|
|
2019-05-08 01:40:40 -05:00
|
|
|
dvs.copy_file("/etc/frr/", "bgp/files/invalid_nexthop/bgpd.conf")
|
2018-05-11 16:02:10 -05:00
|
|
|
dvs.runcmd("supervisorctl start bgpd")
|
|
|
|
dvs.runcmd("ip addr add fc00::1/126 dev Ethernet0")
|
2020-05-30 16:23:34 -05:00
|
|
|
dvs.runcmd("config interface startup Ethernet0")
|
2018-05-11 16:02:10 -05:00
|
|
|
|
|
|
|
dvs.servers[0].runcmd("ip addr add fc00::2/126 dev eth0")
|
|
|
|
dvs.servers[0].runcmd("ifconfig eth0 up")
|
|
|
|
|
|
|
|
time.sleep(5)
|
|
|
|
|
|
|
|
print dvs.runcmd("supervisorctl status")
|
|
|
|
|
2018-07-24 00:19:45 -05:00
|
|
|
p = dvs.servers[0].runcmd_async("exabgp -d bgp/files/invalid_nexthop/invalid_nexthop.conf")
|
2018-05-11 16:02:10 -05:00
|
|
|
|
|
|
|
time.sleep(10)
|
|
|
|
|
2019-05-08 01:40:40 -05:00
|
|
|
(exit_code, output) = dvs.runcmd(["vtysh", "-c", "show bgp ipv6"])
|
2018-05-11 16:02:10 -05:00
|
|
|
|
|
|
|
p.terminate()
|
|
|
|
p = p.wait()
|
|
|
|
|
2018-08-21 12:10:58 -05:00
|
|
|
print exit_code, output
|
2018-05-11 16:02:10 -05:00
|
|
|
|
|
|
|
assert "3333::/64" in output
|