Merge pull request #5781 from LabNConsulting/working/master/tt-catch-notifications

topotest: bgp_l3vpn_to_bgp_vrf - report unexpected BGP notifications
This commit is contained in:
Donatas Abraitis 2020-02-09 09:12:05 +02:00 committed by GitHub
commit ed7dd81c68
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,9 @@
from lutil import luCommand
rtrs = ['ce1', 'ce2', 'ce3', 'r1', 'r2', 'r3', 'r4']
for rtr in rtrs:
ret = luCommand(rtr, 'vtysh -c "show bgp neigh"', 'Notification received .([A-Za-z0-9/ ]*)', 'none', 'collect neighbor stats')
found = luLast()
if ret != False and found != None:
val = found.group(1)
ret = luCommand(rtr, 'vtysh -c "show bgp neigh"', 'Notification received', 'fail', 'Notify RXed! {}'.format(val))
#done

View File

@ -47,6 +47,15 @@ def test_adjacencies():
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
ltemplateTest('scripts/adjacencies.py', False, CliOnFail, CheckFunc)
def test_notification_check():
CliOnFail = None
# For debugging, uncomment the next line
#CliOnFail = 'tgen.mininet_cli'
CheckFunc = 'ltemplateVersionCheck(\'4.1\', iproute2=\'4.9\')'
#uncomment next line to start cli *before* script is run
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/notification_check.py', False, CliOnFail, CheckFunc)
def SKIP_test_add_routes():
CliOnFail = None
# For debugging, uncomment the next line
@ -75,6 +84,15 @@ def test_check_linux_mpls():
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/check_linux_mpls.py', False, CliOnFail, CheckFunc)
def test_notification_check():
CliOnFail = None
# For debugging, uncomment the next line
#CliOnFail = 'tgen.mininet_cli'
CheckFunc = 'ltemplateVersionCheck(\'4.1\', iproute2=\'4.9\')'
#uncomment next line to start cli *before* script is run
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/notification_check.py', False, CliOnFail, CheckFunc)
def test_check_scale_up():
CliOnFail = None
# For debugging, uncomment the next line
@ -84,6 +102,15 @@ def test_check_scale_up():
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/scale_up.py', False, CliOnFail, CheckFunc)
def test_notification_check():
CliOnFail = None
# For debugging, uncomment the next line
#CliOnFail = 'tgen.mininet_cli'
CheckFunc = 'ltemplateVersionCheck(\'4.1\', iproute2=\'4.9\')'
#uncomment next line to start cli *before* script is run
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/notification_check.py', False, CliOnFail, CheckFunc)
def test_check_scale_down():
CliOnFail = None
# For debugging, uncomment the next line
@ -93,6 +120,15 @@ def test_check_scale_down():
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/scale_down.py', False, CliOnFail, CheckFunc)
def test_notification_check():
CliOnFail = None
# For debugging, uncomment the next line
#CliOnFail = 'tgen.mininet_cli'
CheckFunc = 'ltemplateVersionCheck(\'4.1\', iproute2=\'4.9\')'
#uncomment next line to start cli *before* script is run
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/notification_check.py', False, CliOnFail, CheckFunc)
def SKIP_test_cleanup_all():
CliOnFail = None
# For debugging, uncomment the next line