summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2018-01-09 16:08:16 +0900
committerIWASE Yusuke <iwase.yusuke0@gmail.com>2018-01-09 16:15:11 +0900
commit53df6493e1ca981c3bde8e2c15832625c8cce2da (patch)
treec62eeca63750f933153e0fcbad435bb0965baa68 /test
parent4e993174e369966f313fb859fc759c104d8f8841 (diff)
test/lib/{gobgp,quagga}: IPv6 forwarding in zebra.conf
With this patch, it is not required to enable IPv6 forwarding by using "sysctl" explicitly in Quagga or GoBGP(Zebra enabled) containers. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/lib/gobgp.py14
-rw-r--r--test/lib/quagga.py2
2 files changed, 9 insertions, 7 deletions
diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py
index e1e7b15b..6422e79d 100644
--- a/test/lib/gobgp.py
+++ b/test/lib/gobgp.py
@@ -341,14 +341,14 @@ class GoBGPContainer(BGPContainer):
for peer, info in self.peers.iteritems():
afi_safi_list = []
if info['interface'] != '':
- afi_safi_list.append({'config':{'afi-safi-name': 'ipv4-unicast'}})
- afi_safi_list.append({'config':{'afi-safi-name': 'ipv6-unicast'}})
+ afi_safi_list.append({'config': {'afi-safi-name': 'ipv4-unicast'}})
+ afi_safi_list.append({'config': {'afi-safi-name': 'ipv6-unicast'}})
else:
version = netaddr.IPNetwork(info['neigh_addr']).version
if version == 4:
- afi_safi_list.append({'config':{'afi-safi-name': 'ipv4-unicast'}})
+ afi_safi_list.append({'config': {'afi-safi-name': 'ipv4-unicast'}})
elif version == 6:
- afi_safi_list.append({'config':{'afi-safi-name': 'ipv6-unicast'}})
+ afi_safi_list.append({'config': {'afi-safi-name': 'ipv6-unicast'}})
else:
Exception('invalid ip address version. {0}'.format(version))
@@ -433,9 +433,8 @@ class GoBGPContainer(BGPContainer):
'route-reflector-cluster-id': cluster_id}}
if info['addpath']:
- n['add-paths'] = {'config' : {'receive': True,
- 'send-max': 16}}
-
+ n['add-paths'] = {'config': {'receive': True,
+ 'send-max': 16}}
if len(info.get('default-policy', [])) + len(info.get('policies', [])) > 0:
n['apply-policy'] = {'config': {}}
@@ -504,6 +503,7 @@ class GoBGPContainer(BGPContainer):
c << 'debug zebra packet'
c << 'debug zebra kernel'
c << 'debug zebra rib'
+ c << 'ipv6 forwarding'
c << ''
with open('{0}/zebra.conf'.format(self.quagga_config_dir), 'w') as f:
diff --git a/test/lib/quagga.py b/test/lib/quagga.py
index 8f5f17c1..6d65f061 100644
--- a/test/lib/quagga.py
+++ b/test/lib/quagga.py
@@ -243,6 +243,7 @@ class QuaggaBGPContainer(BGPContainer):
c << 'debug zebra packet'
c << 'debug zebra kernel'
c << 'debug zebra rib'
+ c << 'ipv6 forwarding'
c << ''
with open('{0}/zebra.conf'.format(self.config_dir), 'w') as f:
@@ -356,6 +357,7 @@ class QuaggaOSPFContainer(OSPFContainer):
c << 'debug zebra packet'
c << 'debug zebra kernel'
c << 'debug zebra rib'
+ c << 'ipv6 forwarding'
c << ''
with open('{0}/zebra.conf'.format(self.config_dir), 'w') as f: