Migrate to oslo.log
It's mostly a matter of changing imports to a new location.
Non-obvious changes needed:
* pass overwrite= argument to oslo_context since oslo.log reads context
from its thread local store and not local.store from incubator
* don't store context at local.store now that there is no code that
would consume it
* LOG.deprecated() -> versionutils.report_deprecated_feature()
* dropped LOG.audit check from hacking rule since now the method does
not exist
* WritableLogger is now located in oslo_log.loggers
Dropped log module from the tree. Also dropped local module that is now
of no use (and obsolete, as per oslo team).
Added versionutils back to openstack-common.conf since now we use the
module directly from neutron code and not just as a dependency of some
other oslo-incubator module.
Note: tempest tests are expected to be broken now, so instead of fixing
all the oslo.log related issues for the subtree in this patch, I only
added TODOs with directions for later fix.
Closes-Bug: #1425013
Change-Id: I310e059a815377579de6bb2aa204de168e72571e
diff --git a/neutron/tests/tempest/common/accounts.py b/neutron/tests/tempest/common/accounts.py
index 2cb8cec..e10817b 100644
--- a/neutron/tests/tempest/common/accounts.py
+++ b/neutron/tests/tempest/common/accounts.py
@@ -15,13 +15,13 @@
import hashlib
import os
+from oslo_concurrency import lockutils
+from oslo_log import log as logging
import yaml
from neutron.tests.tempest.common import cred_provider
from neutron.tests.tempest import config
from neutron.tests.tempest import exceptions
-from oslo_concurrency import lockutils
-from neutron.openstack.common import log as logging
CONF = config.CONF
LOG = logging.getLogger(__name__)
diff --git a/neutron/tests/tempest/common/commands.py b/neutron/tests/tempest/common/commands.py
index f132e86..392c9d0 100644
--- a/neutron/tests/tempest/common/commands.py
+++ b/neutron/tests/tempest/common/commands.py
@@ -15,7 +15,7 @@
import shlex
import subprocess
-from neutron.openstack.common import log as logging
+from oslo_log import log as logging
LOG = logging.getLogger(__name__)
diff --git a/neutron/tests/tempest/common/cred_provider.py b/neutron/tests/tempest/common/cred_provider.py
index a999cfc..fda955c 100644
--- a/neutron/tests/tempest/common/cred_provider.py
+++ b/neutron/tests/tempest/common/cred_provider.py
@@ -14,12 +14,12 @@
import abc
+from oslo_log import log as logging
import six
from neutron.tests.tempest import auth
from neutron.tests.tempest import config
from neutron.tests.tempest import exceptions
-from neutron.openstack.common import log as logging
CONF = config.CONF
LOG = logging.getLogger(__name__)
diff --git a/neutron/tests/tempest/common/generator/base_generator.py b/neutron/tests/tempest/common/generator/base_generator.py
index 2771823..d3cae26 100644
--- a/neutron/tests/tempest/common/generator/base_generator.py
+++ b/neutron/tests/tempest/common/generator/base_generator.py
@@ -17,8 +17,7 @@
import functools
import jsonschema
-
-from neutron.openstack.common import log as logging
+from oslo_log import log as logging
LOG = logging.getLogger(__name__)
diff --git a/neutron/tests/tempest/common/generator/negative_generator.py b/neutron/tests/tempest/common/generator/negative_generator.py
index 704d9fb..ba8884f 100644
--- a/neutron/tests/tempest/common/generator/negative_generator.py
+++ b/neutron/tests/tempest/common/generator/negative_generator.py
@@ -15,9 +15,10 @@
import copy
+from oslo_log import log as logging
+
import neutron.tests.tempest.common.generator.base_generator as base
import neutron.tests.tempest.common.generator.valid_generator as valid
-from neutron.openstack.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/neutron/tests/tempest/common/generator/valid_generator.py b/neutron/tests/tempest/common/generator/valid_generator.py
index 4d1906e..8ff9259 100644
--- a/neutron/tests/tempest/common/generator/valid_generator.py
+++ b/neutron/tests/tempest/common/generator/valid_generator.py
@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
import neutron.tests.tempest.common.generator.base_generator as base
-from neutron.openstack.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/neutron/tests/tempest/common/glance_http.py b/neutron/tests/tempest/common/glance_http.py
index c802472..66fc2ab 100644
--- a/neutron/tests/tempest/common/glance_http.py
+++ b/neutron/tests/tempest/common/glance_http.py
@@ -28,11 +28,11 @@
import OpenSSL
+from oslo_log import log as logging
from six import moves
from tempest_lib import exceptions as lib_exc
from neutron.tests.tempest import exceptions as exc
-from neutron.openstack.common import log as logging
LOG = logging.getLogger(__name__)
USER_AGENT = 'tempest'
diff --git a/neutron/tests/tempest/common/isolated_creds.py b/neutron/tests/tempest/common/isolated_creds.py
index 41d7390..e4b0b08 100644
--- a/neutron/tests/tempest/common/isolated_creds.py
+++ b/neutron/tests/tempest/common/isolated_creds.py
@@ -13,6 +13,7 @@
# under the License.
import netaddr
+from oslo_log import log as logging
from tempest_lib import exceptions as lib_exc
from neutron.tests.api.contrib import clients
@@ -20,7 +21,6 @@
from neutron.tests.tempest.common.utils import data_utils
from neutron.tests.tempest import config
from neutron.tests.tempest import exceptions
-from neutron.openstack.common import log as logging
CONF = config.CONF
LOG = logging.getLogger(__name__)
diff --git a/neutron/tests/tempest/common/ssh.py b/neutron/tests/tempest/common/ssh.py
index de1ad88..00febc6 100644
--- a/neutron/tests/tempest/common/ssh.py
+++ b/neutron/tests/tempest/common/ssh.py
@@ -20,10 +20,10 @@
import time
import warnings
+from oslo_log import log as logging
import six
from neutron.tests.tempest import exceptions
-from neutron.openstack.common import log as logging
with warnings.catch_warnings():
diff --git a/neutron/tests/tempest/common/utils/misc.py b/neutron/tests/tempest/common/utils/misc.py
index cc0004d..b97dd86 100644
--- a/neutron/tests/tempest/common/utils/misc.py
+++ b/neutron/tests/tempest/common/utils/misc.py
@@ -16,7 +16,7 @@
import inspect
import re
-from neutron.openstack.common import log as logging
+from oslo_log import log as logging
LOG = logging.getLogger(__name__)
diff --git a/neutron/tests/tempest/common/waiters.py b/neutron/tests/tempest/common/waiters.py
index b54ef73..049d5ca 100644
--- a/neutron/tests/tempest/common/waiters.py
+++ b/neutron/tests/tempest/common/waiters.py
@@ -13,10 +13,11 @@
import time
+from oslo_log import log as logging
+
from neutron.tests.tempest.common.utils import misc as misc_utils
from neutron.tests.tempest import config
from neutron.tests.tempest import exceptions
-from neutron.openstack.common import log as logging
CONF = config.CONF
LOG = logging.getLogger(__name__)