summaryrefslogtreecommitdiffhomepage
path: root/test/lib/gobgp.py
diff options
context:
space:
mode:
authormageshgv <mageshgv@gmail.com>2019-10-08 14:35:33 -0700
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-10-15 20:58:16 +0900
commit0235f7c67539e199eb59e7ffb09409e07a8d13e0 (patch)
treece88a843a13a5f708268212176759ff54ae812f7 /test/lib/gobgp.py
parentbfb371d0c2f543c7dd5ee4afa112a6546c886ec2 (diff)
Support vrfs in zapi multipath
Diffstat (limited to 'test/lib/gobgp.py')
-rw-r--r--test/lib/gobgp.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py
index 9384fd2a..1abdb782 100644
--- a/test/lib/gobgp.py
+++ b/test/lib/gobgp.py
@@ -62,7 +62,8 @@ class GoBGPContainer(BGPContainer):
def __init__(self, name, asn, router_id, ctn_image_name='osrg/gobgp',
log_level='debug', zebra=False, config_format='toml',
- zapi_version=2, bgp_config=None, ospfd_config=None):
+ zapi_version=2, bgp_config=None, ospfd_config=None,
+ zebra_multipath_enabled=False):
super(GoBGPContainer, self).__init__(name, asn, router_id,
ctn_image_name)
self.shared_volumes.append((self.config_dir, self.SHARED_VOLUME))
@@ -77,6 +78,7 @@ class GoBGPContainer(BGPContainer):
self.default_policy = None
self.zebra = zebra
self.zapi_version = zapi_version
+ self.zebra_multipath_enabled = zebra_multipath_enabled
self.config_format = config_format
# bgp_config is equivalent to config.BgpConfigSet structure
@@ -378,6 +380,8 @@ class GoBGPContainer(BGPContainer):
if self.zebra and self.zapi_version == 2:
config['global']['use-multiple-paths'] = {'config': {'enabled': True}}
+ else:
+ config['global']['use-multiple-paths'] = {'config': {'enabled': self.zebra_multipath_enabled}}
for peer, info in self.peers.items():
afi_safi_list = []