diff --git a/trove/common/context.py b/trove/common/context.py index 8f886de025..f94bed0e35 100644 --- a/trove/common/context.py +++ b/trove/common/context.py @@ -21,13 +21,10 @@ context or provide additional information in their specific WSGI pipeline. """ from oslo_context import context -from oslo_log import log as logging from trove.common import local from trove.common.serializable_notification import SerializableNotification -LOG = logging.getLogger(__name__) - class TroveContext(context.RequestContext): """ diff --git a/trove/common/single_tenant_remote.py b/trove/common/single_tenant_remote.py index 4074c6012c..ede2930604 100644 --- a/trove/common/single_tenant_remote.py +++ b/trove/common/single_tenant_remote.py @@ -16,7 +16,6 @@ from trove.common import cfg from trove.common.remote import normalize_url -import trove.openstack.common.log as logging from cinderclient.v2 import client as CinderClient from neutronclient.v2_0 import client as NeutronClient @@ -51,7 +50,6 @@ remote_neutron_client = \ """ PROXY_AUTH_URL = CONF.trove_auth_url -LOG = logging.getLogger(__name__) def nova_client_trove_admin(context=None): diff --git a/trove/conductor/models.py b/trove/conductor/models.py index 3dcfd2f160..a973855d5f 100644 --- a/trove/conductor/models.py +++ b/trove/conductor/models.py @@ -12,12 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from oslo_log import log as logging - from trove.db import get_db_api -LOG = logging.getLogger(__name__) - def persisted_models(): return {'conductor_lastseen': LastSeen} diff --git a/trove/configuration/views.py b/trove/configuration/views.py index 6bbf9231b4..336157ba32 100644 --- a/trove/configuration/views.py +++ b/trove/configuration/views.py @@ -13,10 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - -LOG = logging.getLogger(__name__) - class ConfigurationView(object): diff --git a/trove/db/sqlalchemy/migrate_repo/versions/020_configurations.py b/trove/db/sqlalchemy/migrate_repo/versions/020_configurations.py index e5c91cce62..82e9b6a059 100644 --- a/trove/db/sqlalchemy/migrate_repo/versions/020_configurations.py +++ b/trove/db/sqlalchemy/migrate_repo/versions/020_configurations.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from sqlalchemy import ForeignKey from sqlalchemy.schema import Column from sqlalchemy.schema import MetaData @@ -27,8 +26,6 @@ from trove.db.sqlalchemy.migrate_repo.schema import Table from trove.db.sqlalchemy import utils as db_utils -logger = logging.getLogger('trove.db.sqlalchemy.migrate_repo.schema') - meta = MetaData() configurations = Table( diff --git a/trove/db/sqlalchemy/migrate_repo/versions/032_clusters.py b/trove/db/sqlalchemy/migrate_repo/versions/032_clusters.py index ca7a9e7614..1516906b89 100644 --- a/trove/db/sqlalchemy/migrate_repo/versions/032_clusters.py +++ b/trove/db/sqlalchemy/migrate_repo/versions/032_clusters.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from sqlalchemy import ForeignKey from sqlalchemy.schema import Column from sqlalchemy.schema import Index @@ -29,8 +28,6 @@ from trove.db.sqlalchemy.migrate_repo.schema import Table from trove.db.sqlalchemy import utils as db_utils -logger = logging.getLogger('trove.db.sqlalchemy.migrate_repo.schema') - meta = MetaData() clusters = Table( diff --git a/trove/extensions/mongodb/service.py b/trove/extensions/mongodb/service.py index 8900c95366..0025d337ba 100644 --- a/trove/extensions/mongodb/service.py +++ b/trove/extensions/mongodb/service.py @@ -13,14 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from trove.common import cfg from trove.common import exception from trove.extensions.common.service import ClusterRootController from trove.instance.models import DBInstance -LOG = logging.getLogger(__name__) CONF = cfg.CONF MANAGER = CONF.datastore_manager if CONF.datastore_manager else 'mongodb' diff --git a/trove/extensions/mysql/models.py b/trove/extensions/mysql/models.py index 33c68b5bbe..c413073d4b 100644 --- a/trove/extensions/mysql/models.py +++ b/trove/extensions/mysql/models.py @@ -17,8 +17,6 @@ Model classes that extend the instances functionality for MySQL instances. """ -from oslo_log import log as logging - from trove.common import cfg from trove.common import exception from trove.common.notification import StartNotification @@ -29,7 +27,6 @@ from trove.extensions.common.models import RootHistory from trove.guestagent.db import models as guest_models CONF = cfg.CONF -LOG = logging.getLogger(__name__) def persisted_models(): diff --git a/trove/extensions/pxc/service.py b/trove/extensions/pxc/service.py index 8d0ca0ad93..aba64edb12 100644 --- a/trove/extensions/pxc/service.py +++ b/trove/extensions/pxc/service.py @@ -13,13 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from trove.common import cfg from trove.common import exception from trove.extensions.common.service import ClusterRootController -LOG = logging.getLogger(__name__) CONF = cfg.CONF MANAGER = CONF.datastore_manager if CONF.datastore_manager else 'pxc' diff --git a/trove/extensions/routes/account.py b/trove/extensions/routes/account.py index 19d21114e1..9185226499 100644 --- a/trove/extensions/routes/account.py +++ b/trove/extensions/routes/account.py @@ -13,15 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from trove.common import extensions from trove.extensions.account import service -LOG = logging.getLogger(__name__) - - class Account(extensions.ExtensionDescriptor): def get_name(self): diff --git a/trove/extensions/routes/mgmt.py b/trove/extensions/routes/mgmt.py index 50cdcff999..cd5b4f4b49 100644 --- a/trove/extensions/routes/mgmt.py +++ b/trove/extensions/routes/mgmt.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from trove.common import extensions from trove.extensions.mgmt.clusters.service import MgmtClusterController from trove.extensions.mgmt.configuration import service as conf_service @@ -26,8 +24,6 @@ from trove.extensions.mgmt.quota.service import QuotaController from trove.extensions.mgmt.upgrade.service import UpgradeController from trove.extensions.mgmt.volume.service import StorageController -LOG = logging.getLogger(__name__) - class Mgmt(extensions.ExtensionDescriptor): diff --git a/trove/extensions/routes/mysql.py b/trove/extensions/routes/mysql.py index c0cb7ba9e6..a422681735 100644 --- a/trove/extensions/routes/mysql.py +++ b/trove/extensions/routes/mysql.py @@ -13,14 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from trove.common import extensions from trove.extensions.common import service as common_service from trove.extensions.mysql import service as mysql_service -LOG = logging.getLogger(__name__) - class Mysql(extensions.ExtensionDescriptor): diff --git a/trove/extensions/routes/security_group.py b/trove/extensions/routes/security_group.py index c485a2ec0f..1210bff76d 100644 --- a/trove/extensions/routes/security_group.py +++ b/trove/extensions/routes/security_group.py @@ -14,15 +14,11 @@ # under the License. # - -from oslo_log import log as logging - from trove.common import cfg from trove.common import extensions from trove.extensions.security_group import service -LOG = logging.getLogger(__name__) CONF = cfg.CONF diff --git a/trove/extensions/security_group/views.py b/trove/extensions/security_group/views.py index f779c10133..b578afb9e5 100644 --- a/trove/extensions/security_group/views.py +++ b/trove/extensions/security_group/views.py @@ -16,10 +16,6 @@ import os -from oslo_log import log as logging - -LOG = logging.getLogger(__name__) - def _base_url(req): return req.application_url diff --git a/trove/extensions/vertica/service.py b/trove/extensions/vertica/service.py index 1f05ae365e..35a81c8f28 100644 --- a/trove/extensions/vertica/service.py +++ b/trove/extensions/vertica/service.py @@ -13,14 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from trove.common import cfg from trove.common import exception from trove.extensions.common.service import ClusterRootController from trove.instance.models import DBInstance -LOG = logging.getLogger(__name__) CONF = cfg.CONF MANAGER = CONF.datastore_manager if CONF.datastore_manager else 'vertica' diff --git a/trove/guestagent/datastore/experimental/postgresql/pgutil.py b/trove/guestagent/datastore/experimental/postgresql/pgutil.py index 5ba364a443..b53cacdb15 100644 --- a/trove/guestagent/datastore/experimental/postgresql/pgutil.py +++ b/trove/guestagent/datastore/experimental/postgresql/pgutil.py @@ -13,13 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging import psycopg2 from trove.common import exception -LOG = logging.getLogger(__name__) - PG_ADMIN = 'os_admin' diff --git a/trove/guestagent/datastore/experimental/postgresql/service/process.py b/trove/guestagent/datastore/experimental/postgresql/service/process.py index 1164f77e78..5a05e55b55 100644 --- a/trove/guestagent/datastore/experimental/postgresql/service/process.py +++ b/trove/guestagent/datastore/experimental/postgresql/service/process.py @@ -15,8 +15,6 @@ import os -from oslo_log import log as logging - from trove.common import cfg from trove.guestagent.common import operating_system from trove.guestagent.datastore.experimental.postgresql.service.status import ( @@ -24,7 +22,6 @@ from trove.guestagent.datastore.experimental.postgresql.service.status import ( from trove.guestagent import guest_log -LOG = logging.getLogger(__name__) CONF = cfg.CONF diff --git a/trove/guestagent/datastore/experimental/postgresql/service/root.py b/trove/guestagent/datastore/experimental/postgresql/service/root.py index be96642254..20d507309c 100644 --- a/trove/guestagent/datastore/experimental/postgresql/service/root.py +++ b/trove/guestagent/datastore/experimental/postgresql/service/root.py @@ -13,15 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from trove.common import cfg from trove.common import utils from trove.guestagent.datastore.experimental.postgresql import pgutil from trove.guestagent.datastore.experimental.postgresql.service.users import ( PgSqlUsers) -LOG = logging.getLogger(__name__) CONF = cfg.CONF diff --git a/trove/guestagent/module/drivers/module_driver.py b/trove/guestagent/module/drivers/module_driver.py index a912b2a255..9a1ad58d67 100644 --- a/trove/guestagent/module/drivers/module_driver.py +++ b/trove/guestagent/module/drivers/module_driver.py @@ -17,12 +17,9 @@ import abc import six -from oslo_log import log as logging - from trove.common import cfg -LOG = logging.getLogger(__name__) CONF = cfg.CONF diff --git a/trove/guestagent/strategies/backup/experimental/postgresql_impl.py b/trove/guestagent/strategies/backup/experimental/postgresql_impl.py index ae7049307c..b859862e62 100644 --- a/trove/guestagent/strategies/backup/experimental/postgresql_impl.py +++ b/trove/guestagent/strategies/backup/experimental/postgresql_impl.py @@ -13,12 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from trove.guestagent.strategies.backup import base -LOG = logging.getLogger(__name__) - class PgDump(base.BackupRunner): """Implementation of Backup Strategy for pg_dump.""" diff --git a/trove/guestagent/strategies/restore/experimental/mongo_impl.py b/trove/guestagent/strategies/restore/experimental/mongo_impl.py index 2a1e87bc2a..353e7c4fae 100644 --- a/trove/guestagent/strategies/restore/experimental/mongo_impl.py +++ b/trove/guestagent/strategies/restore/experimental/mongo_impl.py @@ -15,7 +15,6 @@ # under the License. # -from oslo_log import log as logging from oslo_utils import netutils from trove.common import cfg @@ -26,7 +25,6 @@ from trove.guestagent.datastore.experimental.mongodb import ( from trove.guestagent.strategies.restore import base CONF = cfg.CONF -LOG = logging.getLogger(__name__) IP = netutils.get_my_ipv4() LARGE_TIMEOUT = 1200 MONGODB_DBPATH = CONF.mongodb.mount_point diff --git a/trove/module/views.py b/trove/module/views.py index b62dcd17e2..63c4a5fae7 100644 --- a/trove/module/views.py +++ b/trove/module/views.py @@ -14,13 +14,9 @@ # under the License. # -from oslo_log import log as logging - from trove.datastore import models as datastore_models from trove.module import models -LOG = logging.getLogger(__name__) - class ModuleView(object): diff --git a/trove/quota/models.py b/trove/quota/models.py index d6bfacc90e..64e225c043 100644 --- a/trove/quota/models.py +++ b/trove/quota/models.py @@ -13,14 +13,10 @@ # under the License. -from oslo_log import log as logging - from trove.common import cfg from trove.common import utils from trove.db import models as dbmodels -LOG = logging.getLogger(__name__) - CONF = cfg.CONF diff --git a/trove/taskmanager/service.py b/trove/taskmanager/service.py index 36cdb3923a..363bb7e84c 100644 --- a/trove/taskmanager/service.py +++ b/trove/taskmanager/service.py @@ -13,11 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - - -LOG = logging.getLogger(__name__) - class TaskService(object): """Task Manager interface.""" diff --git a/trove/tests/fakes/common.py b/trove/tests/fakes/common.py index 640b50c5ea..46a8bf32ca 100644 --- a/trove/tests/fakes/common.py +++ b/trove/tests/fakes/common.py @@ -16,13 +16,11 @@ """Common code to help in faking the models.""" from novaclient import exceptions as nova_exceptions -from oslo_log import log as logging from trove.common import cfg CONF = cfg.CONF -LOG = logging.getLogger(__name__) def authorize(context):