bd463ee3b6
The cfg module is very large, and starts with a huge block of documentation. This patch moves that information into separate files in the reference section of the docs. A few formatting fixes need to be made to have it build cleanly, but the content is not changed in a substantive way. Change-Id: I86aa90bbf180b5dc9acbcedb024e5361d49954c3 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
22 lines
499 B
ReStructuredText
22 lines
499 B
ReStructuredText
===================
|
|
Global ConfigOpts
|
|
===================
|
|
|
|
This module also contains a global instance of the ConfigOpts class
|
|
in order to support a common usage pattern in OpenStack:
|
|
|
|
.. code-block:: python
|
|
|
|
from oslo_config import cfg
|
|
|
|
opts = [
|
|
cfg.StrOpt('bind_host', default='0.0.0.0'),
|
|
cfg.PortOpt('bind_port', default=9292),
|
|
]
|
|
|
|
CONF = cfg.CONF
|
|
CONF.register_opts(opts)
|
|
|
|
def start(server, app):
|
|
server.start(app, CONF.bind_port, CONF.bind_host)
|