Add options to generated config sample
Change-Id: I7b0447768c17805df0419968e028ac7c23615b78
This commit is contained in:
parent
23d494aebd
commit
8e404859a9
3
.gitignore
vendored
3
.gitignore
vendored
@ -57,3 +57,6 @@ ChangeLog
|
||||
|
||||
# Files created by releasenotes build
|
||||
releasenotes/build
|
||||
|
||||
# generated config file
|
||||
etc/higgins/higgins.conf.sample
|
||||
|
@ -3,3 +3,11 @@ output_file = etc/higgins/higgins.conf.sample
|
||||
wrap_width = 79
|
||||
|
||||
namespace = higgins
|
||||
namespace = keystonemiddleware.auth_token
|
||||
namespace = oslo.concurrency
|
||||
namespace = oslo.db
|
||||
namespace = oslo.log
|
||||
namespace = oslo.messaging
|
||||
namespace = oslo.policy
|
||||
namespace = oslo.service.periodic_task
|
||||
namespace = oslo.service.service
|
||||
|
@ -16,8 +16,8 @@ from keystonemiddleware import auth_token
|
||||
from oslo_log import log
|
||||
|
||||
from higgins.common import exception
|
||||
from higgins.common.i18n import _
|
||||
from higgins.common import utils
|
||||
from higgins.i18n import _
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
@ -21,7 +21,7 @@ Based on pecan.middleware.errordocument
|
||||
import json
|
||||
import six
|
||||
|
||||
from higgins.i18n import _
|
||||
from higgins.common.i18n import _
|
||||
|
||||
|
||||
class ParsableErrorMiddleware(object):
|
||||
|
@ -19,11 +19,11 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_service import service
|
||||
|
||||
from higgins.common.i18n import _LI
|
||||
from higgins.common import rpc_service
|
||||
from higgins.common import service as higgins_service
|
||||
from higgins.common import short_id
|
||||
from higgins.conductor.handlers import default as default_handler
|
||||
from higgins.i18n import _LI
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -19,7 +19,7 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from higgins.common import exception
|
||||
from higgins.i18n import _LE
|
||||
from higgins.common.i18n import _LE
|
||||
|
||||
CONF = cfg.CONF
|
||||
CFG_GROUP = 'keystone_auth'
|
||||
|
43
higgins/common/utils.py
Normal file
43
higgins/common/utils.py
Normal file
@ -0,0 +1,43 @@
|
||||
# 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.
|
||||
|
||||
# It's based on oslo.i18n usage in OpenStack Keystone project and
|
||||
# recommendations from http://docs.openstack.org/developer/oslo.i18n/usage.html
|
||||
|
||||
"""Utilities and helper functions."""
|
||||
|
||||
from oslo_log import log as logging
|
||||
import six
|
||||
|
||||
from higgins.common.i18n import _LW
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def safe_rstrip(value, chars=None):
|
||||
"""Removes trailing characters from a string if that does not make it empty
|
||||
|
||||
:param value: A string value that will be stripped.
|
||||
:param chars: Characters to remove.
|
||||
:return: Stripped value.
|
||||
|
||||
"""
|
||||
if not isinstance(value, six.string_types):
|
||||
LOG.warning(_LW(
|
||||
"Failed to remove trailing character. Returning original object. "
|
||||
"Supplied object is not a string: %s,"
|
||||
), value)
|
||||
return value
|
||||
|
||||
return value.rstrip(chars) or value
|
0
higgins/objects/__init__.py
Normal file
0
higgins/objects/__init__.py
Normal file
@ -10,6 +10,21 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import itertools
|
||||
|
||||
import higgins.api.app
|
||||
import higgins.common.keystone
|
||||
import higgins.common.service
|
||||
import higgins.conductor.config
|
||||
|
||||
|
||||
def list_opts():
|
||||
return []
|
||||
return [
|
||||
('DEFAULT',
|
||||
itertools.chain(
|
||||
higgins.common.service.service_opts,
|
||||
)),
|
||||
('api', higgins.api.app.API_SERVICE_OPTS),
|
||||
('conductor', higgins.conductor.config.SERVICE_OPTS),
|
||||
('keystone_auth', higgins.common.keystone.keystone_auth_opts),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user