from lutil import luCommand
-luCommand('ce1','vtysh -c "show bgp ipv4 uni"','7 routes and 7','wait','Local and remote routes', 10)
-luCommand('ce2','vtysh -c "show bgp ipv4 uni"','7 routes and 9','wait','Local and remote routes', 10)
-luCommand('ce3','vtysh -c "show bgp ipv4 uni"','7 routes and 7','wait','Local and remote routes', 10)
-luCommand('r1','vtysh -c "show bgp ipv4 uni"','7 routes and 9','pass','Unicast SAFI')
-luCommand('r2','vtysh -c "show bgp ipv4 uni"','No BGP prefixes displayed','pass','Unicast SAFI')
-luCommand('r3','vtysh -c "show bgp ipv4 uni"','7 routes and 9','pass','Unicast SAFI')
-luCommand('r4','vtysh -c "show bgp ipv4 uni"','7 routes and 9','pass','Unicast SAFI')
-luCommand('r1','vtysh -c "show bgp ipv4 vpn"','7 routes and 7','pass','VPN SAFI')
-luCommand('r2','vtysh -c "show bgp ipv4 vpn"','7 routes and 7','pass','VPN SAFI')
-luCommand('r3','vtysh -c "show bgp ipv4 vpn"','7 routes and 7','pass','VPN SAFI')
-luCommand('r4','vtysh -c "show bgp ipv4 vpn"','7 routes and 7','pass','VPN SAFI')
-
+luCommand('ce1','vtysh -c "show bgp ipv4 uni"','5.1.0.0/24 .* 5.1.1.0/24 *99.0.0.1 .*2 routes and 2','pass','Local routes')
+luCommand('ce2','vtysh -c "show bgp ipv4 uni"','5.1.0.0/24 .* 5.1.1.0/24 *99.0.0.2 .*2 routes and 2','pass','Local routes')
+luCommand('ce3','vtysh -c "show bgp ipv4 uni"','5.1.2.0/24 .* 5.1.3.0/24 *99.0.0.3 .*2 routes and 2','pass','Local routes')
+luCommand('ce4','vtysh -c "show bgp ipv4 uni"','5.4.2.0/24 .* 5.4.3.0/24 *99.0.0.4 .*2 routes and 2','pass','Local routes')
+luCommand('r1','vtysh -c "show bgp vrf cust1 ipv4 uni"','5.1.0.0/24 .*5.1.1.0/24 *99.0.0.1 .*2 routes and 2','wait','Cust1 unicast routes', 10)
+luCommand('r3','vtysh -c "show bgp vrf cust1 ipv4 uni"','5.1.0.0/24 .*5.1.1.0/24 *99.0.0.2 .*2 routes and 2','wait','Cust1 unicast routes', 10)
+luCommand('r4','vtysh -c "show bgp vrf cust1 ipv4 uni"','5.1.2.0/24 .*5.1.3.0/24 *99.0.0.3 .*2 routes and 2','wait','Cust1 unicast routes', 10)
+luCommand('r4','vtysh -c "show bgp vrf cust2 ipv4 uni"','5.4.2.0/24 .*5.4.3.0/24 *99.0.0.4 .*2 routes and 2','wait','Cust2 unicast routes', 10)
+luCommand('r1','vtysh -c "show bgp ipv4 uni"','No BGP prefixes displayed','pass','Core Unicast SAFI clean')
+luCommand('r2','vtysh -c "show bgp ipv4 uni"','No BGP prefixes displayed','pass','Core Unicast SAFI clean')
+luCommand('r3','vtysh -c "show bgp ipv4 uni"','No BGP prefixes displayed','pass','Core Unicast SAFI clean')
+luCommand('r4','vtysh -c "show bgp ipv4 uni"','No BGP prefixes displayed','pass','Core Unicast SAFI clean')
+luCommand('r1','vtysh -c "show bgp ipv4 vpn"','No BGP prefixes displayed','pass','Core VPN SAFI clean')
+luCommand('r2','vtysh -c "show bgp ipv4 vpn"','No BGP prefixes displayed','pass','Core VPN SAFI clean')
+luCommand('r3','vtysh -c "show bgp ipv4 vpn"','No BGP prefixes displayed','pass','Core VPN SAFI clean')
+luCommand('r4','vtysh -c "show bgp ipv4 vpn"','No BGP prefixes displayed','pass','Core VPN SAFI clean')
def test_adjacencies():
CliOnFail = None
# For debugging, uncomment the next line
- CliOnFail = 'tgen.mininet_cli'
+ #CliOnFail = 'tgen.mininet_cli'
CheckFunc = 'versionCheck(\'3.1\')'
#uncomment next line to start cli *before* script is run
- CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+ #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
ltemplateTest('scripts/adjacencies.py', False, CliOnFail, CheckFunc)
-def skip_test_add_routes():
+def SKIP_test_add_routes():
CliOnFail = None
# For debugging, uncomment the next line
#CliOnFail = 'tgen.mininet_cli'
#CheckFunc = 'versionCheck(\'3.1\', cli=True)'
ltemplateTest('scripts/add_routes.py', False, CliOnFail, CheckFunc)
-def skip_test_check_routes():
+def test_check_routes():
CliOnFail = None
# For debugging, uncomment the next line
#CliOnFail = 'tgen.mininet_cli'
#CheckFunc = 'versionCheck(\'3.1\', cli=True)'
ltemplateTest('scripts/check_routes.py', False, CliOnFail, CheckFunc)
-def test_cleanup_all():
+def SKIP_test_cleanup_all():
CliOnFail = None
# For debugging, uncomment the next line
#CliOnFail = 'tgen.mininet_cli'