diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-01-25 14:42:33 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-01-27 20:48:42 +0900 |
commit | 5ea3cbdd9dc41e6dcf3c0258455a357e154efdb1 (patch) | |
tree | 6f331a98b035cb5d027ee556de6958064e19c25c /test/scenario_test/route_reflector_test.py | |
parent | 38223f2f512cce3d05c9ae8f29ade983aa723cef (diff) |
test/lib/Quagga: Use vtysh to add/del routes
Currently, to advertise or withdraw routes on QuaggaBGPContainer, we
need to configure static routes in configure file and restart Quagga
daemons.
In other words, we can NOT send withdrawing advertisement from Quagga
side.
Also, restating Quagga daemons frequently can make scenario test
unstable, and it should be avoided.
This patch fixes to use "vtysh" and reduces the number of restating
Quagga daemons.
Note: According to this change, adding routes on Quagga should be called
after starting daemons.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'test/scenario_test/route_reflector_test.py')
-rw-r--r-- | test/scenario_test/route_reflector_test.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/scenario_test/route_reflector_test.py b/test/scenario_test/route_reflector_test.py index a5516dec..29846d53 100644 --- a/test/scenario_test/route_reflector_test.py +++ b/test/scenario_test/route_reflector_test.py @@ -61,13 +61,7 @@ class GoBGPTestBase(unittest.TestCase): qs = [q1, q2, q3, q4] ctns = [g1, q1, q2, q3, q4] - # advertise a route from q1, q2 - for idx, c in enumerate(qs): - route = '10.0.{0}.0/24'.format(idx + 1) - c.add_route(route) - initial_wait_time = max(ctn.run() for ctn in ctns) - time.sleep(initial_wait_time) # g1 as a route reflector @@ -80,6 +74,11 @@ class GoBGPTestBase(unittest.TestCase): g1.add_peer(q4) q4.add_peer(g1) + # advertise a route from q1, q2 + for idx, c in enumerate(qs): + route = '10.0.{0}.0/24'.format(idx + 1) + c.add_route(route) + cls.gobgp = g1 cls.quaggas = {'q1': q1, 'q2': q2, 'q3': q3, 'q4': q4} |