From a63aef8fba55171e4e598b36932e46c379bf1ec7 Mon Sep 17 00:00:00 2001 From: Maciej Szankin Date: Tue, 15 Nov 2016 08:45:12 -0600 Subject: [PATCH] conf: remove deprecated barbican options * removed deprecated barbican options * fixed formatting in key_manager_opts list Change-Id: Ia889084dc563c145e68390f75c53fac92b3f3ae6 Implements: blueprint centralize-config-options-ocata --- nova/conf/key_manager.py | 53 +++---------------- ...barbican_config_opts-7eb4e801d0ac252f.yaml | 10 ++++ 2 files changed, 17 insertions(+), 46 deletions(-) create mode 100644 releasenotes/notes/remove_deprecated_barbican_config_opts-7eb4e801d0ac252f.yaml diff --git a/nova/conf/key_manager.py b/nova/conf/key_manager.py index f5082727fc62..bafb2e04d392 100644 --- a/nova/conf/key_manager.py +++ b/nova/conf/key_manager.py @@ -14,7 +14,6 @@ # under the License. from castellan import options as castellan_opts -from keystoneauth1 import loading as ks_loading from oslo_config import cfg key_manager_group = cfg.OptGroup( @@ -22,10 +21,11 @@ key_manager_group = cfg.OptGroup( title='Key manager options') key_manager_opts = [ + # TODO(raj_singh): Deprecate or move this option to The Castellan library cfg.StrOpt( 'fixed_key', deprecated_group='keymgr', - help=""" + help=""" Fixed key returned by key manager, specified in hex. Possible values: @@ -34,67 +34,28 @@ Possible values: """), ] -barbican_group = cfg.OptGroup( - "barbican", - title="Barbican options") - -barbican_opts = [ - cfg.StrOpt("catalog_info", - default="key-manager:barbican:public", - deprecated_for_removal=True, - deprecated_since="14.0.0", - 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: -:: -"""), - cfg.StrOpt("endpoint_template", - deprecated_for_removal=True, - deprecated_since="14.0.0", - 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_since="14.0.0", - 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) conf.register_group(key_manager_group) conf.register_opts(key_manager_opts, group=key_manager_group) - # TODO(raj_singh): Todo: 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(): - # Castellan library also has a group name barbican and key_manager. So if + # Castellan library also has a group name key_manager. So if # we append list returned from Castellan 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 same # group name from this file and Castellan library - opts = {barbican_group.name: barbican_opts, - key_manager_group.name: key_manager_opts} + opts = {key_manager_group.name: key_manager_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 + # TODO(raj_singh): When the last option "fixed_key" is removed/moved from + # this file, then comment in code below and delete the code block above. + # Castellan already returned a list which can be returned # directly from list_opts() # return castellan_opts.list_opts() diff --git a/releasenotes/notes/remove_deprecated_barbican_config_opts-7eb4e801d0ac252f.yaml b/releasenotes/notes/remove_deprecated_barbican_config_opts-7eb4e801d0ac252f.yaml new file mode 100644 index 000000000000..001fb70e9dad --- /dev/null +++ b/releasenotes/notes/remove_deprecated_barbican_config_opts-7eb4e801d0ac252f.yaml @@ -0,0 +1,10 @@ +--- +upgrade: + - | + Configuration options related to the Barbican were deprecated and now + completly removed from ``barbican`` group. These options are available in + the Castellan library. Following are the affected options: + + - ``barbican.catalog_info`` + - ``barbican.endpoint_template`` + - ``barbican.os_region_name`` \ No newline at end of file