rename neutron/openstack/ to tacker

Change-Id: I9c9128ae4f41672b56694f71c00728c35998ea0a
This commit is contained in:
Isaku Yamahata 2014-06-26 16:59:11 +09:00
parent 28bd56f146
commit 9b8bc393e9
55 changed files with 97 additions and 97 deletions

View File

@ -14,9 +14,9 @@
import collections import collections
from neutron.openstack.common.cache import backends from tacker.openstack.common.cache import backends
from neutron.openstack.common import lockutils from tacker.openstack.common import lockutils
from neutron.openstack.common import timeutils from tacker.openstack.common import timeutils
class MemoryBackend(backends.BaseCache): class MemoryBackend(backends.BaseCache):

View File

@ -71,7 +71,7 @@ def get_cache(url='memory://'):
parameters = parse.parse_qsl(query) parameters = parse.parse_qsl(query)
kwargs = {'options': dict(parameters)} 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_on_load=True,
invoke_args=[parsed], invoke_args=[parsed],
invoke_kwds=kwargs) invoke_kwds=kwargs)

View File

@ -24,7 +24,7 @@ context or provide additional information in their specific WSGI pipeline.
import itertools import itertools
from neutron.openstack.common import uuidutils from tacker.openstack.common import uuidutils
def generate_request_id(): def generate_request_id():

View File

@ -25,9 +25,9 @@ import logging
import threading import threading
import time import time
from neutron.openstack.common.db import exception from tacker.openstack.common.db import exception
from neutron.openstack.common.gettextutils import _LE from tacker.openstack.common.gettextutils import _LE
from neutron.openstack.common import importutils from tacker.openstack.common import importutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -18,7 +18,7 @@
import six import six
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
class DBError(Exception): class DBError(Exception):

View File

@ -18,7 +18,7 @@ from oslo.config import cfg
database_opts = [ database_opts = [
cfg.StrOpt('sqlite_db', cfg.StrOpt('sqlite_db',
deprecated_group='DEFAULT', deprecated_group='DEFAULT',
default='neutron.sqlite', default='tacker.sqlite',
help='The file name to use with SQLite'), help='The file name to use with SQLite'),
cfg.BoolOpt('sqlite_synchronous', cfg.BoolOpt('sqlite_synchronous',
deprecated_group='DEFAULT', deprecated_group='DEFAULT',

View File

@ -26,7 +26,7 @@ from sqlalchemy import Column, Integer
from sqlalchemy import DateTime from sqlalchemy import DateTime
from sqlalchemy.orm import object_mapper from sqlalchemy.orm import object_mapper
from neutron.openstack.common import timeutils from tacker.openstack.common import timeutils
class ModelBase(six.Iterator): class ModelBase(six.Iterator):

View File

@ -24,7 +24,7 @@ import string
from six import moves from six import moves
import sqlalchemy import sqlalchemy
from neutron.openstack.common.db import exception as exc from tacker.openstack.common.db import exception as exc
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -290,9 +290,9 @@ import sqlalchemy.orm
from sqlalchemy.pool import NullPool, StaticPool from sqlalchemy.pool import NullPool, StaticPool
from sqlalchemy.sql.expression import literal_column from sqlalchemy.sql.expression import literal_column
from neutron.openstack.common.db import exception from tacker.openstack.common.db import exception
from neutron.openstack.common.gettextutils import _LE, _LW from tacker.openstack.common.gettextutils import _LE, _LW
from neutron.openstack.common import timeutils from tacker.openstack.common import timeutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
@ -743,8 +743,8 @@ def _patch_mysqldb_with_stacktrace_comments():
# db/api is just a wrapper around db/sqlalchemy/api # db/api is just a wrapper around db/sqlalchemy/api
if filename.endswith('db/api.py'): if filename.endswith('db/api.py'):
continue continue
# only trace inside neutron # only trace inside tacker
index = filename.rfind('neutron') index = filename.rfind('tacker')
if index == -1: if index == -1:
continue continue
stack += "File:%s:%s Method:%s() Line:%s | " \ stack += "File:%s:%s Method:%s() Line:%s | " \
@ -762,12 +762,12 @@ def _patch_mysqldb_with_stacktrace_comments():
class EngineFacade(object): 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. 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 we'll provide a helper class, which creates engine and sessionmaker
on its instantiation and provides get_engine()/get_session() methods on its instantiation and provides get_engine()/get_session() methods
that are compatible with corresponding utility functions that currently 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 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 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 Note: using of this helper is completely optional and you are encouraged to
integrate engine/sessionmaker instances into your apps any way you like integrate engine/sessionmaker instances into your apps any way you like

View File

@ -20,10 +20,10 @@ import os
import fixtures import fixtures
import six import six
from neutron.openstack.common.db.sqlalchemy import session from tacker.openstack.common.db.sqlalchemy import session
from neutron.openstack.common.db.sqlalchemy import utils from tacker.openstack.common.db.sqlalchemy import utils
from neutron.openstack.common.fixture import lockutils from tacker.openstack.common.fixture import lockutils
from neutron.openstack.common import test from tacker.openstack.common import test
class DbFixture(fixtures.Fixture): class DbFixture(fixtures.Fixture):

View File

@ -36,10 +36,10 @@ from sqlalchemy import String
from sqlalchemy import Table from sqlalchemy import Table
from sqlalchemy.types import NullType from sqlalchemy.types import NullType
from neutron.openstack.common import context as request_context from tacker.openstack.common import context as request_context
from neutron.openstack.common.db.sqlalchemy import models from tacker.openstack.common.db.sqlalchemy import models
from neutron.openstack.common.gettextutils import _, _LI, _LW from tacker.openstack.common.gettextutils import _, _LI, _LW
from neutron.openstack.common import timeutils from tacker.openstack.common import timeutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
@ -300,7 +300,7 @@ def drop_unique_constraint(migrate_engine, table_name, uc_name, *columns,
**col_name_col_instance): **col_name_col_instance):
"""Drop unique constraint from table. """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 in a few releases. Please use UniqueConstraint.drop() method directly for
sqlalchemy-migrate migration scripts. sqlalchemy-migrate migration scripts.

View File

@ -29,8 +29,8 @@ import eventlet.backdoor
import greenlet import greenlet
from oslo.config import cfg from oslo.config import cfg
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
help_for_backdoor_port = ( help_for_backdoor_port = (
"Acceptable values are 0, <port>, and <start>:<end>, where 0 results " "Acceptable values are 0, <port>, and <start>:<end>, where 0 results "

View File

@ -24,7 +24,7 @@ import traceback
import six import six
from neutron.openstack.common.gettextutils import _LE from tacker.openstack.common.gettextutils import _LE
class save_and_reraise_exception(object): class save_and_reraise_exception(object):

View File

@ -19,9 +19,9 @@ import errno
import os import os
import tempfile import tempfile
from neutron.openstack.common import excutils from tacker.openstack.common import excutils
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,7 +15,7 @@
import fixtures import fixtures
from neutron.openstack.common import lockutils from tacker.openstack.common import lockutils
class LockFixture(fixtures.Fixture): class LockFixture(fixtures.Fixture):

View File

@ -19,7 +19,7 @@ gettext for openstack-common modules.
Usual usage in an openstack.common module: Usual usage in an openstack.common module:
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
""" """
import copy import copy
@ -120,7 +120,7 @@ class TranslatorFactory(object):
# module within each application. # module within each application.
# Create the global translation functions. # Create the global translation functions.
_translators = TranslatorFactory('neutron') _translators = TranslatorFactory('tacker')
# The primary translation function using the well-known name "_" # The primary translation function using the well-known name "_"
_ = _translators.primary _ = _translators.primary
@ -150,7 +150,7 @@ def enable_lazy():
# FIXME(dhellmann): This function will be removed in oslo.i18n, # FIXME(dhellmann): This function will be removed in oslo.i18n,
# because the TranslatorFactory makes it superfluous. # because the TranslatorFactory makes it superfluous.
global _, _LI, _LW, _LE, _LC, USE_LAZY global _, _LI, _LW, _LE, _LC, USE_LAZY
tf = TranslatorFactory('neutron', lazy=True) tf = TranslatorFactory('tacker', lazy=True)
_ = tf.primary _ = tf.primary
_LI = tf.log_info _LI = tf.log_info
_LW = tf.log_warning _LW = tf.log_warning
@ -201,7 +201,7 @@ class Message(six.text_type):
""" """
def __new__(cls, msgid, msgtext=None, params=None, def __new__(cls, msgid, msgtext=None, params=None,
domain='neutron', *args): domain='tacker', *args):
"""Create a new Message object. """Create a new Message object.
In order for translation to work gettext requires a message ID, this In order for translation to work gettext requires a message ID, this

View File

@ -51,10 +51,10 @@ else:
import six import six
import six.moves.xmlrpc_client as xmlrpclib import six.moves.xmlrpc_client as xmlrpclib
from neutron.openstack.common import gettextutils from tacker.openstack.common import gettextutils
from neutron.openstack.common import importutils from tacker.openstack.common import importutils
from neutron.openstack.common import strutils from tacker.openstack.common import strutils
from neutron.openstack.common import timeutils from tacker.openstack.common import timeutils
netaddr = importutils.try_import("netaddr") netaddr = importutils.try_import("netaddr")

View File

@ -28,10 +28,10 @@ import weakref
from oslo.config import cfg from oslo.config import cfg
from neutron.openstack.common import fileutils from tacker.openstack.common import fileutils
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common import local from tacker.openstack.common import local
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
@ -41,7 +41,7 @@ util_opts = [
cfg.BoolOpt('disable_process_locking', default=False, cfg.BoolOpt('disable_process_locking', default=False,
help='Whether to disable inter-process locks'), help='Whether to disable inter-process locks'),
cfg.StrOpt('lock_path', 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.')) help=('Directory to use for lock files.'))
] ]
@ -291,7 +291,7 @@ def main(argv):
""" """
lock_dir = tempfile.mkdtemp() lock_dir = tempfile.mkdtemp()
os.environ["NEUTRON_LOCK_PATH"] = lock_dir os.environ["TACKER_LOCK_PATH"] = lock_dir
try: try:
ret_val = subprocess.call(argv[1:]) ret_val = subprocess.call(argv[1:])
finally: finally:

View File

@ -41,10 +41,10 @@ from oslo.config import cfg
import six import six
from six import moves from six import moves
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common import importutils from tacker.openstack.common import importutils
from neutron.openstack.common import jsonutils from tacker.openstack.common import jsonutils
from neutron.openstack.common import local from tacker.openstack.common import local
_DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S" _DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
@ -485,7 +485,7 @@ def _setup_logging_from_conf():
if CONF.publish_errors: if CONF.publish_errors:
handler = importutils.import_object( handler = importutils.import_object(
"neutron.openstack.common.log_handler.PublishErrorsHandler", "tacker.openstack.common.log_handler.PublishErrorsHandler",
logging.ERROR) logging.ERROR)
log_root.addHandler(handler) log_root.addHandler(handler)

View File

@ -16,12 +16,12 @@ import logging
from oslo.config import cfg from oslo.config import cfg
from neutron.openstack.common import notifier from tacker.openstack.common import notifier
class PublishErrorsHandler(logging.Handler): class PublishErrorsHandler(logging.Handler):
def emit(self, record): def emit(self, record):
if ('neutron.openstack.common.notifier.log_notifier' in if ('tacker.openstack.common.notifier.log_notifier' in
cfg.CONF.notification_driver): cfg.CONF.notification_driver):
return return
notifier.api.notify(None, 'error.publisher', notifier.api.notify(None, 'error.publisher',

View File

@ -20,9 +20,9 @@ import sys
from eventlet import event from eventlet import event
from eventlet import greenthread from eventlet import greenthread
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
from neutron.openstack.common import timeutils from tacker.openstack.common import timeutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -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 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): class AuditMiddleware(notifier.RequestNotifier):

View File

@ -22,9 +22,9 @@ to hide internal errors from API response.
import webob.dec import webob.dec
import webob.exc import webob.exc
from neutron.openstack.common.gettextutils import _ # noqa from tacker.openstack.common.gettextutils import _ # noqa
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
from neutron.openstack.common.middleware import base from tacker.openstack.common.middleware import base
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -17,7 +17,7 @@
import uuid import uuid
from neutron.openstack.common.middleware import base from tacker.openstack.common.middleware import base
class CorrelationIdMiddleware(base.Middleware): class CorrelationIdMiddleware(base.Middleware):

View File

@ -22,7 +22,7 @@ import sys
import six import six
import webob.dec import webob.dec
from neutron.openstack.common.middleware import base from tacker.openstack.common.middleware import base
class Debug(base.Middleware): class Debug(base.Middleware):

View File

@ -23,11 +23,11 @@ import traceback as tb
import six import six
import webob.dec import webob.dec
from neutron.openstack.common import context from tacker.openstack.common import context
from neutron.openstack.common.gettextutils import _LE from tacker.openstack.common.gettextutils import _LE
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
from neutron.openstack.common.middleware import base from tacker.openstack.common.middleware import base
from neutron.openstack.common.notifier import api from tacker.openstack.common.notifier import api
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -21,8 +21,8 @@ request environment. The request ID is also added to API response.
import webob.dec import webob.dec
from neutron.openstack.common import context from tacker.openstack.common import context
from neutron.openstack.common.middleware import base from tacker.openstack.common.middleware import base
ENV_REQUEST_ID = 'openstack.request_id' ENV_REQUEST_ID = 'openstack.request_id'

View File

@ -21,8 +21,8 @@ from oslo.config import cfg
import webob.dec import webob.dec
import webob.exc import webob.exc
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common.middleware import base from tacker.openstack.common.middleware import base
#default request size is 112k #default request size is 112k

View File

@ -16,8 +16,8 @@ import time
from oslo.config import cfg from oslo.config import cfg
import six import six
from neutron.openstack.common.gettextutils import _, _LE, _LI from tacker.openstack.common.gettextutils import _, _LE, _LI
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
periodic_opts = [ periodic_opts = [

View File

@ -63,9 +63,9 @@ import urllib
import six import six
import urllib2 import urllib2
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common import jsonutils from tacker.openstack.common import jsonutils
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -26,8 +26,8 @@ import signal
from eventlet.green import subprocess from eventlet.green import subprocess
from eventlet import greenthread from eventlet import greenthread
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -37,15 +37,15 @@ import eventlet
from eventlet import event from eventlet import event
from oslo.config import cfg from oslo.config import cfg
from neutron.openstack.common import eventlet_backdoor from tacker.openstack.common import eventlet_backdoor
from neutron.openstack.common.gettextutils import _LE, _LI, _LW from tacker.openstack.common.gettextutils import _LE, _LI, _LW
from neutron.openstack.common import importutils from tacker.openstack.common import importutils
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
from neutron.openstack.common import systemd from tacker.openstack.common import systemd
from neutron.openstack.common import threadgroup 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 CONF = cfg.CONF
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -17,7 +17,7 @@ import ssl
from oslo.config import cfg from oslo.config import cfg
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
ssl_opts = [ ssl_opts = [

View File

@ -24,7 +24,7 @@ import unicodedata
import six import six
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
UNIT_PREFIX_EXPONENT = { UNIT_PREFIX_EXPONENT = {

View File

@ -20,7 +20,7 @@ import os
import socket import socket
import sys import sys
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -16,8 +16,8 @@ import eventlet
from eventlet import greenpool from eventlet import greenpool
from eventlet import greenthread from eventlet import greenthread
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
from neutron.openstack.common import loopingcall from tacker.openstack.common import loopingcall
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -20,8 +20,8 @@ Helpers for comparing version strings.
import functools import functools
import pkg_resources import pkg_resources
from neutron.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
from neutron.openstack.common import log as logging from tacker.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)