From 53df6493e1ca981c3bde8e2c15832625c8cce2da Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Tue, 9 Jan 2018 16:08:16 +0900 Subject: 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 --- test/lib/gobgp.py | 14 +++++++------- test/lib/quagga.py | 2 ++ 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: -- cgit v1.2.3