Remove the private database config option

In both Mogan and oslo_db, there are many places directly use the 'InnoDB'
as mysql engine, we don't need to define a specific config option in
Mogan.

Change-Id: I70be7dd6767cf5f4d3122fa7255a64ab5911c9e4
This commit is contained in:
liusheng 2017-07-14 09:49:31 +08:00
parent 4e1e190b62
commit f56ad6aa2e
4 changed files with 1 additions and 33 deletions

View File

@ -18,7 +18,6 @@ from oslo_config import cfg
from mogan.conf import api
from mogan.conf import cache
from mogan.conf import configdrive
from mogan.conf import database
from mogan.conf import default
from mogan.conf import engine
from mogan.conf import glance
@ -34,7 +33,6 @@ CONF = cfg.CONF
api.register_opts(CONF)
configdrive.register_opts(CONF)
database.register_opts(CONF)
default.register_opts(CONF)
engine.register_opts(CONF)
glance.register_opts(CONF)

View File

@ -1,28 +0,0 @@
# Copyright 2016 Huawei Technologies Co.,LTD.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# 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 oslo_config import cfg
from mogan.common.i18n import _
opts = [
cfg.StrOpt('mysql_engine',
default='InnoDB',
help=_('MySQL engine to use.'))
]
def register_opts(conf):
conf.register_opts(opts, group='database')

View File

@ -14,7 +14,6 @@ import itertools
import mogan.conf.api
import mogan.conf.configdrive
import mogan.conf.database
import mogan.conf.default
import mogan.conf.engine
import mogan.conf.glance
@ -36,7 +35,6 @@ _opts = [
('DEFAULT', itertools.chain(*_default_opt_lists)),
('api', mogan.conf.api.opts),
('configdrive', mogan.conf.configdrive.opts),
('database', mogan.conf.database.opts),
('engine', mogan.conf.engine.opts),
('glance', mogan.conf.glance.opts),
('ironic', mogan.conf.ironic.ironic_opts),

View File

@ -43,7 +43,7 @@ def MediumText():
def table_args():
engine_name = urlparse.urlparse(CONF.database.connection).scheme
if engine_name == 'mysql':
return {'mysql_engine': CONF.database.mysql_engine,
return {'mysql_engine': 'InnoDB',
'mysql_charset': "utf8"}
return None