summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/scenario_test/lib')
-rw-r--r--test/scenario_test/lib/base.py4
-rw-r--r--test/scenario_test/lib/quagga.py2
2 files changed, 5 insertions, 1 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):
diff --git a/test/scenario_test/lib/quagga.py b/test/scenario_test/lib/quagga.py
index 8f2ba9a2..8d3e0612 100644
--- a/test/scenario_test/lib/quagga.py
+++ b/test/scenario_test/lib/quagga.py
@@ -198,7 +198,7 @@ class QuaggaBGPContainer(BGPContainer):
c << 'debug bgp fsm'
c << 'debug bgp updates'
c << 'debug bgp events'
- c << 'log file /tmp/bgpd.log'.format(self.SHARED_VOLUME)
+ c << 'log file {0}/bgpd.log'.format(self.SHARED_VOLUME)
with open('{0}/bgpd.conf'.format(self.config_dir), 'w') as f:
print colors.yellow('[{0}\'s new config]'.format(self.name))