Use oslo.log for heat_integrationtests
Later the integration jobs can be tuned to have their own
logging settings.
This change also raises _log_console_output to info, so it is displayed
by default.
Change-Id: Ifcaa6faf76c655e0c8cfd7d76775b80de70062c4
diff --git a/common/clients.py b/common/clients.py
index 5a4dd5a..1ba3a21 100644
--- a/common/clients.py
+++ b/common/clients.py
@@ -20,10 +20,6 @@
import novaclient.client
import swiftclient
-import logging
-
-LOG = logging.getLogger(__name__)
-
class ClientManager(object):
"""
diff --git a/common/remote_client.py b/common/remote_client.py
index 5365ceb..2955418 100644
--- a/common/remote_client.py
+++ b/common/remote_client.py
@@ -11,12 +11,12 @@
# under the License.
import cStringIO
-import logging
import re
import select
import socket
import time
+from oslo_log import log as logging
import paramiko
import six
diff --git a/common/test.py b/common/test.py
index 0ffa2b0..26abe6b 100644
--- a/common/test.py
+++ b/common/test.py
@@ -10,7 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
import os
import random
import re
@@ -19,6 +18,7 @@
import fixtures
from heatclient import exc as heat_exceptions
+from oslo_log import log as logging
from oslo_utils import timeutils
import six
import testscenarios
@@ -111,8 +111,8 @@
if not servers:
servers = self.compute_client.servers.list()
for server in servers:
- LOG.debug('Console output for %s', server.id)
- LOG.debug(server.get_console_output())
+ LOG.info('Console output for %s', server.id)
+ LOG.info(server.get_console_output())
def _load_template(self, base_file, file_name, sub_dir=None):
sub_dir = sub_dir or ''
diff --git a/functional/test_autoscaling.py b/functional/test_autoscaling.py
index 60fa66f..d640915 100644
--- a/functional/test_autoscaling.py
+++ b/functional/test_autoscaling.py
@@ -12,8 +12,8 @@
import copy
import json
-import logging
+from oslo_log import log as logging
from testtools import matchers
from heat_integrationtests.common import test
diff --git a/functional/test_aws_stack.py b/functional/test_aws_stack.py
index 2e2cd9d..5aabe95 100644
--- a/functional/test_aws_stack.py
+++ b/functional/test_aws_stack.py
@@ -12,10 +12,10 @@
import hashlib
import json
-import logging
import random
import urlparse
+from oslo_log import log as logging
from swiftclient import utils as swiftclient_utils
import yaml
diff --git a/functional/test_instance_group.py b/functional/test_instance_group.py
index 3863df6..5c88bed 100644
--- a/functional/test_instance_group.py
+++ b/functional/test_instance_group.py
@@ -12,16 +12,12 @@
import copy
import json
-import logging
from testtools import matchers
from heat_integrationtests.common import test
-LOG = logging.getLogger(__name__)
-
-
class InstanceGroupTest(test.HeatIntegrationTest):
template = '''
diff --git a/functional/test_remote_stack.py b/functional/test_remote_stack.py
index 1b6f961..7579eb0 100644
--- a/functional/test_remote_stack.py
+++ b/functional/test_remote_stack.py
@@ -10,15 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
from heatclient import exc
import six
from heat_integrationtests.common import test
-LOG = logging.getLogger(__name__)
-
class RemoteStackTest(test.HeatIntegrationTest):
template = '''
diff --git a/functional/test_template_resource.py b/functional/test_template_resource.py
index 85f5799..5893679 100644
--- a/functional/test_template_resource.py
+++ b/functional/test_template_resource.py
@@ -11,16 +11,12 @@
# under the License.
import json
-import logging
import yaml
from heat_integrationtests.common import test
-LOG = logging.getLogger(__name__)
-
-
class TemplateResourceTest(test.HeatIntegrationTest):
"""Prove that we can use the registry in a nested provider."""
diff --git a/functional/test_update.py b/functional/test_update.py
index ea436ad..3904311 100644
--- a/functional/test_update.py
+++ b/functional/test_update.py
@@ -10,14 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
from heat_integrationtests.common import test
-LOG = logging.getLogger(__name__)
-
-
class UpdateStackTest(test.HeatIntegrationTest):
template = '''
diff --git a/functional/test_validation.py b/functional/test_validation.py
index 2d9669d..2df6356 100644
--- a/functional/test_validation.py
+++ b/functional/test_validation.py
@@ -10,14 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
from heat_integrationtests.common import test
-LOG = logging.getLogger(__name__)
-
-
class StackValidationTest(test.HeatIntegrationTest):
def setUp(self):
diff --git a/scenario/test_server_cfn_init.py b/scenario/test_server_cfn_init.py
index cf74bd8..a49606c 100644
--- a/scenario/test_server_cfn_init.py
+++ b/scenario/test_server_cfn_init.py
@@ -11,13 +11,10 @@
# under the License.
import json
-import logging
from heat_integrationtests.common import exceptions
from heat_integrationtests.scenario import scenario_base
-LOG = logging.getLogger(__name__)
-
class CfnInitIntegrationTest(scenario_base.ScenarioTestsBase):
"""
diff --git a/scenario/test_volumes.py b/scenario/test_volumes.py
index 1901b9c..9b12a9c 100644
--- a/scenario/test_volumes.py
+++ b/scenario/test_volumes.py
@@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
from cinderclient import exceptions as cinder_exceptions
+from oslo_log import log as logging
import six
from testtools import testcase