summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/lib/quagga.py
diff options
context:
space:
mode:
authorNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-09-17 20:45:24 +0900
committerNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-09-18 19:47:41 +0900
commitc47286abeef75bd6c46db11060d9ba5bf185ad01 (patch)
tree8c5f9c34d7d8e160c89f02c27154a15cf7edda4b /test/scenario_test/lib/quagga.py
parentd53614ec889547db37573cef336a062895605047 (diff)
scenario_test: fix bug of bgp_zebra_test
container was wrong to check whether the reachable in the test. thus, modified to check the reachability between the correct container and implemented modifications of the logic associated with the above.
Diffstat (limited to 'test/scenario_test/lib/quagga.py')
-rw-r--r--test/scenario_test/lib/quagga.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/scenario_test/lib/quagga.py b/test/scenario_test/lib/quagga.py
index b881f6ed..3cd29618 100644
--- a/test/scenario_test/lib/quagga.py
+++ b/test/scenario_test/lib/quagga.py
@@ -158,12 +158,14 @@ class QuaggaBGPContainer(BGPContainer):
self._create_config_zebra()
def _create_config_bgp(self):
+
c = CmdBuffer()
c << 'hostname bgpd'
c << 'password zebra'
c << 'router bgp {0}'.format(self.asn)
c << 'bgp router-id {0}'.format(self.router_id)
+ version = 4
for peer, info in self.peers.iteritems():
version = netaddr.IPNetwork(info['neigh_addr']).version
n_addr = info['neigh_addr'].split('/')[0]
@@ -192,6 +194,13 @@ class QuaggaBGPContainer(BGPContainer):
else:
raise Exception('unsupported route faily: {0}'.format(route['rf']))
+ if self.zebra:
+ if version == 6:
+ c << 'address-family ipv6 unicast'
+ c << 'redistribute connected'
+ c << 'exit-address-family'
+ else:
+ c << 'redistribute connected'
for name, policy in self.policies.iteritems():
c << 'access-list {0} {1} {2}'.format(name, policy['type'],