summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/lib/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/scenario_test/lib/base.py')
-rw-r--r--test/scenario_test/lib/base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/scenario_test/lib/base.py b/test/scenario_test/lib/base.py
index 5767fd17..d8ab74d5 100644
--- a/test/scenario_test/lib/base.py
+++ b/test/scenario_test/lib/base.py
@@ -211,6 +211,7 @@ class BGPContainer(Container):
self.config_dir = '/'.join((TEST_BASE_DIR, TEST_PREFIX, name))
local('if [ -e {0} ]; then rm -r {0}; fi'.format(self.config_dir))
local('mkdir -p {0}'.format(self.config_dir))
+ local('chmod 777 {0}'.format(self.config_dir))
self.asn = asn
self.router_id = router_id
self.peers = {}
@@ -266,6 +267,9 @@ class BGPContainer(Container):
def enable_peer(self, peer):
raise Exception('implement enable_peer() method')
+ def log(self):
+ return local('cat {0}/*.log'.format(self.config_dir), capture=True)
+
def add_route(self, route, rf='ipv4', attribute=None, aspath=None,
community=None, med=None, extendedcommunity=None,
matchs=None, thens=None):