From 9b8bc393e9fd01c769fdd6f696029a5cde6ff91c Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Thu, 26 Jun 2014 16:59:11 +0900 Subject: [PATCH] rename neutron/openstack/ to tacker Change-Id: I9c9128ae4f41672b56694f71c00728c35998ea0a --- {neutron => tacker}/openstack/__init__.py | 0 .../openstack/common/__init__.py | 0 .../openstack/common/cache/__init__.py | 0 .../common/cache/_backends/__init__.py | 0 .../openstack/common/cache/_backends/memory.py | 6 +++--- .../openstack/common/cache/backends.py | 0 .../openstack/common/cache/cache.py | 2 +- .../openstack/common/context.py | 2 +- .../openstack/common/db/__init__.py | 0 {neutron => tacker}/openstack/common/db/api.py | 6 +++--- .../openstack/common/db/exception.py | 2 +- .../openstack/common/db/options.py | 2 +- .../openstack/common/db/sqlalchemy/__init__.py | 0 .../openstack/common/db/sqlalchemy/models.py | 2 +- .../common/db/sqlalchemy/provision.py | 2 +- .../openstack/common/db/sqlalchemy/session.py | 18 +++++++++--------- .../common/db/sqlalchemy/test_base.py | 8 ++++---- .../openstack/common/db/sqlalchemy/utils.py | 10 +++++----- .../openstack/common/eventlet_backdoor.py | 4 ++-- .../openstack/common/excutils.py | 2 +- .../openstack/common/fileutils.py | 6 +++--- .../openstack/common/fixture/__init__.py | 0 .../openstack/common/fixture/config.py | 0 .../openstack/common/fixture/lockutils.py | 2 +- .../openstack/common/fixture/mockpatch.py | 0 .../openstack/common/fixture/moxstubout.py | 0 .../openstack/common/gettextutils.py | 8 ++++---- .../openstack/common/importutils.py | 0 .../openstack/common/jsonutils.py | 8 ++++---- {neutron => tacker}/openstack/common/local.py | 0 .../openstack/common/lockutils.py | 12 ++++++------ {neutron => tacker}/openstack/common/log.py | 10 +++++----- .../openstack/common/log_handler.py | 4 ++-- .../openstack/common/loopingcall.py | 6 +++--- .../openstack/common/middleware/__init__.py | 0 .../openstack/common/middleware/audit.py | 2 +- .../openstack/common/middleware/base.py | 0 .../common/middleware/catch_errors.py | 6 +++--- .../common/middleware/correlation_id.py | 2 +- .../openstack/common/middleware/debug.py | 2 +- .../openstack/common/middleware/notifier.py | 10 +++++----- .../openstack/common/middleware/request_id.py | 4 ++-- .../openstack/common/middleware/sizelimit.py | 4 ++-- .../openstack/common/network_utils.py | 0 .../openstack/common/periodic_task.py | 4 ++-- {neutron => tacker}/openstack/common/policy.py | 6 +++--- .../openstack/common/processutils.py | 4 ++-- .../openstack/common/service.py | 14 +++++++------- .../openstack/common/sslutils.py | 2 +- .../openstack/common/strutils.py | 2 +- .../openstack/common/systemd.py | 2 +- .../openstack/common/threadgroup.py | 4 ++-- .../openstack/common/timeutils.py | 0 .../openstack/common/uuidutils.py | 0 .../openstack/common/versionutils.py | 4 ++-- 55 files changed, 97 insertions(+), 97 deletions(-) rename {neutron => tacker}/openstack/__init__.py (100%) rename {neutron => tacker}/openstack/common/__init__.py (100%) rename {neutron => tacker}/openstack/common/cache/__init__.py (100%) rename {neutron => tacker}/openstack/common/cache/_backends/__init__.py (100%) rename {neutron => tacker}/openstack/common/cache/_backends/memory.py (97%) rename {neutron => tacker}/openstack/common/cache/backends.py (100%) rename {neutron => tacker}/openstack/common/cache/cache.py (96%) rename {neutron => tacker}/openstack/common/context.py (98%) rename {neutron => tacker}/openstack/common/db/__init__.py (100%) rename {neutron => tacker}/openstack/common/db/api.py (97%) rename {neutron => tacker}/openstack/common/db/exception.py (97%) rename {neutron => tacker}/openstack/common/db/options.py (99%) rename {neutron => tacker}/openstack/common/db/sqlalchemy/__init__.py (100%) rename {neutron => tacker}/openstack/common/db/sqlalchemy/models.py (98%) rename {neutron => tacker}/openstack/common/db/sqlalchemy/provision.py (98%) rename {neutron => tacker}/openstack/common/db/sqlalchemy/session.py (98%) rename {neutron => tacker}/openstack/common/db/sqlalchemy/test_base.py (95%) rename {neutron => tacker}/openstack/common/db/sqlalchemy/utils.py (98%) rename {neutron => tacker}/openstack/common/eventlet_backdoor.py (97%) rename {neutron => tacker}/openstack/common/excutils.py (98%) rename {neutron => tacker}/openstack/common/fileutils.py (96%) rename {neutron => tacker}/openstack/common/fixture/__init__.py (100%) rename {neutron => tacker}/openstack/common/fixture/config.py (100%) rename {neutron => tacker}/openstack/common/fixture/lockutils.py (97%) rename {neutron => tacker}/openstack/common/fixture/mockpatch.py (100%) rename {neutron => tacker}/openstack/common/fixture/moxstubout.py (100%) rename {neutron => tacker}/openstack/common/gettextutils.py (98%) rename {neutron => tacker}/openstack/common/importutils.py (100%) rename {neutron => tacker}/openstack/common/jsonutils.py (97%) rename {neutron => tacker}/openstack/common/local.py (100%) rename {neutron => tacker}/openstack/common/lockutils.py (96%) rename {neutron => tacker}/openstack/common/log.py (98%) rename {neutron => tacker}/openstack/common/log_handler.py (90%) rename {neutron => tacker}/openstack/common/loopingcall.py (96%) rename {neutron => tacker}/openstack/common/middleware/__init__.py (100%) rename {neutron => tacker}/openstack/common/middleware/audit.py (96%) rename {neutron => tacker}/openstack/common/middleware/base.py (100%) rename {neutron => tacker}/openstack/common/middleware/catch_errors.py (88%) rename {neutron => tacker}/openstack/common/middleware/correlation_id.py (94%) rename {neutron => tacker}/openstack/common/middleware/debug.py (97%) rename {neutron => tacker}/openstack/common/middleware/notifier.py (93%) rename {neutron => tacker}/openstack/common/middleware/request_id.py (93%) rename {neutron => tacker}/openstack/common/middleware/sizelimit.py (96%) rename {neutron => tacker}/openstack/common/network_utils.py (100%) rename {neutron => tacker}/openstack/common/periodic_task.py (98%) rename {neutron => tacker}/openstack/common/policy.py (99%) rename {neutron => tacker}/openstack/common/processutils.py (98%) rename {neutron => tacker}/openstack/common/service.py (97%) rename {neutron => tacker}/openstack/common/sslutils.py (98%) rename {neutron => tacker}/openstack/common/strutils.py (99%) rename {neutron => tacker}/openstack/common/systemd.py (98%) rename {neutron => tacker}/openstack/common/threadgroup.py (97%) rename {neutron => tacker}/openstack/common/timeutils.py (100%) rename {neutron => tacker}/openstack/common/uuidutils.py (100%) rename {neutron => tacker}/openstack/common/versionutils.py (97%) diff --git a/neutron/openstack/__init__.py b/tacker/openstack/__init__.py similarity index 100% rename from neutron/openstack/__init__.py rename to tacker/openstack/__init__.py diff --git a/neutron/openstack/common/__init__.py b/tacker/openstack/common/__init__.py similarity index 100% rename from neutron/openstack/common/__init__.py rename to tacker/openstack/common/__init__.py diff --git a/neutron/openstack/common/cache/__init__.py b/tacker/openstack/common/cache/__init__.py similarity index 100% rename from neutron/openstack/common/cache/__init__.py rename to tacker/openstack/common/cache/__init__.py diff --git a/neutron/openstack/common/cache/_backends/__init__.py b/tacker/openstack/common/cache/_backends/__init__.py similarity index 100% rename from neutron/openstack/common/cache/_backends/__init__.py rename to tacker/openstack/common/cache/_backends/__init__.py diff --git a/neutron/openstack/common/cache/_backends/memory.py b/tacker/openstack/common/cache/_backends/memory.py similarity index 97% rename from neutron/openstack/common/cache/_backends/memory.py rename to tacker/openstack/common/cache/_backends/memory.py index d6f5249fe..b647b6391 100644 --- a/neutron/openstack/common/cache/_backends/memory.py +++ b/tacker/openstack/common/cache/_backends/memory.py @@ -14,9 +14,9 @@ import collections -from neutron.openstack.common.cache import backends -from neutron.openstack.common import lockutils -from neutron.openstack.common import timeutils +from tacker.openstack.common.cache import backends +from tacker.openstack.common import lockutils +from tacker.openstack.common import timeutils class MemoryBackend(backends.BaseCache): diff --git a/neutron/openstack/common/cache/backends.py b/tacker/openstack/common/cache/backends.py similarity index 100% rename from neutron/openstack/common/cache/backends.py rename to tacker/openstack/common/cache/backends.py diff --git a/neutron/openstack/common/cache/cache.py b/tacker/openstack/common/cache/cache.py similarity index 96% rename from neutron/openstack/common/cache/cache.py rename to tacker/openstack/common/cache/cache.py index 1247787a2..c81bdb5d9 100644 --- a/neutron/openstack/common/cache/cache.py +++ b/tacker/openstack/common/cache/cache.py @@ -71,7 +71,7 @@ def get_cache(url='memory://'): parameters = parse.parse_qsl(query) kwargs = {'options': dict(parameters)} - mgr = driver.DriverManager('neutron.openstack.common.cache.backends', backend, + mgr = driver.DriverManager('tacker.openstack.common.cache.backends', backend, invoke_on_load=True, invoke_args=[parsed], invoke_kwds=kwargs) diff --git a/neutron/openstack/common/context.py b/tacker/openstack/common/context.py similarity index 98% rename from neutron/openstack/common/context.py rename to tacker/openstack/common/context.py index fa62fc1f1..f354a7414 100644 --- a/neutron/openstack/common/context.py +++ b/tacker/openstack/common/context.py @@ -24,7 +24,7 @@ context or provide additional information in their specific WSGI pipeline. import itertools -from neutron.openstack.common import uuidutils +from tacker.openstack.common import uuidutils def generate_request_id(): diff --git a/neutron/openstack/common/db/__init__.py b/tacker/openstack/common/db/__init__.py similarity index 100% rename from neutron/openstack/common/db/__init__.py rename to tacker/openstack/common/db/__init__.py diff --git a/neutron/openstack/common/db/api.py b/tacker/openstack/common/db/api.py similarity index 97% rename from neutron/openstack/common/db/api.py rename to tacker/openstack/common/db/api.py index 7f71d6a2b..55e16052d 100644 --- a/neutron/openstack/common/db/api.py +++ b/tacker/openstack/common/db/api.py @@ -25,9 +25,9 @@ import logging import threading import time -from neutron.openstack.common.db import exception -from neutron.openstack.common.gettextutils import _LE -from neutron.openstack.common import importutils +from tacker.openstack.common.db import exception +from tacker.openstack.common.gettextutils import _LE +from tacker.openstack.common import importutils LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/db/exception.py b/tacker/openstack/common/db/exception.py similarity index 97% rename from neutron/openstack/common/db/exception.py rename to tacker/openstack/common/db/exception.py index ee92ccfa6..436cc8626 100644 --- a/neutron/openstack/common/db/exception.py +++ b/tacker/openstack/common/db/exception.py @@ -18,7 +18,7 @@ import six -from neutron.openstack.common.gettextutils import _ +from tacker.openstack.common.gettextutils import _ class DBError(Exception): diff --git a/neutron/openstack/common/db/options.py b/tacker/openstack/common/db/options.py similarity index 99% rename from neutron/openstack/common/db/options.py rename to tacker/openstack/common/db/options.py index 66443162c..36c451185 100644 --- a/neutron/openstack/common/db/options.py +++ b/tacker/openstack/common/db/options.py @@ -18,7 +18,7 @@ from oslo.config import cfg database_opts = [ cfg.StrOpt('sqlite_db', deprecated_group='DEFAULT', - default='neutron.sqlite', + default='tacker.sqlite', help='The file name to use with SQLite'), cfg.BoolOpt('sqlite_synchronous', deprecated_group='DEFAULT', diff --git a/neutron/openstack/common/db/sqlalchemy/__init__.py b/tacker/openstack/common/db/sqlalchemy/__init__.py similarity index 100% rename from neutron/openstack/common/db/sqlalchemy/__init__.py rename to tacker/openstack/common/db/sqlalchemy/__init__.py diff --git a/neutron/openstack/common/db/sqlalchemy/models.py b/tacker/openstack/common/db/sqlalchemy/models.py similarity index 98% rename from neutron/openstack/common/db/sqlalchemy/models.py rename to tacker/openstack/common/db/sqlalchemy/models.py index 12cfc7645..f1e991697 100644 --- a/neutron/openstack/common/db/sqlalchemy/models.py +++ b/tacker/openstack/common/db/sqlalchemy/models.py @@ -26,7 +26,7 @@ from sqlalchemy import Column, Integer from sqlalchemy import DateTime from sqlalchemy.orm import object_mapper -from neutron.openstack.common import timeutils +from tacker.openstack.common import timeutils class ModelBase(six.Iterator): diff --git a/neutron/openstack/common/db/sqlalchemy/provision.py b/tacker/openstack/common/db/sqlalchemy/provision.py similarity index 98% rename from neutron/openstack/common/db/sqlalchemy/provision.py rename to tacker/openstack/common/db/sqlalchemy/provision.py index 70c89a921..8662dfd47 100644 --- a/neutron/openstack/common/db/sqlalchemy/provision.py +++ b/tacker/openstack/common/db/sqlalchemy/provision.py @@ -24,7 +24,7 @@ import string from six import moves import sqlalchemy -from neutron.openstack.common.db import exception as exc +from tacker.openstack.common.db import exception as exc LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/db/sqlalchemy/session.py b/tacker/openstack/common/db/sqlalchemy/session.py similarity index 98% rename from neutron/openstack/common/db/sqlalchemy/session.py rename to tacker/openstack/common/db/sqlalchemy/session.py index 00c4d6101..2088f0de9 100644 --- a/neutron/openstack/common/db/sqlalchemy/session.py +++ b/tacker/openstack/common/db/sqlalchemy/session.py @@ -290,9 +290,9 @@ import sqlalchemy.orm from sqlalchemy.pool import NullPool, StaticPool from sqlalchemy.sql.expression import literal_column -from neutron.openstack.common.db import exception -from neutron.openstack.common.gettextutils import _LE, _LW -from neutron.openstack.common import timeutils +from tacker.openstack.common.db import exception +from tacker.openstack.common.gettextutils import _LE, _LW +from tacker.openstack.common import timeutils LOG = logging.getLogger(__name__) @@ -743,8 +743,8 @@ def _patch_mysqldb_with_stacktrace_comments(): # db/api is just a wrapper around db/sqlalchemy/api if filename.endswith('db/api.py'): continue - # only trace inside neutron - index = filename.rfind('neutron') + # only trace inside tacker + index = filename.rfind('tacker') if index == -1: continue stack += "File:%s:%s Method:%s() Line:%s | " \ @@ -762,12 +762,12 @@ def _patch_mysqldb_with_stacktrace_comments(): class EngineFacade(object): - """A helper class for removing of global engine instances from neutron.db. + """A helper class for removing of global engine instances from tacker.db. - As a library, neutron.db can't decide where to store/when to create engine + As a library, tacker.db can't decide where to store/when to create engine and sessionmaker instances, so this must be left for a target application. - On the other hand, in order to simplify the adoption of neutron.db changes, + On the other hand, in order to simplify the adoption of tacker.db changes, we'll provide a helper class, which creates engine and sessionmaker on its instantiation and provides get_engine()/get_session() methods that are compatible with corresponding utility functions that currently @@ -775,7 +775,7 @@ class EngineFacade(object): engine/sessionmaker instances will still be global (and they are meant to be global), but they will be stored in the app context, rather that in the - neutron.db context. + tacker.db context. Note: using of this helper is completely optional and you are encouraged to integrate engine/sessionmaker instances into your apps any way you like diff --git a/neutron/openstack/common/db/sqlalchemy/test_base.py b/tacker/openstack/common/db/sqlalchemy/test_base.py similarity index 95% rename from neutron/openstack/common/db/sqlalchemy/test_base.py rename to tacker/openstack/common/db/sqlalchemy/test_base.py index e6e047fbf..645680efc 100644 --- a/neutron/openstack/common/db/sqlalchemy/test_base.py +++ b/tacker/openstack/common/db/sqlalchemy/test_base.py @@ -20,10 +20,10 @@ import os import fixtures import six -from neutron.openstack.common.db.sqlalchemy import session -from neutron.openstack.common.db.sqlalchemy import utils -from neutron.openstack.common.fixture import lockutils -from neutron.openstack.common import test +from tacker.openstack.common.db.sqlalchemy import session +from tacker.openstack.common.db.sqlalchemy import utils +from tacker.openstack.common.fixture import lockutils +from tacker.openstack.common import test class DbFixture(fixtures.Fixture): diff --git a/neutron/openstack/common/db/sqlalchemy/utils.py b/tacker/openstack/common/db/sqlalchemy/utils.py similarity index 98% rename from neutron/openstack/common/db/sqlalchemy/utils.py rename to tacker/openstack/common/db/sqlalchemy/utils.py index 878431773..1e54b3955 100644 --- a/neutron/openstack/common/db/sqlalchemy/utils.py +++ b/tacker/openstack/common/db/sqlalchemy/utils.py @@ -36,10 +36,10 @@ from sqlalchemy import String from sqlalchemy import Table from sqlalchemy.types import NullType -from neutron.openstack.common import context as request_context -from neutron.openstack.common.db.sqlalchemy import models -from neutron.openstack.common.gettextutils import _, _LI, _LW -from neutron.openstack.common import timeutils +from tacker.openstack.common import context as request_context +from tacker.openstack.common.db.sqlalchemy import models +from tacker.openstack.common.gettextutils import _, _LI, _LW +from tacker.openstack.common import timeutils LOG = logging.getLogger(__name__) @@ -300,7 +300,7 @@ def drop_unique_constraint(migrate_engine, table_name, uc_name, *columns, **col_name_col_instance): """Drop unique constraint from table. - DEPRECATED: this function is deprecated and will be removed from neutron.db + DEPRECATED: this function is deprecated and will be removed from tacker.db in a few releases. Please use UniqueConstraint.drop() method directly for sqlalchemy-migrate migration scripts. diff --git a/neutron/openstack/common/eventlet_backdoor.py b/tacker/openstack/common/eventlet_backdoor.py similarity index 97% rename from neutron/openstack/common/eventlet_backdoor.py rename to tacker/openstack/common/eventlet_backdoor.py index b55b0ceb3..cc47d2e22 100644 --- a/neutron/openstack/common/eventlet_backdoor.py +++ b/tacker/openstack/common/eventlet_backdoor.py @@ -29,8 +29,8 @@ import eventlet.backdoor import greenlet from oslo.config import cfg -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common import log as logging +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common import log as logging help_for_backdoor_port = ( "Acceptable values are 0, , and :, where 0 results " diff --git a/neutron/openstack/common/excutils.py b/tacker/openstack/common/excutils.py similarity index 98% rename from neutron/openstack/common/excutils.py rename to tacker/openstack/common/excutils.py index 5b3c5c86b..19104c384 100644 --- a/neutron/openstack/common/excutils.py +++ b/tacker/openstack/common/excutils.py @@ -24,7 +24,7 @@ import traceback import six -from neutron.openstack.common.gettextutils import _LE +from tacker.openstack.common.gettextutils import _LE class save_and_reraise_exception(object): diff --git a/neutron/openstack/common/fileutils.py b/tacker/openstack/common/fileutils.py similarity index 96% rename from neutron/openstack/common/fileutils.py rename to tacker/openstack/common/fileutils.py index 704af0962..5e1c98267 100644 --- a/neutron/openstack/common/fileutils.py +++ b/tacker/openstack/common/fileutils.py @@ -19,9 +19,9 @@ import errno import os import tempfile -from neutron.openstack.common import excutils -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common import log as logging +from tacker.openstack.common import excutils +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/fixture/__init__.py b/tacker/openstack/common/fixture/__init__.py similarity index 100% rename from neutron/openstack/common/fixture/__init__.py rename to tacker/openstack/common/fixture/__init__.py diff --git a/neutron/openstack/common/fixture/config.py b/tacker/openstack/common/fixture/config.py similarity index 100% rename from neutron/openstack/common/fixture/config.py rename to tacker/openstack/common/fixture/config.py diff --git a/neutron/openstack/common/fixture/lockutils.py b/tacker/openstack/common/fixture/lockutils.py similarity index 97% rename from neutron/openstack/common/fixture/lockutils.py rename to tacker/openstack/common/fixture/lockutils.py index 90932c56e..0d7aa4efc 100644 --- a/neutron/openstack/common/fixture/lockutils.py +++ b/tacker/openstack/common/fixture/lockutils.py @@ -15,7 +15,7 @@ import fixtures -from neutron.openstack.common import lockutils +from tacker.openstack.common import lockutils class LockFixture(fixtures.Fixture): diff --git a/neutron/openstack/common/fixture/mockpatch.py b/tacker/openstack/common/fixture/mockpatch.py similarity index 100% rename from neutron/openstack/common/fixture/mockpatch.py rename to tacker/openstack/common/fixture/mockpatch.py diff --git a/neutron/openstack/common/fixture/moxstubout.py b/tacker/openstack/common/fixture/moxstubout.py similarity index 100% rename from neutron/openstack/common/fixture/moxstubout.py rename to tacker/openstack/common/fixture/moxstubout.py diff --git a/neutron/openstack/common/gettextutils.py b/tacker/openstack/common/gettextutils.py similarity index 98% rename from neutron/openstack/common/gettextutils.py rename to tacker/openstack/common/gettextutils.py index 71abc7151..fe9b11690 100644 --- a/neutron/openstack/common/gettextutils.py +++ b/tacker/openstack/common/gettextutils.py @@ -19,7 +19,7 @@ gettext for openstack-common modules. Usual usage in an openstack.common module: - from neutron.openstack.common.gettextutils import _ + from tacker.openstack.common.gettextutils import _ """ import copy @@ -120,7 +120,7 @@ class TranslatorFactory(object): # module within each application. # Create the global translation functions. -_translators = TranslatorFactory('neutron') +_translators = TranslatorFactory('tacker') # The primary translation function using the well-known name "_" _ = _translators.primary @@ -150,7 +150,7 @@ def enable_lazy(): # FIXME(dhellmann): This function will be removed in oslo.i18n, # because the TranslatorFactory makes it superfluous. global _, _LI, _LW, _LE, _LC, USE_LAZY - tf = TranslatorFactory('neutron', lazy=True) + tf = TranslatorFactory('tacker', lazy=True) _ = tf.primary _LI = tf.log_info _LW = tf.log_warning @@ -201,7 +201,7 @@ class Message(six.text_type): """ def __new__(cls, msgid, msgtext=None, params=None, - domain='neutron', *args): + domain='tacker', *args): """Create a new Message object. In order for translation to work gettext requires a message ID, this diff --git a/neutron/openstack/common/importutils.py b/tacker/openstack/common/importutils.py similarity index 100% rename from neutron/openstack/common/importutils.py rename to tacker/openstack/common/importutils.py diff --git a/neutron/openstack/common/jsonutils.py b/tacker/openstack/common/jsonutils.py similarity index 97% rename from neutron/openstack/common/jsonutils.py rename to tacker/openstack/common/jsonutils.py index 581b8c051..0e833a0cd 100644 --- a/neutron/openstack/common/jsonutils.py +++ b/tacker/openstack/common/jsonutils.py @@ -51,10 +51,10 @@ else: import six import six.moves.xmlrpc_client as xmlrpclib -from neutron.openstack.common import gettextutils -from neutron.openstack.common import importutils -from neutron.openstack.common import strutils -from neutron.openstack.common import timeutils +from tacker.openstack.common import gettextutils +from tacker.openstack.common import importutils +from tacker.openstack.common import strutils +from tacker.openstack.common import timeutils netaddr = importutils.try_import("netaddr") diff --git a/neutron/openstack/common/local.py b/tacker/openstack/common/local.py similarity index 100% rename from neutron/openstack/common/local.py rename to tacker/openstack/common/local.py diff --git a/neutron/openstack/common/lockutils.py b/tacker/openstack/common/lockutils.py similarity index 96% rename from neutron/openstack/common/lockutils.py rename to tacker/openstack/common/lockutils.py index f85b8c130..df70d668a 100644 --- a/neutron/openstack/common/lockutils.py +++ b/tacker/openstack/common/lockutils.py @@ -28,10 +28,10 @@ import weakref from oslo.config import cfg -from neutron.openstack.common import fileutils -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common import local -from neutron.openstack.common import log as logging +from tacker.openstack.common import fileutils +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common import local +from tacker.openstack.common import log as logging LOG = logging.getLogger(__name__) @@ -41,7 +41,7 @@ util_opts = [ cfg.BoolOpt('disable_process_locking', default=False, help='Whether to disable inter-process locks'), cfg.StrOpt('lock_path', - default=os.environ.get("NEUTRON_LOCK_PATH"), + default=os.environ.get("TACKER_LOCK_PATH"), help=('Directory to use for lock files.')) ] @@ -291,7 +291,7 @@ def main(argv): """ lock_dir = tempfile.mkdtemp() - os.environ["NEUTRON_LOCK_PATH"] = lock_dir + os.environ["TACKER_LOCK_PATH"] = lock_dir try: ret_val = subprocess.call(argv[1:]) finally: diff --git a/neutron/openstack/common/log.py b/tacker/openstack/common/log.py similarity index 98% rename from neutron/openstack/common/log.py rename to tacker/openstack/common/log.py index 427921c4a..760b476c9 100644 --- a/neutron/openstack/common/log.py +++ b/tacker/openstack/common/log.py @@ -41,10 +41,10 @@ from oslo.config import cfg import six from six import moves -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common import importutils -from neutron.openstack.common import jsonutils -from neutron.openstack.common import local +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common import importutils +from tacker.openstack.common import jsonutils +from tacker.openstack.common import local _DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S" @@ -485,7 +485,7 @@ def _setup_logging_from_conf(): if CONF.publish_errors: handler = importutils.import_object( - "neutron.openstack.common.log_handler.PublishErrorsHandler", + "tacker.openstack.common.log_handler.PublishErrorsHandler", logging.ERROR) log_root.addHandler(handler) diff --git a/neutron/openstack/common/log_handler.py b/tacker/openstack/common/log_handler.py similarity index 90% rename from neutron/openstack/common/log_handler.py rename to tacker/openstack/common/log_handler.py index 4da3ad368..610769f73 100644 --- a/neutron/openstack/common/log_handler.py +++ b/tacker/openstack/common/log_handler.py @@ -16,12 +16,12 @@ import logging from oslo.config import cfg -from neutron.openstack.common import notifier +from tacker.openstack.common import notifier class PublishErrorsHandler(logging.Handler): def emit(self, record): - if ('neutron.openstack.common.notifier.log_notifier' in + if ('tacker.openstack.common.notifier.log_notifier' in cfg.CONF.notification_driver): return notifier.api.notify(None, 'error.publisher', diff --git a/neutron/openstack/common/loopingcall.py b/tacker/openstack/common/loopingcall.py similarity index 96% rename from neutron/openstack/common/loopingcall.py rename to tacker/openstack/common/loopingcall.py index e588c8309..c09f32bc3 100644 --- a/neutron/openstack/common/loopingcall.py +++ b/tacker/openstack/common/loopingcall.py @@ -20,9 +20,9 @@ import sys from eventlet import event from eventlet import greenthread -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common import log as logging -from neutron.openstack.common import timeutils +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common import log as logging +from tacker.openstack.common import timeutils LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/middleware/__init__.py b/tacker/openstack/common/middleware/__init__.py similarity index 100% rename from neutron/openstack/common/middleware/__init__.py rename to tacker/openstack/common/middleware/__init__.py diff --git a/neutron/openstack/common/middleware/audit.py b/tacker/openstack/common/middleware/audit.py similarity index 96% rename from neutron/openstack/common/middleware/audit.py rename to tacker/openstack/common/middleware/audit.py index 5d8da5244..c7f4c0e76 100644 --- a/neutron/openstack/common/middleware/audit.py +++ b/tacker/openstack/common/middleware/audit.py @@ -22,7 +22,7 @@ in the pipeline so that it can utilise the information Keystone provides. """ from pycadf.audit import api as cadf_api -from neutron.openstack.common.middleware import notifier +from tacker.openstack.common.middleware import notifier class AuditMiddleware(notifier.RequestNotifier): diff --git a/neutron/openstack/common/middleware/base.py b/tacker/openstack/common/middleware/base.py similarity index 100% rename from neutron/openstack/common/middleware/base.py rename to tacker/openstack/common/middleware/base.py diff --git a/neutron/openstack/common/middleware/catch_errors.py b/tacker/openstack/common/middleware/catch_errors.py similarity index 88% rename from neutron/openstack/common/middleware/catch_errors.py rename to tacker/openstack/common/middleware/catch_errors.py index b692aeec8..4677a025b 100644 --- a/neutron/openstack/common/middleware/catch_errors.py +++ b/tacker/openstack/common/middleware/catch_errors.py @@ -22,9 +22,9 @@ to hide internal errors from API response. import webob.dec import webob.exc -from neutron.openstack.common.gettextutils import _ # noqa -from neutron.openstack.common import log as logging -from neutron.openstack.common.middleware import base +from tacker.openstack.common.gettextutils import _ # noqa +from tacker.openstack.common import log as logging +from tacker.openstack.common.middleware import base LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/middleware/correlation_id.py b/tacker/openstack/common/middleware/correlation_id.py similarity index 94% rename from neutron/openstack/common/middleware/correlation_id.py rename to tacker/openstack/common/middleware/correlation_id.py index 80ee63f76..c91fc058f 100644 --- a/neutron/openstack/common/middleware/correlation_id.py +++ b/tacker/openstack/common/middleware/correlation_id.py @@ -17,7 +17,7 @@ import uuid -from neutron.openstack.common.middleware import base +from tacker.openstack.common.middleware import base class CorrelationIdMiddleware(base.Middleware): diff --git a/neutron/openstack/common/middleware/debug.py b/tacker/openstack/common/middleware/debug.py similarity index 97% rename from neutron/openstack/common/middleware/debug.py rename to tacker/openstack/common/middleware/debug.py index 5ab960554..cb7266940 100644 --- a/neutron/openstack/common/middleware/debug.py +++ b/tacker/openstack/common/middleware/debug.py @@ -22,7 +22,7 @@ import sys import six import webob.dec -from neutron.openstack.common.middleware import base +from tacker.openstack.common.middleware import base class Debug(base.Middleware): diff --git a/neutron/openstack/common/middleware/notifier.py b/tacker/openstack/common/middleware/notifier.py similarity index 93% rename from neutron/openstack/common/middleware/notifier.py rename to tacker/openstack/common/middleware/notifier.py index e34699c5a..7c0d9cf0b 100644 --- a/neutron/openstack/common/middleware/notifier.py +++ b/tacker/openstack/common/middleware/notifier.py @@ -23,11 +23,11 @@ import traceback as tb import six import webob.dec -from neutron.openstack.common import context -from neutron.openstack.common.gettextutils import _LE -from neutron.openstack.common import log as logging -from neutron.openstack.common.middleware import base -from neutron.openstack.common.notifier import api +from tacker.openstack.common import context +from tacker.openstack.common.gettextutils import _LE +from tacker.openstack.common import log as logging +from tacker.openstack.common.middleware import base +from tacker.openstack.common.notifier import api LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/middleware/request_id.py b/tacker/openstack/common/middleware/request_id.py similarity index 93% rename from neutron/openstack/common/middleware/request_id.py rename to tacker/openstack/common/middleware/request_id.py index 5c2620cce..180522d56 100644 --- a/neutron/openstack/common/middleware/request_id.py +++ b/tacker/openstack/common/middleware/request_id.py @@ -21,8 +21,8 @@ request environment. The request ID is also added to API response. import webob.dec -from neutron.openstack.common import context -from neutron.openstack.common.middleware import base +from tacker.openstack.common import context +from tacker.openstack.common.middleware import base ENV_REQUEST_ID = 'openstack.request_id' diff --git a/neutron/openstack/common/middleware/sizelimit.py b/tacker/openstack/common/middleware/sizelimit.py similarity index 96% rename from neutron/openstack/common/middleware/sizelimit.py rename to tacker/openstack/common/middleware/sizelimit.py index 56b320024..6ae05e45b 100644 --- a/neutron/openstack/common/middleware/sizelimit.py +++ b/tacker/openstack/common/middleware/sizelimit.py @@ -21,8 +21,8 @@ from oslo.config import cfg import webob.dec import webob.exc -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common.middleware import base +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common.middleware import base #default request size is 112k diff --git a/neutron/openstack/common/network_utils.py b/tacker/openstack/common/network_utils.py similarity index 100% rename from neutron/openstack/common/network_utils.py rename to tacker/openstack/common/network_utils.py diff --git a/neutron/openstack/common/periodic_task.py b/tacker/openstack/common/periodic_task.py similarity index 98% rename from neutron/openstack/common/periodic_task.py rename to tacker/openstack/common/periodic_task.py index 1ebdc1af6..5506993e1 100644 --- a/neutron/openstack/common/periodic_task.py +++ b/tacker/openstack/common/periodic_task.py @@ -16,8 +16,8 @@ import time from oslo.config import cfg import six -from neutron.openstack.common.gettextutils import _, _LE, _LI -from neutron.openstack.common import log as logging +from tacker.openstack.common.gettextutils import _, _LE, _LI +from tacker.openstack.common import log as logging periodic_opts = [ diff --git a/neutron/openstack/common/policy.py b/tacker/openstack/common/policy.py similarity index 99% rename from neutron/openstack/common/policy.py rename to tacker/openstack/common/policy.py index 21ce9b80a..fb09b16ca 100644 --- a/neutron/openstack/common/policy.py +++ b/tacker/openstack/common/policy.py @@ -63,9 +63,9 @@ import urllib import six import urllib2 -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common import jsonutils -from neutron.openstack.common import log as logging +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common import jsonutils +from tacker.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/processutils.py b/tacker/openstack/common/processutils.py similarity index 98% rename from neutron/openstack/common/processutils.py rename to tacker/openstack/common/processutils.py index 039b9ad46..b7e5411c6 100644 --- a/neutron/openstack/common/processutils.py +++ b/tacker/openstack/common/processutils.py @@ -26,8 +26,8 @@ import signal from eventlet.green import subprocess from eventlet import greenthread -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common import log as logging +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/service.py b/tacker/openstack/common/service.py similarity index 97% rename from neutron/openstack/common/service.py rename to tacker/openstack/common/service.py index 79ae9bc5d..6077a5403 100644 --- a/neutron/openstack/common/service.py +++ b/tacker/openstack/common/service.py @@ -37,15 +37,15 @@ import eventlet from eventlet import event from oslo.config import cfg -from neutron.openstack.common import eventlet_backdoor -from neutron.openstack.common.gettextutils import _LE, _LI, _LW -from neutron.openstack.common import importutils -from neutron.openstack.common import log as logging -from neutron.openstack.common import systemd -from neutron.openstack.common import threadgroup +from tacker.openstack.common import eventlet_backdoor +from tacker.openstack.common.gettextutils import _LE, _LI, _LW +from tacker.openstack.common import importutils +from tacker.openstack.common import log as logging +from tacker.openstack.common import systemd +from tacker.openstack.common import threadgroup -rpc = importutils.try_import('neutron.openstack.common.rpc') +rpc = importutils.try_import('tacker.openstack.common.rpc') CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/sslutils.py b/tacker/openstack/common/sslutils.py similarity index 98% rename from neutron/openstack/common/sslutils.py rename to tacker/openstack/common/sslutils.py index 1d0793794..ff44bb96f 100644 --- a/neutron/openstack/common/sslutils.py +++ b/tacker/openstack/common/sslutils.py @@ -17,7 +17,7 @@ import ssl from oslo.config import cfg -from neutron.openstack.common.gettextutils import _ +from tacker.openstack.common.gettextutils import _ ssl_opts = [ diff --git a/neutron/openstack/common/strutils.py b/tacker/openstack/common/strutils.py similarity index 99% rename from neutron/openstack/common/strutils.py rename to tacker/openstack/common/strutils.py index 8c796d4f7..d63ea76fb 100644 --- a/neutron/openstack/common/strutils.py +++ b/tacker/openstack/common/strutils.py @@ -24,7 +24,7 @@ import unicodedata import six -from neutron.openstack.common.gettextutils import _ +from tacker.openstack.common.gettextutils import _ UNIT_PREFIX_EXPONENT = { diff --git a/neutron/openstack/common/systemd.py b/tacker/openstack/common/systemd.py similarity index 98% rename from neutron/openstack/common/systemd.py rename to tacker/openstack/common/systemd.py index cc02caba3..88b36406c 100644 --- a/neutron/openstack/common/systemd.py +++ b/tacker/openstack/common/systemd.py @@ -20,7 +20,7 @@ import os import socket import sys -from neutron.openstack.common import log as logging +from tacker.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/threadgroup.py b/tacker/openstack/common/threadgroup.py similarity index 97% rename from neutron/openstack/common/threadgroup.py rename to tacker/openstack/common/threadgroup.py index 5cfd59c94..3976bb3b1 100644 --- a/neutron/openstack/common/threadgroup.py +++ b/tacker/openstack/common/threadgroup.py @@ -16,8 +16,8 @@ import eventlet from eventlet import greenpool from eventlet import greenthread -from neutron.openstack.common import log as logging -from neutron.openstack.common import loopingcall +from tacker.openstack.common import log as logging +from tacker.openstack.common import loopingcall LOG = logging.getLogger(__name__) diff --git a/neutron/openstack/common/timeutils.py b/tacker/openstack/common/timeutils.py similarity index 100% rename from neutron/openstack/common/timeutils.py rename to tacker/openstack/common/timeutils.py diff --git a/neutron/openstack/common/uuidutils.py b/tacker/openstack/common/uuidutils.py similarity index 100% rename from neutron/openstack/common/uuidutils.py rename to tacker/openstack/common/uuidutils.py diff --git a/neutron/openstack/common/versionutils.py b/tacker/openstack/common/versionutils.py similarity index 97% rename from neutron/openstack/common/versionutils.py rename to tacker/openstack/common/versionutils.py index 04472a867..dc4af3b78 100644 --- a/neutron/openstack/common/versionutils.py +++ b/tacker/openstack/common/versionutils.py @@ -20,8 +20,8 @@ Helpers for comparing version strings. import functools import pkg_resources -from neutron.openstack.common.gettextutils import _ -from neutron.openstack.common import log as logging +from tacker.openstack.common.gettextutils import _ +from tacker.openstack.common import log as logging LOG = logging.getLogger(__name__)