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