Rename Moniker -> Designate
Change-Id: I4b9c7b277a524058408d5c551bb51531e9a3949c
This commit is contained in:
parent
ea765d52ef
commit
193085cf56
6
.gitignore
vendored
6
.gitignore
vendored
@ -12,13 +12,13 @@ venv
|
||||
*.sublime-workspace
|
||||
*.sqlite
|
||||
var/*
|
||||
etc/moniker/*.conf
|
||||
etc/moniker/*.ini
|
||||
etc/designate/*.conf
|
||||
etc/designate/*.ini
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
doc/source/api/*
|
||||
doc/build/*
|
||||
dist
|
||||
moniker/versioninfo
|
||||
designate/versioninfo
|
||||
*.orig
|
||||
/bind9
|
||||
|
12
MANIFEST.in
12
MANIFEST.in
@ -1,12 +1,12 @@
|
||||
include AUTHORS
|
||||
include ChangeLog
|
||||
include moniker/versioninfo
|
||||
include designate/versioninfo
|
||||
include *.txt *.ini *.cfg *.rst *.md
|
||||
include etc/moniker/*.sample
|
||||
include etc/moniker/policy.json
|
||||
include moniker/storage/impl_sqlalchemy/migrate_repo/migrate.cfg
|
||||
include moniker/backend/impl_powerdns/migrate_repo/migrate.cfg
|
||||
recursive-include moniker/resources *
|
||||
include etc/designate/*.sample
|
||||
include etc/designate/policy.json
|
||||
include designate/storage/impl_sqlalchemy/migrate_repo/migrate.cfg
|
||||
include designate/backend/impl_powerdns/migrate_repo/migrate.cfg
|
||||
recursive-include designate/resources *
|
||||
recursive-include tools *
|
||||
|
||||
exclude .gitignore
|
||||
|
@ -1,13 +1,13 @@
|
||||
# Introduction
|
||||
|
||||
Moniker is an OpenStack inspired DNSaaS.
|
||||
Designate is an OpenStack inspired DNSaaS.
|
||||
|
||||
Docs: http://moniker.rtfd.org and some below for now.
|
||||
Bugs / Blueprints: http://launchpad.net/moniker
|
||||
Docs: http://designate.rtfd.org and some below for now.
|
||||
Bugs / Blueprints: http://launchpad.net/designate
|
||||
|
||||
IRC: #openstack-dns
|
||||
|
||||
Installation: http://moniker.readthedocs.org/en/latest/install.html
|
||||
Installation: http://designate.readthedocs.org/en/latest/install.html
|
||||
|
||||
# TODOs:
|
||||
|
||||
|
@ -16,17 +16,17 @@
|
||||
# under the License.
|
||||
import sys
|
||||
import eventlet
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import service
|
||||
from moniker import utils
|
||||
from moniker.agent import service as agent_service
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import service
|
||||
from designate import utils
|
||||
from designate.agent import service as agent_service
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
utils.read_config('moniker', sys.argv)
|
||||
utils.read_config('designate', sys.argv)
|
||||
|
||||
logging.setup('moniker')
|
||||
logging.setup('designate')
|
||||
|
||||
launcher = service.launch(agent_service.Service(),
|
||||
cfg.CONF['service:agent'].workers)
|
@ -16,17 +16,17 @@
|
||||
# under the License.
|
||||
import sys
|
||||
import eventlet
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import service
|
||||
from moniker import utils
|
||||
from moniker.api import service as api_service
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import service
|
||||
from designate import utils
|
||||
from designate.api import service as api_service
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
utils.read_config('moniker', sys.argv)
|
||||
utils.read_config('designate', sys.argv)
|
||||
|
||||
logging.setup('moniker')
|
||||
logging.setup('designate')
|
||||
|
||||
launcher = service.launch(api_service.Service(),
|
||||
cfg.CONF['service:api'].workers)
|
@ -16,17 +16,17 @@
|
||||
# under the License.
|
||||
import sys
|
||||
import eventlet
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import service
|
||||
from moniker import utils
|
||||
from moniker.central import service as central_service
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import service
|
||||
from designate import utils
|
||||
from designate.central import service as central_service
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
utils.read_config('moniker', sys.argv)
|
||||
utils.read_config('designate', sys.argv)
|
||||
|
||||
logging.setup('moniker')
|
||||
logging.setup('designate')
|
||||
|
||||
launcher = service.launch(central_service.Service(),
|
||||
cfg.CONF['service:central'].workers)
|
@ -15,11 +15,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import sys
|
||||
from moniker import utils
|
||||
from moniker.manage import MonikerShell
|
||||
from designate import utils
|
||||
from designate.manage import DesignateShell
|
||||
|
||||
# TODO: Sypport passing --config-file and --config-dir to read_config
|
||||
utils.read_config('moniker', [])
|
||||
utils.read_config('designate', [])
|
||||
|
||||
shell = MonikerShell()
|
||||
shell = DesignateShell()
|
||||
sys.exit(shell.run(sys.argv[1:]))
|
@ -20,11 +20,11 @@
|
||||
|
||||
Filters which commands a service is allowed to run as another user.
|
||||
|
||||
To use this with moniker, you should set the following in moniker.conf:
|
||||
rootwrap_config=/etc/moniker/rootwrap.conf
|
||||
To use this with designate, you should set the following in designate.conf:
|
||||
rootwrap_config=/etc/designate/rootwrap.conf
|
||||
|
||||
You also need to let the moniker user run moniker-rootwrap as root in sudoers:
|
||||
moniker ALL = (root) NOPASSWD: /usr/bin/moniker-rootwrap /etc/moniker/rootwrap.conf *
|
||||
You also need to let the designate user run designate-rootwrap as root in sudoers:
|
||||
designate ALL = (root) NOPASSWD: /usr/bin/designate-rootwrap /etc/designate/rootwrap.conf *
|
||||
|
||||
Service packaging should deploy .filters files only on nodes where they are
|
||||
needed, to avoid allowing more than is necessary.
|
||||
@ -70,10 +70,10 @@ if __name__ == '__main__':
|
||||
# Add ../ to sys.path to allow running from branch
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(execname),
|
||||
os.pardir, os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, "moniker", "__init__.py")):
|
||||
if os.path.exists(os.path.join(possible_topdir, "designate", "__init__.py")):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
from moniker.openstack.common.rootwrap import wrapper
|
||||
from designate.openstack.common.rootwrap import wrapper
|
||||
|
||||
# Load configuration
|
||||
try:
|
@ -16,17 +16,17 @@
|
||||
# under the License.
|
||||
import sys
|
||||
import eventlet
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import service
|
||||
from moniker import utils
|
||||
from moniker.sink import service as sink_service
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import service
|
||||
from designate import utils
|
||||
from designate.sink import service as sink_service
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
utils.read_config('moniker', sys.argv)
|
||||
utils.read_config('designate', sys.argv)
|
||||
|
||||
logging.setup('moniker')
|
||||
logging.setup('designate')
|
||||
|
||||
launcher = service.launch(sink_service.Service(),
|
||||
cfg.CONF['service:sink'].workers)
|
@ -15,8 +15,8 @@
|
||||
# under the License.
|
||||
import os
|
||||
import socket
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import rpc
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import rpc
|
||||
|
||||
cfg.CONF.register_opts([
|
||||
cfg.StrOpt('host', default=socket.gethostname(),
|
||||
@ -26,11 +26,11 @@ cfg.CONF.register_opts([
|
||||
'../')),
|
||||
help='Directory where the nova python module is installed'),
|
||||
cfg.StrOpt('state-path', default='$pybasedir',
|
||||
help='Top-level directory for maintaining moniker\'s state'),
|
||||
help='Top-level directory for maintaining designate\'s state'),
|
||||
|
||||
|
||||
cfg.StrOpt('central-topic', default='central', help='Central Topic'),
|
||||
cfg.StrOpt('agent-topic', default='agent', help='Agent Topic'),
|
||||
])
|
||||
|
||||
rpc.set_defaults(control_exchange='moniker')
|
||||
rpc.set_defaults(control_exchange='designate')
|
@ -13,7 +13,7 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import cfg
|
||||
from designate.openstack.common import cfg
|
||||
|
||||
cfg.CONF.register_group(cfg.OptGroup(
|
||||
name='service:agent', title="Configuration for Agent Service"
|
@ -13,9 +13,9 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common.rpc import proxy as rpc_proxy
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common.rpc import proxy as rpc_proxy
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -13,11 +13,11 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common.rpc import service as rpc_service
|
||||
from moniker import backend
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common.rpc import service as rpc_service
|
||||
from designate import backend
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
central_api = central_rpcapi.CentralAPI()
|
@ -14,8 +14,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import jsonutils as json
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import jsonutils as json
|
||||
|
||||
cfg.CONF.register_group(cfg.OptGroup(
|
||||
name='service:api', title="Configuration for API Service"
|
||||
@ -29,7 +29,7 @@ cfg.CONF.register_opts([
|
||||
cfg.IntOpt('api_port', default=9001,
|
||||
help='API Port Number'),
|
||||
cfg.StrOpt('api_paste_config', default='api-paste.ini',
|
||||
help='File name for the paste.deploy config for moniker-api'),
|
||||
help='File name for the paste.deploy config for designate-api'),
|
||||
cfg.StrOpt('auth_strategy', default='noauth',
|
||||
help='The strategy to use for auth. Supports noauth or '
|
||||
'keystone'),
|
@ -13,12 +13,12 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import local
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import uuidutils
|
||||
from moniker import wsgi
|
||||
from moniker.context import MonikerContext
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import local
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import uuidutils
|
||||
from designate import wsgi
|
||||
from designate.context import DesignateContext
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -45,7 +45,7 @@ class KeystoneContextMiddleware(wsgi.Middleware):
|
||||
|
||||
roles = headers.get('X-Roles').split(',')
|
||||
|
||||
context = MonikerContext(auth_tok=headers.get('X-Auth-Token'),
|
||||
context = DesignateContext(auth_tok=headers.get('X-Auth-Token'),
|
||||
user=headers.get('X-User-ID'),
|
||||
tenant=headers.get('X-Tenant-ID'),
|
||||
roles=roles)
|
||||
@ -54,7 +54,7 @@ class KeystoneContextMiddleware(wsgi.Middleware):
|
||||
local.store.context = context
|
||||
|
||||
# Attempt to sudo, if requested.
|
||||
sudo_tenant_id = headers.get('X-Moniker-Sudo-Tenant-ID', None)
|
||||
sudo_tenant_id = headers.get('X-Designate-Sudo-Tenant-ID', None)
|
||||
|
||||
if sudo_tenant_id and (uuidutils.is_uuid_like(sudo_tenant_id)
|
||||
or sudo_tenant_id.isdigit()):
|
||||
@ -68,7 +68,7 @@ class NoAuthContextMiddleware(wsgi.Middleware):
|
||||
def process_request(self, request):
|
||||
# NOTE(kiall): This makes the assumption that disabling authentication
|
||||
# means you wish to allow full access to everyone.
|
||||
context = MonikerContext(is_admin=True)
|
||||
context = DesignateContext(is_admin=True)
|
||||
|
||||
# Store the context where oslo-log exepcts to find it.
|
||||
local.store.context = context
|
@ -14,12 +14,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from paste import deploy
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import wsgi
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker import exceptions
|
||||
from moniker import utils
|
||||
from moniker import policy
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import wsgi
|
||||
from designate.openstack.common import cfg
|
||||
from designate import exceptions
|
||||
from designate import utils
|
||||
from designate import policy
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -20,13 +20,13 @@ from stevedore import named
|
||||
from werkzeug import exceptions as wexceptions
|
||||
from werkzeug.routing import BaseConverter
|
||||
from werkzeug.routing import ValidationError
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import jsonutils as json
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import uuidutils
|
||||
from moniker.openstack.common.rpc import common as rpc_common
|
||||
from moniker import exceptions
|
||||
from moniker import wsgi
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import jsonutils as json
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import uuidutils
|
||||
from designate.openstack.common.rpc import common as rpc_common
|
||||
from designate import exceptions
|
||||
from designate import wsgi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -37,7 +37,7 @@ cfg.CONF.register_opts([
|
||||
|
||||
|
||||
def factory(global_config, **local_conf):
|
||||
app = flask.Flask('moniker.api.v1')
|
||||
app = flask.Flask('designate.api.v1')
|
||||
app.config.update(
|
||||
PROPAGATE_EXCEPTIONS=True
|
||||
)
|
||||
@ -70,14 +70,14 @@ def factory(global_config, **local_conf):
|
||||
app.register_blueprint(ext.plugin)
|
||||
|
||||
# Add all in-built APIs
|
||||
mgr = extension.ExtensionManager('moniker.api.v1')
|
||||
mgr = extension.ExtensionManager('designate.api.v1')
|
||||
mgr.map(_register_blueprint)
|
||||
|
||||
# Add any (enabled) optional extensions
|
||||
extensions = cfg.CONF['service:api'].enabled_extensions_v1
|
||||
|
||||
if len(extensions) > 0:
|
||||
extmgr = named.NamedExtensionManager('moniker.api.v1.extensions',
|
||||
extmgr = named.NamedExtensionManager('designate.api.v1.extensions',
|
||||
names=extensions)
|
||||
extmgr.map(_register_blueprint)
|
||||
|
||||
@ -103,7 +103,7 @@ class FaultWrapperMiddleware(wsgi.Middleware):
|
||||
try:
|
||||
return request.get_response(self.application)
|
||||
except exceptions.Base, e:
|
||||
# Handle Moniker Exceptions
|
||||
# Handle Designate Exceptions
|
||||
status = e.error_code if hasattr(e, 'error_code') else 500
|
||||
|
||||
# Start building up a response
|
@ -14,9 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import schema
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import schema
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
central_api = central_rpcapi.CentralAPI()
|
@ -14,8 +14,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import rpc
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import rpc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
blueprint = flask.Blueprint('diagnostics', __name__)
|
@ -14,8 +14,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
central_api = central_rpcapi.CentralAPI()
|
@ -14,8 +14,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
central_api = central_rpcapi.CentralAPI()
|
@ -14,9 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import schema
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import schema
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
central_api = central_rpcapi.CentralAPI()
|
@ -14,9 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import schema
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import schema
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
central_api = central_rpcapi.CentralAPI()
|
@ -14,9 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import schema
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import schema
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
central_api = central_rpcapi.CentralAPI()
|
@ -14,9 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import flask
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import schema
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import schema
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
central_api = central_rpcapi.CentralAPI()
|
@ -17,7 +17,7 @@ import flask
|
||||
|
||||
|
||||
def factory(global_config, **local_conf):
|
||||
app = flask.Flask('moniker.api.versions')
|
||||
app = flask.Flask('designate.api.versions')
|
||||
|
||||
@app.route('/', methods=['GET'])
|
||||
def version_list():
|
@ -13,8 +13,8 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.plugin import Plugin
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.plugin import Plugin
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -14,10 +14,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import abc
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import exceptions
|
||||
from moniker.context import MonikerContext
|
||||
from moniker.plugin import Plugin
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import exceptions
|
||||
from designate.context import DesignateContext
|
||||
from designate.plugin import Plugin
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -26,12 +26,12 @@ LOG = logging.getLogger(__name__)
|
||||
class Backend(Plugin):
|
||||
""" Base class for backend implementations """
|
||||
__plugin_type__ = 'backend'
|
||||
__plugin_ns__ = 'moniker.backend'
|
||||
__plugin_ns__ = 'designate.backend'
|
||||
|
||||
def __init__(self, central_service):
|
||||
super(Backend, self).__init__()
|
||||
self.central_service = central_service
|
||||
self.admin_context = MonikerContext.get_admin_context()
|
||||
self.admin_context = DesignateContext.get_admin_context()
|
||||
|
||||
def create_tsigkey(self, context, tsigkey):
|
||||
""" Create a TSIG Key """
|
@ -14,10 +14,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import os
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import utils
|
||||
from moniker.backend import base
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import utils
|
||||
from designate.backend import base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -16,10 +16,10 @@
|
||||
import os
|
||||
import glob
|
||||
import shutil
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import utils
|
||||
from moniker.backend import base
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import utils
|
||||
from designate.backend import base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -13,8 +13,8 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.backend import base
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.backend import base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -16,14 +16,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import os
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import utils
|
||||
from moniker.backend import base
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import utils
|
||||
from designate.backend import base
|
||||
from sqlalchemy.ext.sqlsoup import SqlSoup
|
||||
from sqlalchemy.engine.url import _parse_rfc1738_args
|
||||
from moniker.sqlalchemy.session import get_engine
|
||||
from moniker.sqlalchemy.session import SQLOPTS
|
||||
from designate.sqlalchemy.session import get_engine
|
||||
from designate.sqlalchemy.session import SQLOPTS
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -90,11 +90,11 @@ class MySQLBind9Backend(base.Backend):
|
||||
domain['minimum'])
|
||||
|
||||
# use the domain id for records that don't have a match
|
||||
# in moniker's records table
|
||||
# in designate's records table
|
||||
table.insert(
|
||||
tenant_id=domain['tenant_id'],
|
||||
domain_id=domain['id'],
|
||||
moniker_rec_id=domain['id'],
|
||||
designate_rec_id=domain['id'],
|
||||
name=domain['name'],
|
||||
ttl=domain['ttl'],
|
||||
type='SOA',
|
||||
@ -108,12 +108,12 @@ class MySQLBind9Backend(base.Backend):
|
||||
table = self.get_dns_table()
|
||||
|
||||
# use the domain id for records that don't have a match
|
||||
# in moniker's records table
|
||||
# in designate's records table
|
||||
for server in servers:
|
||||
table.insert(
|
||||
tenant_id=domain['tenant_id'],
|
||||
domain_id=domain['id'],
|
||||
moniker_rec_id=domain['id'],
|
||||
designate_rec_id=domain['id'],
|
||||
name=domain['name'],
|
||||
ttl=domain['ttl'],
|
||||
type='NS',
|
||||
@ -129,7 +129,7 @@ class MySQLBind9Backend(base.Backend):
|
||||
table.insert(
|
||||
tenant_id=tenant_id,
|
||||
domain_id=domain_id,
|
||||
moniker_rec_id=record['id'],
|
||||
designate_rec_id=record['id'],
|
||||
name=record['name'],
|
||||
ttl=record['ttl'],
|
||||
type=record['type'],
|
||||
@ -164,7 +164,7 @@ class MySQLBind9Backend(base.Backend):
|
||||
q = table.filter_by(
|
||||
tenant_id=tenant_id,
|
||||
domain_id=record['domain_id'],
|
||||
moniker_rec_id=record['id'])
|
||||
designate_rec_id=record['id'])
|
||||
|
||||
q.update({'ttl': record['ttl'],
|
||||
'type': record['type'],
|
||||
@ -221,7 +221,7 @@ class MySQLBind9Backend(base.Backend):
|
||||
q = table.filter_by(
|
||||
tenant_id=tenant_id,
|
||||
domain_id=record['domain_id'],
|
||||
moniker_rec_id=record['id'])
|
||||
designate_rec_id=record['id'])
|
||||
|
||||
q.delete()
|
||||
|
@ -19,14 +19,14 @@ import base64
|
||||
from sqlalchemy.sql import select
|
||||
from sqlalchemy.sql.expression import null
|
||||
from sqlalchemy.orm import exc as sqlalchemy_exceptions
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import exceptions
|
||||
from moniker.backend import base
|
||||
from moniker.backend.impl_powerdns import models
|
||||
from moniker.sqlalchemy.session import get_session
|
||||
from moniker.sqlalchemy.session import SQLOPTS
|
||||
from moniker.sqlalchemy.expressions import InsertFromSelect
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import exceptions
|
||||
from designate.backend import base
|
||||
from designate.backend.impl_powerdns import models
|
||||
from designate.sqlalchemy.session import get_session
|
||||
from designate.sqlalchemy.session import SQLOPTS
|
||||
from designate.sqlalchemy.expressions import InsertFromSelect
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
TSIG_SUPPORTED_ALGORITHMS = ['hmac-md5']
|
||||
@ -60,7 +60,7 @@ class PowerDNSBackend(base.Backend):
|
||||
tsigkey_m = models.TsigKey()
|
||||
|
||||
tsigkey_m.update({
|
||||
'moniker_id': tsigkey['id'],
|
||||
'designate_id': tsigkey['id'],
|
||||
'name': tsigkey['name'],
|
||||
'algorithm': tsigkey['algorithm'],
|
||||
'secret': base64.b64encode(tsigkey['secret'])
|
||||
@ -120,7 +120,7 @@ class PowerDNSBackend(base.Backend):
|
||||
|
||||
domain_m = models.Domain()
|
||||
domain_m.update({
|
||||
'moniker_id': domain['id'],
|
||||
'designate_id': domain['id'],
|
||||
'name': domain['name'].rstrip('.'),
|
||||
'master': servers[0]['name'].rstrip('.'),
|
||||
'type': cfg.CONF['backend:powerdns'].domain_type,
|
||||
@ -131,7 +131,7 @@ class PowerDNSBackend(base.Backend):
|
||||
for server in servers:
|
||||
record_m = models.Record()
|
||||
record_m.update({
|
||||
'moniker_id': server['id'],
|
||||
'designate_id': server['id'],
|
||||
'domain_id': domain_m.id,
|
||||
'name': domain['name'].rstrip('.'),
|
||||
'type': 'NS',
|
||||
@ -154,7 +154,7 @@ class PowerDNSBackend(base.Backend):
|
||||
# before the NS records are in place.
|
||||
record_m = models.Record()
|
||||
record_m.update({
|
||||
'moniker_id': domain['id'],
|
||||
'designate_id': domain['id'],
|
||||
'domain_id': domain_m.id,
|
||||
'name': domain['name'].rstrip('.'),
|
||||
'type': 'SOA',
|
||||
@ -186,7 +186,7 @@ class PowerDNSBackend(base.Backend):
|
||||
record_m = models.Record()
|
||||
|
||||
record_m.update({
|
||||
'moniker_id': record['id'],
|
||||
'designate_id': record['id'],
|
||||
'domain_id': domain_m.id,
|
||||
'name': record['name'].rstrip('.'),
|
||||
'type': record['type'],
|
||||
@ -287,7 +287,7 @@ class PowerDNSBackend(base.Backend):
|
||||
query = self.session.query(models.TsigKey)
|
||||
|
||||
try:
|
||||
tsigkey = query.filter_by(moniker_id=tsigkey_id).one()
|
||||
tsigkey = query.filter_by(designate_id=tsigkey_id).one()
|
||||
except sqlalchemy_exceptions.NoResultFound:
|
||||
raise exceptions.TsigKeyNotFound('No tsigkey found')
|
||||
except sqlalchemy_exceptions.MultipleResultsFound:
|
||||
@ -299,7 +299,7 @@ class PowerDNSBackend(base.Backend):
|
||||
query = self.session.query(models.Domain)
|
||||
|
||||
try:
|
||||
domain = query.filter_by(moniker_id=domain_id).one()
|
||||
domain = query.filter_by(designate_id=domain_id).one()
|
||||
except sqlalchemy_exceptions.NoResultFound:
|
||||
raise exceptions.DomainNotFound('No domain found')
|
||||
except sqlalchemy_exceptions.MultipleResultsFound:
|
||||
@ -311,7 +311,7 @@ class PowerDNSBackend(base.Backend):
|
||||
query = self.session.query(models.Record)
|
||||
|
||||
if record_id:
|
||||
query = query.filter_by(moniker_id=record_id)
|
||||
query = query.filter_by(designate_id=record_id)
|
||||
|
||||
if type:
|
||||
query = query.filter_by(type=type)
|
4
designate/backend/impl_powerdns/migrate_repo/README
Normal file
4
designate/backend/impl_powerdns/migrate_repo/README
Normal file
@ -0,0 +1,4 @@
|
||||
This is a database migration repository for the project Designate.
|
||||
|
||||
More information at
|
||||
http://code.google.com/p/sqlalchemy-migrate/
|
@ -1,7 +1,7 @@
|
||||
[db_settings]
|
||||
# Used to identify which repository this database is versioned under.
|
||||
# You can use the name of your project.
|
||||
repository_id=MonikerPowerDNS
|
||||
repository_id=DesignatePowerDNS
|
||||
|
||||
# The name of the database table used to track the schema version.
|
||||
# This name shouldn't already be used by your project.
|
@ -14,7 +14,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from sqlalchemy import MetaData, Table, Column
|
||||
from moniker.sqlalchemy.types import UUID
|
||||
from designate.sqlalchemy.types import UUID
|
||||
|
||||
meta = MetaData()
|
||||
|
||||
@ -26,14 +26,14 @@ def upgrade(migrate_engine):
|
||||
domains_table = Table('domains', meta, autoload=True)
|
||||
records_table = Table('records', meta, autoload=True)
|
||||
|
||||
tsigkeys_moniker_id = Column('moniker_id', UUID())
|
||||
tsigkeys_moniker_id.create(tsigkeys_table)
|
||||
tsigkeys_designate_id = Column('designate_id', UUID())
|
||||
tsigkeys_designate_id.create(tsigkeys_table)
|
||||
|
||||
domains_moniker_id = Column('moniker_id', UUID())
|
||||
domains_moniker_id.create(domains_table)
|
||||
domains_designate_id = Column('designate_id', UUID())
|
||||
domains_designate_id.create(domains_table)
|
||||
|
||||
records_moniker_id = Column('moniker_id', UUID())
|
||||
records_moniker_id.create(records_table)
|
||||
records_designate_id = Column('designate_id', UUID())
|
||||
records_designate_id.create(records_table)
|
||||
|
||||
|
||||
def downgrade(migrate_engine):
|
||||
@ -43,11 +43,11 @@ def downgrade(migrate_engine):
|
||||
domains_table = Table('domains', meta, autoload=True)
|
||||
records_table = Table('records', meta, autoload=True)
|
||||
|
||||
tsigkeys_moniker_id = Column('moniker_id', UUID())
|
||||
tsigkeys_moniker_id.drop(tsigkeys_table)
|
||||
tsigkeys_designate_id = Column('designate_id', UUID())
|
||||
tsigkeys_designate_id.drop(tsigkeys_table)
|
||||
|
||||
domains_moniker_id = Column('moniker_id', UUID())
|
||||
domains_moniker_id.drop(domains_table)
|
||||
domains_designate_id = Column('designate_id', UUID())
|
||||
domains_designate_id.drop(domains_table)
|
||||
|
||||
records_moniker_id = Column('moniker_id', UUID())
|
||||
records_moniker_id.drop(records_table)
|
||||
records_designate_id = Column('designate_id', UUID())
|
||||
records_designate_id.drop(records_table)
|
@ -17,8 +17,8 @@
|
||||
# under the License.
|
||||
from sqlalchemy import Column, String, Text, Integer, Boolean
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from moniker.sqlalchemy.models import Base as CommonBase
|
||||
from moniker.sqlalchemy.types import UUID
|
||||
from designate.sqlalchemy.models import Base as CommonBase
|
||||
from designate.sqlalchemy.types import UUID
|
||||
|
||||
|
||||
class Base(CommonBase):
|
||||
@ -31,7 +31,7 @@ Base = declarative_base(cls=Base)
|
||||
class TsigKey(Base):
|
||||
__tablename__ = 'tsigkeys'
|
||||
|
||||
moniker_id = Column(UUID, nullable=False)
|
||||
designate_id = Column(UUID, nullable=False)
|
||||
|
||||
name = Column(String(255), default=None, nullable=True)
|
||||
algorithm = Column(String(255), default=None, nullable=True)
|
||||
@ -49,7 +49,7 @@ class DomainMetadata(Base):
|
||||
class Domain(Base):
|
||||
__tablename__ = 'domains'
|
||||
|
||||
moniker_id = Column(UUID, nullable=False)
|
||||
designate_id = Column(UUID, nullable=False)
|
||||
|
||||
name = Column(String(255), nullable=False, unique=True)
|
||||
master = Column(String(255), nullable=True)
|
||||
@ -62,7 +62,7 @@ class Domain(Base):
|
||||
class Record(Base):
|
||||
__tablename__ = 'records'
|
||||
|
||||
moniker_id = Column(UUID, nullable=False)
|
||||
designate_id = Column(UUID, nullable=False)
|
||||
|
||||
domain_id = Column(Integer, default=None, nullable=True)
|
||||
name = Column(String(255), default=None, nullable=True)
|
@ -13,8 +13,8 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.backend import base
|
||||
from moniker.agent import rpcapi as agent_rpcapi
|
||||
from designate.backend import base
|
||||
from designate.agent import rpcapi as agent_rpcapi
|
||||
|
||||
agent_api = agent_rpcapi.AgentAPI()
|
||||
|
@ -13,7 +13,7 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import cfg
|
||||
from designate.openstack.common import cfg
|
||||
|
||||
# NOTE(kiall): See http://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
||||
# Version 2013031800.
|
@ -13,9 +13,9 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common.rpc import proxy as rpc_proxy
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common.rpc import proxy as rpc_proxy
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -14,15 +14,15 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import re
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common.rpc import service as rpc_service
|
||||
from moniker import exceptions
|
||||
from moniker import policy
|
||||
from moniker import storage
|
||||
from moniker import quota
|
||||
from moniker import utils
|
||||
from moniker import backend
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common.rpc import service as rpc_service
|
||||
from designate import exceptions
|
||||
from designate import policy
|
||||
from designate import storage
|
||||
from designate import quota
|
||||
from designate import utils
|
||||
from designate import backend
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -14,18 +14,18 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import itertools
|
||||
from moniker.openstack.common import context
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker import policy
|
||||
from designate.openstack.common import context
|
||||
from designate.openstack.common import log as logging
|
||||
from designate import policy
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MonikerContext(context.RequestContext):
|
||||
class DesignateContext(context.RequestContext):
|
||||
def __init__(self, auth_tok=None, user=None, tenant=None, is_admin=False,
|
||||
read_only=False, show_deleted=False, request_id=None,
|
||||
roles=[]):
|
||||
super(MonikerContext, self).__init__(
|
||||
super(DesignateContext, self).__init__(
|
||||
auth_tok=auth_tok,
|
||||
user=user,
|
||||
tenant=tenant,
|
||||
@ -58,7 +58,7 @@ class MonikerContext(context.RequestContext):
|
||||
% (self.user_id, tenant_id))
|
||||
|
||||
def to_dict(self):
|
||||
d = super(MonikerContext, self).to_dict()
|
||||
d = super(DesignateContext, self).to_dict()
|
||||
|
||||
d.update({
|
||||
'user_id': self.user_id,
|
||||
@ -106,7 +106,7 @@ class MonikerContext(context.RequestContext):
|
||||
@classmethod
|
||||
def get_context_from_function_and_args(cls, function, args, kwargs):
|
||||
"""
|
||||
Find an arg of type MonikerContext and return it.
|
||||
Find an arg of type DesignateContext and return it.
|
||||
|
||||
This is useful in a couple of decorators where we don't
|
||||
know much about the function we're wrapping.
|
@ -15,15 +15,15 @@
|
||||
# under the License.
|
||||
from cliff.app import App
|
||||
from cliff.commandmanager import CommandManager
|
||||
from moniker.version import version_info as version
|
||||
from designate.version import version_info as version
|
||||
|
||||
|
||||
class MonikerShell(App):
|
||||
class DesignateShell(App):
|
||||
CONSOLE_MESSAGE_FORMAT = '%(levelname)s: %(message)s'
|
||||
|
||||
def __init__(self):
|
||||
super(MonikerShell, self).__init__(
|
||||
description='Moniker Server Side Management CLI',
|
||||
super(DesignateShell, self).__init__(
|
||||
description='Designate Server Side Management CLI',
|
||||
version=version.version_string(),
|
||||
command_manager=CommandManager('moniker.manage')
|
||||
command_manager=CommandManager('designate.manage')
|
||||
)
|
@ -15,15 +15,15 @@
|
||||
# under the License.
|
||||
import abc
|
||||
from cliff.command import Command as CliffCommand
|
||||
from moniker.context import MonikerContext
|
||||
from designate.context import DesignateContext
|
||||
|
||||
|
||||
class Command(CliffCommand):
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
def run(self, parsed_args):
|
||||
self.context = MonikerContext.get_admin_context(
|
||||
request_id="moniker-manage")
|
||||
self.context = DesignateContext.get_admin_context(
|
||||
request_id="designate-manage")
|
||||
|
||||
return super(Command, self).run(parsed_args)
|
||||
|
@ -17,15 +17,15 @@ import os
|
||||
from migrate.exceptions import (DatabaseAlreadyControlledError,
|
||||
DatabaseNotControlledError)
|
||||
from migrate.versioning import api as versioning_api
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.manage import base
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import cfg
|
||||
from designate.manage import base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
REPOSITORY = os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
|
||||
'storage', 'impl_sqlalchemy',
|
||||
'migrate_repo'))
|
||||
cfg.CONF.import_opt('database_connection', 'moniker.storage.impl_sqlalchemy',
|
||||
cfg.CONF.import_opt('database_connection', 'designate.storage.impl_sqlalchemy',
|
||||
group='storage:sqlalchemy')
|
||||
|
||||
|
@ -16,15 +16,15 @@
|
||||
import os
|
||||
from migrate.exceptions import DatabaseAlreadyControlledError
|
||||
from migrate.versioning import api as versioning_api
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.manage import base
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import cfg
|
||||
from designate.manage import base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
REPOSITORY = os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
|
||||
'backend', 'impl_powerdns',
|
||||
'migrate_repo'))
|
||||
cfg.CONF.import_opt('database_connection', 'moniker.backend.impl_powerdns',
|
||||
cfg.CONF.import_opt('database_connection', 'designate.backend.impl_powerdns',
|
||||
group='backend:powerdns')
|
||||
|
||||
|
@ -15,11 +15,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import abc
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.central import rpcapi as central_rpcapi
|
||||
from moniker.context import MonikerContext
|
||||
from moniker.plugin import Plugin
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.central import rpcapi as central_rpcapi
|
||||
from designate.context import DesignateContext
|
||||
from designate.plugin import Plugin
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -45,7 +45,7 @@ def get_ip_data(addr_dict):
|
||||
|
||||
class Handler(Plugin):
|
||||
""" Base class for notification handlers """
|
||||
__plugin_ns__ = 'moniker.notification.handler'
|
||||
__plugin_ns__ = 'designate.notification.handler'
|
||||
__plugin_type__ = 'handler'
|
||||
|
||||
@abc.abstractmethod
|
||||
@ -69,7 +69,7 @@ class Handler(Plugin):
|
||||
"""
|
||||
Return the domain for this context
|
||||
"""
|
||||
context = MonikerContext.get_admin_context()
|
||||
context = DesignateContext.get_admin_context()
|
||||
return central_api.get_domain(context, domain_id)
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ class BaseAddressHandler(Handler):
|
||||
data = extra.copy()
|
||||
data['domain'] = domain['name']
|
||||
|
||||
context = MonikerContext.get_admin_context()
|
||||
context = DesignateContext.get_admin_context()
|
||||
|
||||
for addr in addresses:
|
||||
record_data = data.copy()
|
||||
@ -125,7 +125,7 @@ class BaseAddressHandler(Handler):
|
||||
|
||||
:param criterion: Criterion to search and destroy records
|
||||
"""
|
||||
context = MonikerContext.get_admin_context()
|
||||
context = DesignateContext.get_admin_context()
|
||||
|
||||
if managed:
|
||||
criterion.update({
|
@ -13,9 +13,9 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.notification_handler.base import BaseAddressHandler
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.notification_handler.base import BaseAddressHandler
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -13,9 +13,9 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.notification_handler.base import BaseAddressHandler
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.notification_handler.base import BaseAddressHandler
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -220,7 +220,7 @@ log files::
|
||||
This module also contains a global instance of the ConfigOpts class
|
||||
in order to support a common usage pattern in OpenStack::
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from designate.openstack.common import cfg
|
||||
|
||||
opts = [
|
||||
cfg.StrOpt('bind_host', default='0.0.0.0'),
|
||||
@ -268,7 +268,7 @@ import os
|
||||
import string
|
||||
import sys
|
||||
|
||||
from moniker.openstack.common import iniparser
|
||||
from designate.openstack.common import iniparser
|
||||
|
||||
|
||||
class Error(Exception):
|
@ -25,7 +25,7 @@ import eventlet
|
||||
import eventlet.backdoor
|
||||
import greenlet
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from designate.openstack.common import cfg
|
||||
|
||||
eventlet_backdoor_opts = [
|
||||
cfg.IntOpt('backdoor_port',
|
@ -21,7 +21,7 @@ Exceptions common to OpenStack projects
|
||||
|
||||
import logging
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from designate.openstack.common.gettextutils import _
|
||||
|
||||
|
||||
class Error(Exception):
|
@ -24,7 +24,7 @@ import logging
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from designate.openstack.common.gettextutils import _
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
@ -20,7 +20,7 @@ gettext for openstack-common modules.
|
||||
|
||||
Usual usage in an openstack.common module:
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from designate.openstack.common.gettextutils import _
|
||||
"""
|
||||
|
||||
import gettext
|
@ -39,7 +39,7 @@ import itertools
|
||||
import json
|
||||
import xmlrpclib
|
||||
|
||||
from moniker.openstack.common import timeutils
|
||||
from designate.openstack.common import timeutils
|
||||
|
||||
|
||||
def to_primitive(value, convert_instances=False, level=0):
|
@ -40,11 +40,11 @@ import stat
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import jsonutils
|
||||
from moniker.openstack.common import local
|
||||
from moniker.openstack.common import notifier
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import jsonutils
|
||||
from designate.openstack.common import local
|
||||
from designate.openstack.common import notifier
|
||||
|
||||
|
||||
_DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s"
|
||||
@ -304,7 +304,7 @@ class JSONFormatter(logging.Formatter):
|
||||
|
||||
class PublishErrorsHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
if ('moniker.openstack.common.notifier.log_notifier' in
|
||||
if ('designate.openstack.common.notifier.log_notifier' in
|
||||
CONF.notification_driver):
|
||||
return
|
||||
notifier.api.notify(None, 'error.publisher',
|
@ -22,9 +22,9 @@ import sys
|
||||
from eventlet import event
|
||||
from eventlet import greenthread
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import timeutils
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import timeutils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -15,13 +15,13 @@
|
||||
|
||||
import uuid
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import context
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import importutils
|
||||
from moniker.openstack.common import jsonutils
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import timeutils
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import context
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import importutils
|
||||
from designate.openstack.common import jsonutils
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import timeutils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -14,9 +14,9 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import jsonutils
|
||||
from moniker.openstack.common import log as logging
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import jsonutils
|
||||
from designate.openstack.common import log as logging
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
@ -30,6 +30,6 @@ def notify(_context, message):
|
||||
CONF.default_notification_level)
|
||||
priority = priority.lower()
|
||||
logger = logging.getLogger(
|
||||
'moniker.openstack.common.notification.%s' %
|
||||
'designate.openstack.common.notification.%s' %
|
||||
message['event_type'])
|
||||
getattr(logger, priority)(jsonutils.dumps(message))
|
@ -14,9 +14,9 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common.notifier import rpc_notifier
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common.notifier import rpc_notifier
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -14,11 +14,11 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import context as req_context
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import rpc
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import context as req_context
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import rpc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -15,11 +15,11 @@
|
||||
|
||||
'''messaging based notification driver, with message envelopes'''
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import context as req_context
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import rpc
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import context as req_context
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import rpc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -16,10 +16,10 @@
|
||||
import datetime
|
||||
import time
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import timeutils
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import timeutils
|
||||
|
||||
|
||||
periodic_opts = [
|
@ -63,8 +63,8 @@ import urllib
|
||||
|
||||
import urllib2
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import jsonutils
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import jsonutils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -27,8 +27,8 @@ import signal
|
||||
from eventlet.green import subprocess
|
||||
from eventlet import greenthread
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import log as logging
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -22,7 +22,7 @@ import logging.handlers
|
||||
import os
|
||||
import string
|
||||
|
||||
from moniker.openstack.common.rootwrap import filters
|
||||
from designate.openstack.common.rootwrap import filters
|
||||
|
||||
|
||||
class NoFilterMatched(Exception):
|
@ -25,8 +25,8 @@ For some wrappers that add message versioning to rpc, see:
|
||||
rpc.proxy
|
||||
"""
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common import importutils
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common import importutils
|
||||
|
||||
|
||||
rpc_opts = [
|
||||
@ -47,7 +47,7 @@ rpc_opts = [
|
||||
help='Seconds to wait before a cast expires (TTL). '
|
||||
'Only supported by impl_zmq.'),
|
||||
cfg.ListOpt('allowed_rpc_exception_modules',
|
||||
default=['moniker.openstack.common.exception',
|
||||
default=['designate.openstack.common.exception',
|
||||
'nova.exception',
|
||||
'cinder.exception',
|
||||
'exceptions',
|
@ -33,11 +33,11 @@ from eventlet import greenpool
|
||||
from eventlet import pools
|
||||
from eventlet import semaphore
|
||||
|
||||
from moniker.openstack.common import excutils
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import local
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common.rpc import common as rpc_common
|
||||
from designate.openstack.common import excutils
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import local
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common.rpc import common as rpc_common
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -21,12 +21,12 @@ import copy
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import importutils
|
||||
from moniker.openstack.common import jsonutils
|
||||
from moniker.openstack.common import local
|
||||
from moniker.openstack.common import log as logging
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import importutils
|
||||
from designate.openstack.common import jsonutils
|
||||
from designate.openstack.common import local
|
||||
from designate.openstack.common import log as logging
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
@ -48,8 +48,8 @@ deserialize_msg().
|
||||
The current message format (version 2.0) is very simple. It is:
|
||||
|
||||
{
|
||||
'moniker.version': <RPC Envelope Version as a String>,
|
||||
'moniker.message': <Application Message Payload, JSON encoded>
|
||||
'designate.version': <RPC Envelope Version as a String>,
|
||||
'designate.message': <Application Message Payload, JSON encoded>
|
||||
}
|
||||
|
||||
Message format version '1.0' is just considered to be the messages we sent
|
||||
@ -65,8 +65,8 @@ to the messaging libraries as a dict.
|
||||
'''
|
||||
_RPC_ENVELOPE_VERSION = '2.0'
|
||||
|
||||
_VERSION_KEY = 'moniker.version'
|
||||
_MESSAGE_KEY = 'moniker.message'
|
||||
_VERSION_KEY = 'designate.version'
|
||||
_MESSAGE_KEY = 'designate.message'
|
||||
|
||||
|
||||
# TODO(russellb) Turn this on after Grizzly.
|
@ -83,7 +83,7 @@ On the client side, the same changes should be made as in example 1. The
|
||||
minimum version that supports the new parameter should be specified.
|
||||
"""
|
||||
|
||||
from moniker.openstack.common.rpc import common as rpc_common
|
||||
from designate.openstack.common.rpc import common as rpc_common
|
||||
|
||||
|
||||
class RpcDispatcher(object):
|
@ -27,7 +27,7 @@ import time
|
||||
|
||||
import eventlet
|
||||
|
||||
from moniker.openstack.common.rpc import common as rpc_common
|
||||
from designate.openstack.common.rpc import common as rpc_common
|
||||
|
||||
CONSUMERS = {}
|
||||
|
@ -29,11 +29,11 @@ import kombu.connection
|
||||
import kombu.entity
|
||||
import kombu.messaging
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import network_utils
|
||||
from moniker.openstack.common.rpc import amqp as rpc_amqp
|
||||
from moniker.openstack.common.rpc import common as rpc_common
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import network_utils
|
||||
from designate.openstack.common.rpc import amqp as rpc_amqp
|
||||
from designate.openstack.common.rpc import common as rpc_common
|
||||
|
||||
kombu_opts = [
|
||||
cfg.StrOpt('kombu_ssl_version',
|
@ -23,13 +23,13 @@ import uuid
|
||||
import eventlet
|
||||
import greenlet
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import importutils
|
||||
from moniker.openstack.common import jsonutils
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common.rpc import amqp as rpc_amqp
|
||||
from moniker.openstack.common.rpc import common as rpc_common
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import importutils
|
||||
from designate.openstack.common import jsonutils
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common.rpc import amqp as rpc_amqp
|
||||
from designate.openstack.common.rpc import common as rpc_common
|
||||
|
||||
qpid_messaging = importutils.try_import("qpid.messaging")
|
||||
qpid_exceptions = importutils.try_import("qpid.messaging.exceptions")
|
@ -25,12 +25,12 @@ import uuid
|
||||
import eventlet
|
||||
import greenlet
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import importutils
|
||||
from moniker.openstack.common import jsonutils
|
||||
from moniker.openstack.common import processutils as utils
|
||||
from moniker.openstack.common.rpc import common as rpc_common
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import importutils
|
||||
from designate.openstack.common import jsonutils
|
||||
from designate.openstack.common import processutils as utils
|
||||
from designate.openstack.common.rpc import common as rpc_common
|
||||
|
||||
zmq = importutils.try_import('eventlet.green.zmq')
|
||||
|
||||
@ -51,7 +51,7 @@ zmq_opts = [
|
||||
# The module.Class to use for matchmaking.
|
||||
cfg.StrOpt(
|
||||
'rpc_zmq_matchmaker',
|
||||
default=('moniker.openstack.common.rpc.'
|
||||
default=('designate.openstack.common.rpc.'
|
||||
'matchmaker.MatchMakerLocalhost'),
|
||||
help='MatchMaker driver',
|
||||
),
|
@ -22,9 +22,9 @@ import contextlib
|
||||
import itertools
|
||||
import json
|
||||
|
||||
from moniker.openstack.common import cfg
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import log as logging
|
||||
from designate.openstack.common import cfg
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import log as logging
|
||||
|
||||
|
||||
matchmaker_opts = [
|
@ -22,7 +22,7 @@ For more information about rpc API version numbers, see:
|
||||
"""
|
||||
|
||||
|
||||
from moniker.openstack.common import rpc
|
||||
from designate.openstack.common import rpc
|
||||
|
||||
|
||||
class RpcProxy(object):
|
@ -17,11 +17,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from moniker.openstack.common.gettextutils import _
|
||||
from moniker.openstack.common import log as logging
|
||||
from moniker.openstack.common import rpc
|
||||
from moniker.openstack.common.rpc import dispatcher as rpc_dispatcher
|
||||
from moniker.openstack.common import service
|
||||
from designate.openstack.common.gettextutils import _
|
||||
from designate.openstack.common import log as logging
|
||||
from designate.openstack.common import rpc
|
||||
from designate.openstack.common.rpc import dispatcher as rpc_dispatcher
|
||||
from designate.openstack.common import service
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user