summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/lib/gobgp.py
diff options
context:
space:
mode:
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')