summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/route_server_ipv4_v6_test.py
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2018-01-25 14:42:33 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-01-27 20:48:42 +0900
commit5ea3cbdd9dc41e6dcf3c0258455a357e154efdb1 (patch)
tree6f331a98b035cb5d027ee556de6958064e19c25c /test/scenario_test/route_server_ipv4_v6_test.py
parent38223f2f512cce3d05c9ae8f29ade983aa723cef (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_server_ipv4_v6_test.py')
-rw-r--r--test/scenario_test/route_server_ipv4_v6_test.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/scenario_test/route_server_ipv4_v6_test.py b/test/scenario_test/route_server_ipv4_v6_test.py
index 9d7e15a7..07f77e4a 100644
--- a/test/scenario_test/route_server_ipv4_v6_test.py
+++ b/test/scenario_test/route_server_ipv4_v6_test.py
@@ -52,16 +52,7 @@ class GoBGPIPv6Test(unittest.TestCase):
v4 = [q1, q2]
v6 = [q3, q4]
- for idx, q in enumerate(v4):
- route = '10.0.{0}.0/24'.format(idx + 1)
- q.add_route(route)
-
- for idx, q in enumerate(v6):
- route = '2001:{0}::/96'.format(idx + 1)
- q.add_route(route, rf='ipv6')
-
initial_wait_time = max(ctn.run() for ctn in ctns)
-
time.sleep(initial_wait_time)
for ctn in v4:
@@ -72,6 +63,14 @@ class GoBGPIPv6Test(unittest.TestCase):
g1.add_peer(ctn, is_rs_client=True, v6=True)
ctn.add_peer(g1, v6=True)
+ for idx, q in enumerate(v4):
+ route = '10.0.{0}.0/24'.format(idx + 1)
+ q.add_route(route)
+
+ for idx, q in enumerate(v6):
+ route = '2001:{0}::/96'.format(idx + 1)
+ q.add_route(route, rf='ipv6')
+
cls.gobgp = g1
cls.quaggas = {'q1': q1, 'q2': q2, 'q3': q3, 'q4': q4}
cls.ipv4s = {'q1': q1, 'q2': q2}