本文整理汇总了Python中oslo_config.cfg.IPOpt方法的典型用法代码示例。如果您正苦于以下问题:Python cfg.IPOpt方法的具体用法?Python cfg.IPOpt怎么用?Python cfg.IPOpt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oslo_config.cfg
的用法示例。
在下文中一共展示了cfg.IPOpt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: api_common_opts
# 需要导入模块: from oslo_config import cfg [as 别名]
# 或者: from oslo_config.cfg import IPOpt [as 别名]
def api_common_opts():
_COMMON = [
cfg.IPOpt('bind-host',
default='0.0.0.0',
dest='bind_host',
help='IP address to listen on. Default is 0.0.0.0'),
cfg.PortOpt('bind-port',
default=9090,
dest='bind_port',
help='Port number to listen on. Default is 9090'
),
cfg.BoolOpt('enable_v1_api',
default=False,
help="""Default False, That is the v2 Freezer API
will be deployed. When this option is set
to ``True``, Freezer-api service will respond
to requests on registered endpoints conforming
to the v1 OpenStack Freezer api.
The v1 OpenStack Freezer API functions
as follows:
* Multi-tenancy is not supported under this
api version.
* Everything is user based.
* Freezer api v1 supports Oslo.db.
* Use elasticsearch db with v1 api version
The v2 OpenStack Freezer API functions
as follows:
* Multi-tenancy is supported under this api version.
* Freezer api v2 supports Oslo.db.
* Recommended to use oslo.db with api v2
Possible values:
* True
* False
""")
]
return _COMMON