]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgp_rfapi_basic_sanity: added cost to 2nd MP route
authorLou Berger <lberger@labn.net>
Wed, 29 Aug 2018 13:42:28 +0000 (13:42 +0000)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:14 +0000 (20:22 -0500)
Signed-off-by: Lou Berger <lberger@labn.net>
tests/topotests/bgp_rfapi_basic_sanity/scripts/add_routes.py

index 1a7b0b65dcac4d6afea31db3a8e6d65c259774d3..7b5b192227992af5d03c3bc86b23fa7e898e647b 100644 (file)
@@ -2,8 +2,10 @@ from lutil import luCommand
 holddownFactorSet = luCommand('r1','vtysh -c "show running"','rfp holddown-factor','none','Holddown factor set')
 if not holddownFactorSet:
     to = "-1"
+    cost = ""
 else:
     to = "6"
+    cost = "cost 50"
 luCommand('r1','vtysh -c "debug rfapi-dev open vn 10.0.0.1 un 1.1.1.1"','rfapi_set_response_cb: status 0', 'pass', 'Opened RFAPI')
 luCommand('r1','vtysh -c "debug rfapi-dev register vn 10.0.0.1 un 1.1.1.1 prefix 11.11.11.0/24 lifetime {}"'.format(to),'', 'none', 'Prefix registered')
 luCommand('r1','vtysh -c "show vnc registrations local"','1 out of 1','wait','Local registration')
@@ -22,7 +24,7 @@ luCommand('r4','vtysh -c "show vnc registrations local"','1 out of 1','wait','Lo
 luCommand('r4','vtysh -c "debug rfapi-dev response-omit-self off"','.','none')
 luCommand('r4','vtysh -c "debug rfapi-dev query vn 10.0.0.3 un 3.3.3.3 target 33.33.33.33"','33.33.33.0/24', 'pass', 'Query self')
 
-luCommand('r4','vtysh -c "debug rfapi-dev register vn 10.0.0.3 un 3.3.3.3 prefix 11.11.11.0/24 lifetime {}"'.format(to),'', 'none', 'MP Prefix registered')
+luCommand('r4','vtysh -c "debug rfapi-dev register vn 10.0.0.3 un 3.3.3.3 prefix 11.11.11.0/24 lifetime {} {}"'.format(to, cost),'', 'none', 'MP Prefix registered')
 luCommand('r4','vtysh -c "show vnc registrations local"','2 out of 2','wait','Local registration')
 luCommand('r4','vtysh -c "debug rfapi-dev query vn 10.0.0.3 un 3.3.3.3 target 11.11.11.11"','11.11.11.0/24', 'pass', 'Query self MP')