renamed cdn references in code to poppy
This commit is contained in:
parent
51433db5e0
commit
d4030bb1c6
|
@ -1,5 +1,10 @@
|
|||
[DEFAULT]
|
||||
base=cdn
|
||||
modules=context
|
||||
modules=local
|
||||
modules=log
|
||||
base=poppy
|
||||
module=context
|
||||
module=gettextutils
|
||||
module=importutils
|
||||
module=jsonutils
|
||||
module=local
|
||||
module=log
|
||||
module=strutils
|
||||
module=timeutils
|
||||
|
|
|
@ -47,7 +47,7 @@ class Bootstrap(object):
|
|||
self.conf.register_opts(_DRIVER_OPTIONS, group=_DRIVER_GROUP)
|
||||
self.driver_conf = self.conf[_DRIVER_GROUP]
|
||||
|
||||
log.setup('cdn')
|
||||
log.setup('poppy')
|
||||
|
||||
LOG.debug("init bootstrap")
|
||||
|
||||
|
@ -56,7 +56,7 @@ class Bootstrap(object):
|
|||
LOG.debug((u'Loading provider extension(s)'))
|
||||
|
||||
# create the driver manager to load the appropriate drivers
|
||||
provider_type = 'cdn.provider'
|
||||
provider_type = 'poppy.provider'
|
||||
args = [self.conf]
|
||||
|
||||
mgr = extension.ExtensionManager(namespace=provider_type,
|
||||
|
@ -69,7 +69,7 @@ class Bootstrap(object):
|
|||
LOG.debug((u'Loading storage driver'))
|
||||
|
||||
# create the driver manager to load the appropriate drivers
|
||||
storage_type = 'cdn.storage'
|
||||
storage_type = 'poppy.storage'
|
||||
storage_name = self.driver_conf.storage
|
||||
|
||||
args = [self.conf]
|
||||
|
@ -88,7 +88,7 @@ class Bootstrap(object):
|
|||
LOG.debug((u'Loading manager driver'))
|
||||
|
||||
# create the driver manager to load the appropriate drivers
|
||||
manager_type = 'cdn.manager'
|
||||
manager_type = 'poppy.manager'
|
||||
manager_name = self.driver_conf.manager
|
||||
|
||||
args = [self.conf, self.storage, self.provider]
|
||||
|
@ -107,7 +107,7 @@ class Bootstrap(object):
|
|||
LOG.debug("loading transport")
|
||||
|
||||
# create the driver manager to load the appropriate drivers
|
||||
transport_type = 'cdn.transport'
|
||||
transport_type = 'poppy.transport'
|
||||
transport_name = self.driver_conf.transport
|
||||
|
||||
args = [self.conf, self.manager]
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from cdn import bootstrap
|
||||
from poppy import bootstrap
|
||||
from poppy.common import cli
|
||||
from oslo.config import cfg
|
||||
|
||||
|
@ -24,7 +24,7 @@ def run():
|
|||
# to pick up common options from openstack.common.log, since
|
||||
# that module uses the global CONF instance exclusively.
|
||||
conf = cfg.CONF
|
||||
conf(project='cdn', prog='cdn')
|
||||
conf(project='poppy', prog='poppy')
|
||||
|
||||
server = bootstrap.Bootstrap(conf)
|
||||
server.run()
|
||||
|
|
|
@ -72,7 +72,7 @@ def runnable(func):
|
|||
_enable_echo(False)
|
||||
|
||||
try:
|
||||
logging.setup('cdn')
|
||||
logging.setup('poppy')
|
||||
func()
|
||||
except KeyboardInterrupt:
|
||||
LOG.info(_(u'Terminating'))
|
||||
|
|
|
@ -17,7 +17,7 @@ from poppy.manager import base
|
|||
|
||||
JSON_HOME = {
|
||||
"resources": {
|
||||
"rel/cdn": {
|
||||
"rel/poppy": {
|
||||
"href-template": "services{?marker,limit}",
|
||||
"href-vars": {
|
||||
"marker": "param/marker",
|
||||
|
|
|
@ -121,7 +121,7 @@ class TranslatorFactory(object):
|
|||
# module within each application.
|
||||
|
||||
# Create the global translation functions.
|
||||
_translators = TranslatorFactory('cdn')
|
||||
_translators = TranslatorFactory('poppy')
|
||||
|
||||
# The primary translation function using the well-known name "_"
|
||||
_ = _translators.primary
|
||||
|
@ -182,7 +182,7 @@ class Message(six.text_type):
|
|||
"""
|
||||
|
||||
def __new__(cls, msgid, msgtext=None, params=None,
|
||||
domain='cdn', *args):
|
||||
domain='poppy', *args):
|
||||
"""Create a new Message object.
|
||||
|
||||
In order for translation to work gettext requires a message ID, this
|
||||
|
|
|
@ -59,7 +59,7 @@ def import_module(import_str):
|
|||
|
||||
|
||||
def import_versioned_module(version, submodule=None):
|
||||
module = 'cdn.v%s' % version
|
||||
module = 'poppy.v%s' % version
|
||||
if submodule:
|
||||
module = '.'.join((module, submodule))
|
||||
return import_module(module)
|
||||
|
|
|
@ -40,6 +40,8 @@ from oslo.config import cfg
|
|||
import six
|
||||
from six import moves
|
||||
|
||||
_PY26 = sys.version_info[0:2] == (2, 6)
|
||||
|
||||
from poppy.openstack.common.gettextutils import _
|
||||
from poppy.openstack.common import importutils
|
||||
from poppy.openstack.common import jsonutils
|
||||
|
@ -227,6 +229,15 @@ class BaseLoggerAdapter(logging.LoggerAdapter):
|
|||
def audit(self, msg, *args, **kwargs):
|
||||
self.log(logging.AUDIT, msg, *args, **kwargs)
|
||||
|
||||
def isEnabledFor(self, level):
|
||||
if _PY26:
|
||||
# This method was added in python 2.7 (and it does the exact
|
||||
# same logic, so we need to do the exact same logic so that
|
||||
# python 2.6 has this capability as well).
|
||||
return self.logger.isEnabledFor(level)
|
||||
else:
|
||||
return super(BaseLoggerAdapter, self).isEnabledFor(level)
|
||||
|
||||
|
||||
class LazyAdapter(BaseLoggerAdapter):
|
||||
def __init__(self, name='unknown', version='unknown'):
|
||||
|
@ -502,7 +513,7 @@ def _setup_logging_from_conf(project, version):
|
|||
if CONF.publish_errors:
|
||||
try:
|
||||
handler = importutils.import_object(
|
||||
"cdn.openstack.common.log_handler.PublishErrorsHandler",
|
||||
"poppy.openstack.common.log_handler.PublishErrorsHandler",
|
||||
logging.ERROR)
|
||||
except ImportError:
|
||||
handler = importutils.import_object(
|
||||
|
|
|
@ -28,7 +28,7 @@ LOG = logging.getLogger(__name__)
|
|||
|
||||
CASSANDRA_OPTIONS = [
|
||||
cfg.ListOpt('cluster', help='Cassandra Cluster contact points'),
|
||||
cfg.StrOpt('keyspace', default='cdn',
|
||||
cfg.StrOpt('keyspace', default='poppy',
|
||||
help='Keyspace for all queries made in session'),
|
||||
]
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CREATE KEYSPACE cdn WITH REPLICATION = { 'class' : 'SimpleStrategy' , 'replication_factor' : 1} ;
|
||||
USE cdn;
|
||||
CREATE KEYSPACE poppy WITH REPLICATION = { 'class' : 'SimpleStrategy' , 'replication_factor' : 1} ;
|
||||
USE poppy;
|
||||
|
||||
CREATE TABLE services (
|
||||
project_id VARCHAR,
|
||||
|
|
|
@ -25,7 +25,7 @@ from oslo.config import cfg
|
|||
LOG = logging.getLogger(__name__)
|
||||
|
||||
MOCKDB_OPTIONS = [
|
||||
cfg.StrOpt('database', default='cdn',
|
||||
cfg.StrOpt('database', default='poppy',
|
||||
help='Database for all queries made in session')
|
||||
]
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ MONGODB_OPTIONS = [
|
|||
# Database name
|
||||
# TODO(kgriffs): Consider local sharding across DBs to mitigate
|
||||
# per-DB locking latency.
|
||||
cfg.StrOpt('database', default='cdn', help='Database name'),
|
||||
cfg.StrOpt('database', default='poppy', help='Database name'),
|
||||
|
||||
cfg.IntOpt('max_attempts', default=1000,
|
||||
help=('Maximum number of times to retry a failed operation.'
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
This app should be used by external WSGI
|
||||
containers. For example:
|
||||
|
||||
$ gunicorn cdn.transport.app:app
|
||||
$ gunicorn poppy.transport.app:app
|
||||
|
||||
NOTE: As for external containers, it is necessary
|
||||
to put config files in the standard paths. There's
|
||||
|
@ -28,10 +28,10 @@ to the WSGI app when it is called from other apps.
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from cdn import bootstrap
|
||||
from poppy import bootstrap
|
||||
|
||||
|
||||
conf = cfg.CONF
|
||||
conf(project='cdn', prog='cdn', args=[])
|
||||
conf(project='poppy', prog='poppy', args=[])
|
||||
|
||||
app = bootstrap.Bootstrap(conf).transport.app
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
This app should be used by external WSGI
|
||||
containers. For example:
|
||||
|
||||
$ gunicorn cdn.transport.falcon.app:app
|
||||
$ gunicorn poppy.transport.falcon.app:app
|
||||
|
||||
NOTE: As for external containers, it is necessary
|
||||
to put config files in the standard paths. There's
|
||||
|
@ -26,10 +26,11 @@ no common way to specify / pass configuration files
|
|||
to the WSGI app when it is called from other apps.
|
||||
"""
|
||||
|
||||
from cdn import bootstrap
|
||||
from oslo.config import cfg
|
||||
|
||||
from poppy import bootstrap
|
||||
|
||||
conf = cfg.CONF
|
||||
conf(project='cdn', prog='cdn', args=[])
|
||||
conf(project='poppy', prog='poppy', args=[])
|
||||
|
||||
app = bootstrap.Bootstrap(conf).transport.app
|
||||
|
|
|
@ -21,7 +21,7 @@ from oslo.config import cfg
|
|||
import six
|
||||
|
||||
import poppy.openstack.common.log as logging
|
||||
from cdn import transport
|
||||
from poppy import transport
|
||||
from poppy.transport.falcon import (
|
||||
v1, services
|
||||
)
|
||||
|
|
|
@ -19,7 +19,7 @@ import json
|
|||
# NOTE(amitgandhinz): http://tools.ietf.org/html/draft-nottingham-json-home-03
|
||||
JSON_HOME = {
|
||||
"resources": {
|
||||
"rel/cdn": {
|
||||
"rel/poppy": {
|
||||
"href-template": "services{?marker,limit}",
|
||||
"href-vars": {
|
||||
"marker": "param/marker",
|
||||
|
|
|
@ -19,7 +19,7 @@ from oslo.config import cfg
|
|||
import pecan
|
||||
|
||||
from poppy.openstack.common import log
|
||||
from cdn import transport
|
||||
from poppy import transport
|
||||
from poppy.transport.pecan import controllers
|
||||
from poppy.transport.pecan import hooks
|
||||
|
||||
|
|
|
@ -17,4 +17,4 @@ import pbr.packaging
|
|||
import pbr.version
|
||||
|
||||
|
||||
version_info = pbr.version.VersionInfo('cdn')
|
||||
version_info = pbr.version.VersionInfo('poppy')
|
||||
|
|
26
setup.cfg
26
setup.cfg
|
@ -1,7 +1,7 @@
|
|||
[metadata]
|
||||
name = cdn
|
||||
name = poppy
|
||||
version = 2014.2
|
||||
summary = CDN Service
|
||||
summary = Poppy is an OpenStack related project to provide a generic and modular vendor-neutral API that wraps provisioning instructions for CDN vendors that support it.
|
||||
description-file =
|
||||
README.rst
|
||||
author = OpenStack
|
||||
|
@ -20,7 +20,7 @@ classifier =
|
|||
|
||||
[files]
|
||||
packages =
|
||||
cdn
|
||||
poppy
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
|
@ -29,23 +29,23 @@ source-dir = doc/source
|
|||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
cdn-server = cdn.cmd.server:run
|
||||
cdn-server = poppy.cmd.server:run
|
||||
|
||||
cdn.transport =
|
||||
falcon = cdn.transport.falcon:Driver
|
||||
pecan = cdn.transport.pecan:Driver
|
||||
falcon = poppy.transport.falcon:Driver
|
||||
pecan = poppy.transport.pecan:Driver
|
||||
|
||||
cdn.manager =
|
||||
default = cdn.manager.default:Driver
|
||||
default = poppy.manager.default:Driver
|
||||
|
||||
cdn.storage =
|
||||
mongodb = cdn.storage.mongodb:Driver
|
||||
cassandra = cdn.storage.cassandra:Driver
|
||||
mockdb = cdn.storage.mockdb:Driver
|
||||
mongodb = poppy.storage.mongodb:Driver
|
||||
cassandra = poppy.storage.cassandra:Driver
|
||||
mockdb = poppy.storage.mockdb:Driver
|
||||
|
||||
cdn.provider =
|
||||
fastly = cdn.provider.fastly:Driver
|
||||
mock = cdn.provider.mock:Driver
|
||||
fastly = poppy.provider.fastly:Driver
|
||||
mock = poppy.provider.mock:Driver
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
|
@ -56,7 +56,7 @@ verbosity=2
|
|||
|
||||
with-doctest = true
|
||||
|
||||
cover-package = cdn
|
||||
cover-package = poppy
|
||||
cover-html = true
|
||||
cover-erase = true
|
||||
cover-inclusive = true
|
||||
|
|
Loading…
Reference in New Issue