summaryrefslogtreecommitdiffhomepage
path: root/test/lib/base.py
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-09-17 20:01:22 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-07-05 04:57:27 +0900
commitf48c4deaa19ca8b36d87a0d71776bc29b7e17ebe (patch)
tree169474793f5afba6db03d9743a3ab747b6a0d7a7 /test/lib/base.py
parent87f0b0bdc52945ae98ef6d44b7f118216bde95ca (diff)
test: add addpath_test.py
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/lib/base.py')
-rw-r--r--test/lib/base.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/lib/base.py b/test/lib/base.py
index 0421e9d7..6306ccf6 100644
--- a/test/lib/base.py
+++ b/test/lib/base.py
@@ -311,7 +311,7 @@ class BGPContainer(Container):
flowspec=False, bridge='', reload_config=True, as2=False,
graceful_restart=None, local_as=None, prefix_limit=None,
v6=False, llgr=None, vrf='', interface='', allow_as_in=0,
- remove_private_as=None, replace_peer_as=False):
+ remove_private_as=None, replace_peer_as=False, addpath=False):
neigh_addr = ''
local_addr = ''
it = itertools.product(self.ip_addrs, peer.ip_addrs)
@@ -355,7 +355,8 @@ class BGPContainer(Container):
'vrf': vrf,
'allow_as_in': allow_as_in,
'remove_private_as': remove_private_as,
- 'replace_peer_as': replace_peer_as}
+ 'replace_peer_as': replace_peer_as,
+ 'addpath': addpath}
if self.is_running and reload_config:
self.create_config()
self.reload_config()
@@ -378,8 +379,10 @@ class BGPContainer(Container):
def add_route(self, route, rf='ipv4', attribute=None, aspath=None,
community=None, med=None, extendedcommunity=None,
nexthop=None, matchs=None, thens=None,
- local_pref=None, reload_config=True):
- self.routes[route] = {'prefix': route,
+ local_pref=None, identifier=None, reload_config=True):
+ if route not in self.routes:
+ self.routes[route] = []
+ self.routes[route].append({'prefix': route,
'rf': rf,
'attr': attribute,
'next-hop': nexthop,
@@ -388,8 +391,9 @@ class BGPContainer(Container):
'med': med,
'local-pref': local_pref,
'extended-community': extendedcommunity,
+ 'identifier': identifier,
'matchs': matchs,
- 'thens': thens}
+ 'thens': thens})
if self.is_running and reload_config:
self.create_config()
self.reload_config()