summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-07-25 07:32:58 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-11-27 20:22:14 -0500
commit064c807f63ba6d86b819c7b940b01e77dc1d3104 (patch)
tree34e7e1096c4388dc870f011a1ab2ee7f2b58113f
parentf8d5215d828c6b152d2e10c67eb840443559fa63 (diff)
bgp_l3vpn_to_bgp_direct: imports and more debug Allow for different timings on, and number of, import processing Collect more info for debugging
Signed-off-by: Lou Berger <lberger@labn.net>
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/add_routes.py56
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/check_routes.py13
2 files changed, 53 insertions, 16 deletions
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/add_routes.py b/tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/add_routes.py
index 2b853b934a..3a24367a56 100644
--- a/tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/add_routes.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/add_routes.py
@@ -1,19 +1,51 @@
from lutil import luCommand
+luCommand('r1','vtysh -c "show bgp next"','99.0.0.. valid', 'wait', 'See CE static NH')
+luCommand('r3','vtysh -c "show bgp next"','99.0.0.. valid', 'wait', 'See CE static NH')
+luCommand('r4','vtysh -c "show bgp next"','99.0.0.. valid', 'wait', 'See CE static NH')
+luCommand('r1','vtysh -c "show bgp ipv4 uni"','i5.*i5','wait','See CE routes')
+luCommand('r3','vtysh -c "show bgp ipv4 uni"','i5.*i5','wait','See CE routes')
+luCommand('r4','vtysh -c "show bgp ipv4 uni"','i5.*i5','wait','See CE routes')
+luCommand('ce1','vtysh -c "show bgp ipv4 uni 5.1.0.0/24"','','none','See CE routes')
+luCommand('r1','vtysh -c "show bgp ipv4 uni 5.1.0.0/24"','','none','See CE routes')
+luCommand('ce2','vtysh -c "show bgp ipv4 uni 5.1.0.0/24"','','none','See CE routes')
+luCommand('r3','vtysh -c "show bgp ipv4 uni 5.1.0.0/24"','','none','See CE routes')
+luCommand('ce3','vtysh -c "show bgp ipv4 uni 5.1.2.0/24"','','none','See CE routes')
+luCommand('r4','vtysh -c "show bgp ipv4 uni 5.1.2.0/24"','','none','See CE routes')
+
luCommand('r1','vtysh -c "add vrf cust1 prefix 99.0.0.1/32"','.','none','IP Address')
-luCommand('r3','vtysh -c "show bgp ipv4 vpn"','i99.0.0.1/32','wait','See R1s address')
-luCommand('r4','vtysh -c "show bgp ipv4 vpn"','i99.0.0.1/32','wait','See R1s address')
+luCommand('r1','vtysh -c "show vnc registrations local"','99.0.0.1','wait','Local Registration')
+luCommand('r1','vtysh -c "show vnc registrations imported"','2 out of 2 imported','wait','Imported Registrations')
+luCommand('r3','vtysh -c "show bgp ipv4 vpn"','i99.0.0.1/32','wait','See R1s static address')
+luCommand('r4','vtysh -c "show bgp ipv4 vpn"','i99.0.0.1/32','wait','See R1s static address')
+luCommand('r3','vtysh -c "show bgp ipv4 vpn rd 10:1"','i5.*i5','wait','See R1s imports')
+luCommand('r4','vtysh -c "show bgp ipv4 vpn rd 10:1"','i5.*i5','wait','See R1s imports')
+
luCommand('r3','vtysh -c "add vrf cust1 prefix 99.0.0.2/32"','.','none','IP Address')
-luCommand('r1','vtysh -c "show bgp ipv4 vpn"','i99.0.0.2/32','wait','See R3s address')
-luCommand('r4','vtysh -c "show bgp ipv4 vpn"','i99.0.0.2/32','wait','See R3s address')
+luCommand('r3','vtysh -c "show vnc registrations local"','99.0.0.2','wait','Local Registration')
+have2ndImports = luCommand('r3','vtysh -c "show vnc registrations imported"','2 out of 2 imported','none','Imported Registrations',2)
+if have2ndImports:
+ luCommand('r3','vtysh -c "show vnc registrations imported"','2 out of 2 imported','pass','Imported Registrations')
+luCommand('r1','vtysh -c "show bgp ipv4 vpn"','i99.0.0.2/32','wait','See R3s static address')
+luCommand('r4','vtysh -c "show bgp ipv4 vpn"','i99.0.0.2/32','wait','See R3s static address')
+if have2ndImports:
+ luCommand('r1','vtysh -c "show bgp ipv4 vpn rd 10:3"','i5.*i5','none','See R3s imports')
+ luCommand('r4','vtysh -c "show bgp ipv4 vpn rd 10:3"','i5.*i5','none','See R3s imports')
+
luCommand('r4','vtysh -c "add vrf cust1 prefix 99.0.0.3/32"','.','none','IP Address')
-luCommand('r1','vtysh -c "show bgp ipv4 vpn"','i99.0.0.3/32','wait','See R4s address')
-luCommand('r3','vtysh -c "show bgp ipv4 vpn"','i99.0.0.3/32','wait','See R4s address')
-luCommand('r1','vtysh -c "show vnc registrations local"','99.0.0.1','pass','Local Registration')
-luCommand('r3','vtysh -c "show vnc registrations local"','99.0.0.2','pass','Local Registration')
-luCommand('r4','vtysh -c "show vnc registrations local"','99.0.0.3','pass','Local Registration')
-luCommand('r1','vtysh -c "show vnc registrations remote"','4 out of 4','wait','Remote Registration')
-luCommand('r3','vtysh -c "show vnc registrations remote"','6 out of 6','wait','Remote Registration')
-luCommand('r4','vtysh -c "show vnc registrations remote"','4 out of 4','wait','Remote Registration')
+luCommand('r4','vtysh -c "show vnc registrations local"','99.0.0.3','wait','Local Registration')
+luCommand('r4','vtysh -c "show vnc registrations imported"','2 out of 2 imported','wait','Imported Registrations')
+luCommand('r1','vtysh -c "show bgp ipv4 vpn"','i99.0.0.3/32','wait','See R4s static address')
+luCommand('r3','vtysh -c "show bgp ipv4 vpn"','i99.0.0.3/32','wait','See R4s static address')
+luCommand('r1','vtysh -c "show bgp ipv4 vpn rd 10:4"','i5.*i5','wait','See R4s imports')
+luCommand('r3','vtysh -c "show bgp ipv4 vpn rd 10:4"','i5.*i5','wait','See R4s imports')
+
+
+luCommand('r1','vtysh -c "show vnc registrations remote"','5.1.2.0/24 .*5.1.3.0/24','wait','R4s registrations')
+luCommand('r3','vtysh -c "show vnc registrations remote"','5.1.2.0/24 .*5.1.3.0/24','wait','R4s registrations')
+if have2ndImports:
+ luCommand('r1','vtysh -c "show vnc registrations remote"','5.1.0.0/24 .*5.1.1.0/24','wait','Remote registrations')
+ luCommand('r3','vtysh -c "show vnc registrations remote"','5.1.0.0/24 .*5.1.1.0/24','wait','Remote registrations')
+luCommand('r4','vtysh -c "show vnc registrations remote"','5.1.0.0/24 .*5.1.1.0/24','wait','Remote registrations')
luCommand('r1','vtysh -c "show vnc registrations"','.','none')
luCommand('r3','vtysh -c "show vnc registrations"','.','none')
luCommand('r4','vtysh -c "show vnc registrations"','.','none')
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/check_routes.py b/tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/check_routes.py
index dab2f8c2cf..492be9e4da 100644
--- a/tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/check_routes.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/scripts/check_routes.py
@@ -6,7 +6,12 @@ luCommand('r1','vtysh -c "show bgp ipv4 uni"','7 routes and 9','pass','Unicast S
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')
+have2ndImports = luCommand('r3','vtysh -c "show vnc registrations imported"','2 out of 2 imported','none','Imported Registrations',2)
+if have2ndImports:
+ num = '9 routes and 9'
+else:
+ num = '7 routes and 7'
+luCommand('r1','vtysh -c "show bgp ipv4 vpn"',num,'pass','VPN SAFI')
+luCommand('r2','vtysh -c "show bgp ipv4 vpn"',num,'pass','VPN SAFI')
+luCommand('r3','vtysh -c "show bgp ipv4 vpn"',num,'pass','VPN SAFI')
+luCommand('r4','vtysh -c "show bgp ipv4 vpn"',num,'pass','VPN SAFI')