Use magnum-config-generator.conf to generate Magnum config sample file

We hard code configure options in tox.ini to generate Magnum config
sample file, and we keep this config sample file in our repository
before.

It is inconvenient for developer if the add/remove/change some
configuration options cause they need to take care about the
config.sample file.

This patch removes magnum.config.sample instead of letting admin generate it
from magnum-config-generator.conf(picked from tox.ini).

P.S. Make tox.ini cleanup since it is not a good idea we mess up tox.ini
with configuration options.

Closes-Bug: #1538374
Change-Id: I80d019b5c98e0282cd0fe50fd4ad66286287e2cb
This commit is contained in:
Eli Qiao 2016-01-27 09:59:15 +08:00
parent ac0e251df2
commit 022bba9c06
4 changed files with 17 additions and 1299 deletions

View File

@ -157,7 +157,8 @@ Configure magnum::
# create the magnum conf directory
sudo mkdir -p /etc/magnum
# copy sample config and modify it as necessary
# generate sample config file and modify it as necessary
tox -egenconfig
sudo cp etc/magnum/magnum.conf.sample /etc/magnum/magnum.conf
# copy policy.json

View File

@ -0,0 +1,14 @@
[DEFAULT]
output_file = etc/magnum/magnum.conf.sample
wrap_width = 79
namespace = magnum
namespace = oslo.concurrency
namespace = oslo.db
namespace = oslo.log
namespace = oslo.messaging
namespace = oslo.middleware.cors
namespace = oslo.policy
namespace = oslo.service.periodic_task
namespace = oslo.service.service
namespace = keystonemiddleware.auth_token

File diff suppressed because it is too large Load Diff

12
tox.ini
View File

@ -115,17 +115,7 @@ commands = {[testenv:docs]commands}
[testenv:genconfig]
commands =
oslo-config-generator --output-file etc/magnum/magnum.conf.sample \
--namespace magnum \
--namespace oslo.concurrency \
--namespace oslo.db \
--namespace oslo.log \
--namespace oslo.messaging \
--namespace oslo.middleware.cors \
--namespace oslo.policy \
--namespace oslo.service.periodic_task \
--namespace oslo.service.service \
--namespace keystonemiddleware.auth_token
oslo-config-generator --config-file etc/magnum/magnum-config-generator.conf
[flake8]
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,magnum/common/pythonk8sclient