generate configuration via oslo
add a sample configuration file and a tox environment to generate the configuration files. Change-Id: I96c3955b9e320939a87a6d6def8dc98604405bc3
This commit is contained in:
parent
f70d7ff69b
commit
15892da8a3
|
@ -0,0 +1,15 @@
|
|||
[DEFAULT]
|
||||
|
||||
#
|
||||
# From ooi
|
||||
#
|
||||
|
||||
# The IP address on which the OCCI (ooi) API will listen. (string value)
|
||||
#ooi_listen = 0.0.0.0
|
||||
|
||||
# The port on which the OCCI (ooi) API will listen. (integer value)
|
||||
#ooi_listen_port = 8787
|
||||
|
||||
# Number of workers for OCCI (ooi) API service. The default will be equal to
|
||||
# the number of CPUs available. (integer value)
|
||||
#ooi_workers = <None>
|
|
@ -0,0 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2015 Spanish National Research Council (CSIC)
|
||||
#
|
||||
# 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 ooi import wsgi
|
||||
|
||||
|
||||
def list_opts():
|
||||
return [("DEFAULT", wsgi.occi_opts)]
|
|
@ -47,6 +47,8 @@ output_file = ooi/locale/ooi.pot
|
|||
[entry_points]
|
||||
paste.filter_factory =
|
||||
ooi = ooi.wsgi:OCCIMiddleware.factory
|
||||
oslo.config.opts =
|
||||
ooi = ooi.opts:list_opts
|
||||
|
||||
[pbr]
|
||||
# Have pbr generate the module indexes like sphinx autodoc
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -30,6 +30,10 @@ deps = coveralls
|
|||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[testenv:genconfig]
|
||||
commands = oslo-config-generator --output-file etc/ooi.conf.sample \
|
||||
--namespace ooi --wrap-width 79
|
||||
|
||||
[flake8]
|
||||
# H803 skipped on purpose per list discussion.
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
|
Loading…
Reference in New Issue