499 B
499 B
Global ConfigOpts
This module also contains a global instance of the ConfigOpts class in order to support a common usage pattern in OpenStack:
from oslo_config import cfg
= [
opts 'bind_host', default='0.0.0.0'),
cfg.StrOpt('bind_port', default=9292),
cfg.PortOpt(
]
= cfg.CONF
CONF
CONF.register_opts(opts)
def start(server, app):
server.start(app, CONF.bind_port, CONF.bind_host)