summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Paraskevopoulos <geopar@intracom-telecom.com>2017-03-18 11:46:56 +0200
committerGeorge Paraskevopoulos <geopar@intracom-telecom.com>2017-03-18 12:00:17 +0200
commitcb311aad19c732fa006b50795ab66687e01b95a6 (patch)
tree3c5e5b2814a8b8f12cc8f72b234cdd99a8a39f20
parent268fc4edfd7560bcf5b5e1248df05face402074a (diff)
Change from functest logger to python logging
Change-Id: Ie7b2a63c301819a79768d1b286ee00693cd1129b Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
-rw-r--r--sfc/lib/cleanup.py5
-rw-r--r--sfc/lib/topology_shuffler.py6
-rw-r--r--sfc/lib/utils.py5
-rw-r--r--sfc/tests/functest/run_tests.py5
-rw-r--r--sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py5
-rw-r--r--sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py5
6 files changed, 19 insertions, 12 deletions
diff --git a/sfc/lib/cleanup.py b/sfc/lib/cleanup.py
index e6ae725a..ba13260a 100644
--- a/sfc/lib/cleanup.py
+++ b/sfc/lib/cleanup.py
@@ -1,12 +1,13 @@
import sys
-import functest.utils.functest_logger as ft_logger
+import logging as ft_logger
+# import functest.utils.functest_logger as ft_logger
import functest.utils.openstack_utils as os_utils
import functest.utils.openstack_tacker as os_tacker
import sfc.lib.utils as utils
-logger = ft_logger.Logger(__name__).getLogger()
+logger = ft_logger.getLogger(__name__)
def delete_odl_resources(odl_ip, odl_port, resource):
diff --git a/sfc/lib/topology_shuffler.py b/sfc/lib/topology_shuffler.py
index 75a56392..aea8a75a 100644
--- a/sfc/lib/topology_shuffler.py
+++ b/sfc/lib/topology_shuffler.py
@@ -1,10 +1,12 @@
import datetime
import random
import functest.utils.openstack_utils as os_utils
-import functest.utils.functest_logger as ft_logger
+import logging as ft_logger
+# import functest.utils.functest_logger as ft_logger
-logger = ft_logger.Logger(__name__).getLogger()
+
+logger = ft_logger.getLogger(__name__)
# The possible topologies we are testing
TOPOLOGIES = [
diff --git a/sfc/lib/utils.py b/sfc/lib/utils.py
index c303f240..40e1a22b 100644
--- a/sfc/lib/utils.py
+++ b/sfc/lib/utils.py
@@ -16,13 +16,14 @@ import time
import xmltodict
import yaml
-import functest.utils.functest_logger as ft_logger
+import logging as ft_logger
+# import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
import functest.utils.openstack_utils as os_utils
import functest.utils.openstack_tacker as os_tacker
-logger = ft_logger.Logger(__name__).getLogger()
+logger = ft_logger.getLogger(__name__)
SSH_OPTIONS = '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
FUNCTEST_RESULTS_DIR = os.path.join("home", "opnfv",
"functest", "results", "odl-sfc")
diff --git a/sfc/tests/functest/run_tests.py b/sfc/tests/functest/run_tests.py
index 771f2c62..6ad6bb41 100644
--- a/sfc/tests/functest/run_tests.py
+++ b/sfc/tests/functest/run_tests.py
@@ -15,7 +15,8 @@ import sys
import time
import yaml
-import functest.utils.functest_logger as ft_logger
+import logging as ft_logger
+# import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
import functest.utils.openstack_utils as os_utils
import opnfv.utils.ovs_logger as ovs_log
@@ -31,7 +32,7 @@ parser.add_argument("-r", "--report",
action="store_true")
args = parser.parse_args()
-logger = ft_logger.Logger(__name__).getLogger()
+logger = ft_logger.getLogger('SFC_run_tests')
COMMON_CONFIG = sfc_config.CommonConfig()
diff --git a/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py b/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
index 77c3a4e5..7e68ba25 100644
--- a/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
+++ b/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
@@ -12,7 +12,8 @@ import os
import sys
import threading
-import functest.utils.functest_logger as ft_logger
+import logging as ft_logger
+# import functest.utils.functest_logger as ft_logger
import functest.utils.openstack_tacker as os_tacker
import functest.utils.openstack_utils as os_utils
import opnfv.utils.ovs_logger as ovs_log
@@ -24,7 +25,7 @@ from opnfv.deployment.factory import Factory as DeploymentFactory
import sfc.lib.topology_shuffler as topo_shuffler
""" logging configuration """
-logger = ft_logger.Logger(__name__).getLogger()
+logger = ft_logger.getLogger('SFC_one_chain_two_sfs')
CLIENT = "client"
SERVER = "server"
diff --git a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
index 9f301281..68ac1e24 100644
--- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
+++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
@@ -12,7 +12,8 @@ import os
import sys
import threading
-import functest.utils.functest_logger as ft_logger
+import logging as ft_logger
+# import functest.utils.functest_logger as ft_logger
import functest.utils.openstack_tacker as os_tacker
import functest.utils.openstack_utils as os_utils
import opnfv.utils.ovs_logger as ovs_log
@@ -24,7 +25,7 @@ from opnfv.deployment.factory import Factory as DeploymentFactory
import sfc.lib.topology_shuffler as topo_shuffler
-logger = ft_logger.Logger(__name__).getLogger()
+logger = ft_logger.getLogger('SFC_two_chains')
CLIENT = "client"
SERVER = "server"