summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/lib/gobgp.py
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-08-30 21:36:41 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-31 22:48:50 +0900
commit375e1d65b2c90c3d287b83633ec13efde9aa62a2 (patch)
tree80980c59f300924005b674d5e0beacae85c7acab /test/scenario_test/lib/gobgp.py
parent955409c37ce17daf346e30aa1d1e2d40767ebb43 (diff)
server: support route reflector behavior
scenario_test is also added Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/lib/gobgp.py')
-rw-r--r--test/scenario_test/lib/gobgp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/scenario_test/lib/gobgp.py b/test/scenario_test/lib/gobgp.py
index aed7f16d..04b89ffe 100644
--- a/test/scenario_test/lib/gobgp.py
+++ b/test/scenario_test/lib/gobgp.py
@@ -186,9 +186,11 @@ class GoBGPContainer(BGPContainer):
n['RouteServer'] = {'RouteServerConfig': {'RouteServerClient': True}}
if info['is_rr_client']:
- clusterId = info['cluster_id']
- n['RouteReflector'] = {'RouteReflectorClient': True,
- 'RouteReflectorClusterId': clusterId}
+ clusterId = self.router_id
+ if 'cluster_id' in info and info['cluster_id'] is not None:
+ clusterId = info['cluster_id']
+ n['RouteReflector'] = {'RouteReflectorConfig' : {'RouteReflectorClient': True,
+ 'RouteReflectorClusterId': clusterId}}
f = lambda typ: [p for p in info['policies'].itervalues() if p['type'] == typ]
import_policies = f('import')