Deprecate barbican options
1. Deprecating barbican options as these are moved to Castellan library. 2. Added new formatting Blueprint centralize-config-options-newton Change-Id: Ic8bd86e2652b7702c039ea1d2e15a7bf5a2a9586
This commit is contained in:
parent
bcfb51d14c
commit
899a140f32
@ -1,10 +1,3 @@
|
||||
# needs:fix_opt_description
|
||||
# needs:check_deprecation_status
|
||||
# needs:check_opt_group_and_type
|
||||
# needs:fix_opt_description_indentation
|
||||
# needs:fix_opt_registration_consistency
|
||||
|
||||
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
@ -19,35 +12,72 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from castellan import options as castellan_opts
|
||||
from keystoneauth1 import loading as ks_loading
|
||||
from oslo_config import cfg
|
||||
|
||||
# All barbican related code and options have been moved to
|
||||
# a separate library the Castellan. Deprecating these option for
|
||||
# Newton. These will be deleted post Newton
|
||||
|
||||
barbican_group = cfg.OptGroup(
|
||||
'barbican',
|
||||
title='Barbican options')
|
||||
"barbican",
|
||||
title="Barbican options")
|
||||
|
||||
barbican_opts = [
|
||||
cfg.StrOpt('catalog_info',
|
||||
default='key-manager:barbican:public',
|
||||
help='Info to match when looking for barbican in the service '
|
||||
'catalog. Format is: separated values of the form: '
|
||||
'<service_type>:<service_name>:<endpoint_type>'),
|
||||
cfg.StrOpt('endpoint_template',
|
||||
help='Override service catalog lookup with template for '
|
||||
'barbican endpoint e.g. '
|
||||
'http://localhost:9311/v1/%(project_id)s'),
|
||||
cfg.StrOpt('os_region_name',
|
||||
help='Region name of this node'),
|
||||
cfg.StrOpt("catalog_info",
|
||||
default="key-manager:barbican:public",
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason="This option have been moved to the "
|
||||
"Castellan library",
|
||||
help="""
|
||||
Info to match when looking for barbican in the service
|
||||
catalog. Format is: separated values of the form:
|
||||
<service_type>:<service_name>:<endpoint_type>
|
||||
"""),
|
||||
cfg.StrOpt("endpoint_template",
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason="This option have been moved to the "
|
||||
"Castellan library",
|
||||
help="""
|
||||
Override service catalog lookup with template for
|
||||
barbican endpoint e.g.
|
||||
http://localhost:9311/v1/%(project_id)s
|
||||
"""),
|
||||
cfg.StrOpt("os_region_name",
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason="This option have been moved to the "
|
||||
"Castellan library",
|
||||
help="""
|
||||
Region name of this node
|
||||
"""),
|
||||
]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
castellan_opts.set_defaults(conf)
|
||||
# TODO(raj_singh): Code block below is deprecated and will be removed
|
||||
# post Newton
|
||||
conf.register_group(barbican_group)
|
||||
conf.register_opts(barbican_opts, group=barbican_group)
|
||||
ks_loading.register_session_conf_options(conf, barbican_group.name)
|
||||
|
||||
|
||||
def list_opts():
|
||||
return {
|
||||
barbican_group.name: barbican_opts
|
||||
}
|
||||
# Castellan library also has a group name barbican. So if we append
|
||||
# list returned from barbican to this list, oslo will remove one group as
|
||||
# duplicate and only one group (either from this file or Castellan library)
|
||||
# will show up.
|
||||
# So fix is to merge options of this file to "barbican" group returned from
|
||||
# Castellan
|
||||
opts = {barbican_group.name: barbican_opts}
|
||||
for group, options in castellan_opts.list_opts():
|
||||
if group not in opts.keys():
|
||||
opts[group] = options
|
||||
else:
|
||||
opts[group] = opts[group] + options
|
||||
return opts
|
||||
# TODO(raj_singh): Post Newton delete code block from above and comment in
|
||||
# line below. Castellan already returned a list which can be returned
|
||||
# directly from list_opts()
|
||||
# return castellan_opts.list_opts()
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
from castellan import options as castellan_opts
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
@ -26,8 +25,6 @@ LOG = logging.getLogger(__name__)
|
||||
CONF = nova.conf.CONF
|
||||
|
||||
|
||||
castellan_opts.set_defaults(CONF)
|
||||
|
||||
# NOTE(kfarr): This line can be removed when a value is assigned in DevStack
|
||||
CONF.set_default('api_class', 'nova.keymgr.conf_key_mgr.ConfKeyManager',
|
||||
group='key_manager')
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- All barbican config options in Nova are now
|
||||
deprecated and may be removed as early as 15.0.0
|
||||
release. All of these options are moved to the
|
||||
Castellan library.
|
Loading…
Reference in New Issue
Block a user