diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-21 22:51:03 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-21 22:51:03 +0900 |
commit | 94bc49b98ba32b6b334d78d2668b2f2b274e8d53 (patch) | |
tree | 6c17331bd7b219ca6d6f2414f0bad93863fd1b9d /test | |
parent | 46231a72017a6d669e29ec80557ac89bdf220099 (diff) |
test: ROUTE REFRESH handling with update EXPORT policy test
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'test')
-rw-r--r-- | test/scenario_test/lib/quagga.py | 5 | ||||
-rw-r--r-- | test/scenario_test/route_server_policy_grpc_test.py | 58 |
2 files changed, 63 insertions, 0 deletions
diff --git a/test/scenario_test/lib/quagga.py b/test/scenario_test/lib/quagga.py index f36b56a8..6001d9a3 100644 --- a/test/scenario_test/lib/quagga.py +++ b/test/scenario_test/lib/quagga.py @@ -152,6 +152,11 @@ class QuaggaBGPContainer(BGPContainer): raise Exception('not found peer {0}'.format(peer.router_id)) + def send_route_refresh(self): + with QuaggaTelnetDaemon(self) as tn: + tn.write('clear ip bgp * soft\n') + #tn.read_until('bgpd#') + def create_config(self): self._create_config_bgp() if self.zebra: diff --git a/test/scenario_test/route_server_policy_grpc_test.py b/test/scenario_test/route_server_policy_grpc_test.py index 54dcf3da..06f72e3c 100644 --- a/test/scenario_test/route_server_policy_grpc_test.py +++ b/test/scenario_test/route_server_policy_grpc_test.py @@ -368,6 +368,64 @@ class ExportPolicyUpdate(object): @register_scenario +class ExportPolicyUpdateRouteRefresh(object): + """ + export-policy update and route refresh handling test + + r1:192.168.2.0 + r2:192.168.20.0 + r3:192.168.200.0 + ------------------------------------------------- + | q1 | + e1 ->(r1,r2,r3)-> | ->(r1,r2,r3)-> rib ->(r1,r2,r3)-> adj-rib-out | ->(r1,r2,r3)-> q1 + | | + | q2 | + | ->(r1,r2,r3)-> rib ->(r1)-> adj-rib-out | ->(r1)-> q2 + ------------------------------------------------- + | + update gobgp.conf + q2 sends route refresh + | + V + ------------------------------------------------- + | q1 | + e1 ->(r1,r2,r3)-> | ->(r1,r2,r3)-> rib ->(r1,r2,r3)-> adj-rib-out | ->(r1,r2,r3)-> q1 + | | + | q2 | + | ->(r1,r2,r3)-> rib ->(r1,r3)-> adj-rib-out | ->(r1,r3)-> q2 + ------------------------------------------------- + """ + @staticmethod + def boot(env): + lookup_scenario("ExportPolicyUpdate").boot(env) + + @staticmethod + def setup(env): + lookup_scenario("ExportPolicyUpdate").setup(env) + + @staticmethod + def check(env): + lookup_scenario("ExportPolicyUpdate").check(env) + + @staticmethod + def setup2(env): + g1 = env.g1 + e1 = env.e1 + q1 = env.q1 + q2 = env.q2 + + g1.local('gobgp policy prefix del ps0 192.168.200.0/24') + q2.send_route_refresh() + + for c in [e1, q1, q2]: + g1.wait_for(BGP_FSM_ESTABLISHED, c) + + @staticmethod + def check2(env): + lookup_scenario("ExportPolicyUpdate").check2(env) + + +@register_scenario class ImportPolicyIPV6(object): """ No.5 IPv6 import-policy test |