summaryrefslogtreecommitdiffstats
path: root/sdnvpn/lib/gather_logs.py
diff options
context:
space:
mode:
Diffstat (limited to 'sdnvpn/lib/gather_logs.py')
-rw-r--r--sdnvpn/lib/gather_logs.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/sdnvpn/lib/gather_logs.py b/sdnvpn/lib/gather_logs.py
index ed95fac..cf37acf 100644
--- a/sdnvpn/lib/gather_logs.py
+++ b/sdnvpn/lib/gather_logs.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+#
# Copyright (c) 2017 All rights reserved
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -19,7 +21,7 @@ import inspect
import sdnvpn.lib.utils as test_utils
import functest.utils.functest_utils as ft_utils
-from functest.utils.constants import CONST
+from functest.utils import config
LIB_PATH = os.path.dirname(
os.path.abspath(inspect.getfile(inspect.currentframe())))
@@ -44,10 +46,9 @@ def gather_logs(name):
'tar -xzvf /tmp/log_output-%s.tar.gz --strip-components=1'
% node.get_dict()['name'])
- ft_utils.execute_command_raise('cd %s;tar czvf sdnvpn-logs-%s.tar.gz'
- ' /tmp/sdnvpn-logs/'
- % (CONST.__getattribute__('dir_results'),
- name))
+ ft_utils.execute_command_raise(
+ 'cd %s;tar czvf sdnvpn-logs-%s.tar.gz /tmp/sdnvpn-logs/' % (
+ getattr(config.CONF, 'dir_results'), name))
if __name__ == '__main__':