Repository URL to install this package:
Version:
5.2.8-5.2 ▾
|
# Copyright 2018 TrilioData Inc.
# All Rights Reserved.
from oslo_config import cfg
api_group = cfg.OptGroup('api',
title='API options',
help="""
Options under this group are used to define Nova API.
""")
auth_opts = [
cfg.StrOpt("host",
default="192.168.9.41",
help="""
This determines the strategy to use for authentication: keystone or noauth2.
'noauth2' is designed for testing only, as it does no actual credential
checking. 'noauth2' provides administrative credentials only if 'admin' is
specified as the username.
"""),
cfg.StrOpt("auth_strategy",
default="keystone",
choices=("keystone", "noauth2"),
deprecated_group="DEFAULT",
help="""
This determines the strategy to use for authentication: keystone or noauth2.
'noauth2' is designed for testing only, as it does no actual credential
checking. 'noauth2' provides administrative credentials only if 'admin' is
specified as the username.
"""),
cfg.BoolOpt("use_forwarded_for",
default=False,
deprecated_group="DEFAULT",
help="""
When True, the 'X-Forwarded-For' header is treated as the canonical remote
address. When False (the default), the 'remote_address' header is used.
You should only enable this if you have an HTML sanitizing proxy.
"""),
]
osapi_opts = [
cfg.StrOpt("dmapi_link_prefix",
deprecated_group="DEFAULT",
help="""
This string is prepended to the normal URL that is returned in links to the
OpenStack Compute API. If it is empty (the default), the URLs are returned
unchanged.
Possible values:
* Any string, including an empty string (the default).
"""),
]
API_OPTS = (auth_opts +
osapi_opts)
def register_opts(conf):
conf.register_group(api_group)
conf.register_opts(API_OPTS, group=api_group)
def list_opts():
return {api_group: API_OPTS}