Browse Source

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
changes/72/272872/4
Eli Qiao 7 years ago
parent
commit
022bba9c06
  1. 3
      doc/source/dev/manual-devstack.rst
  2. 14
      etc/magnum/magnum-config-generator.conf
  3. 1287
      etc/magnum/magnum.conf.sample
  4. 12
      tox.ini

3
doc/source/dev/manual-devstack.rst

@ -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

14
etc/magnum/magnum-config-generator.conf

@ -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

1287
etc/magnum/magnum.conf.sample

File diff suppressed because it is too large Load Diff

12
tox.ini

@ -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

Loading…
Cancel
Save