Remove deprecated options for accessing Swift
Change-Id: I1d17e594fcaadf6f68ec5f0c3155208eda5a5d99
This commit is contained in:
parent
43b32df646
commit
ca044c9a4b
@ -49,17 +49,11 @@ class SwiftAPI(object):
|
|||||||
"""
|
"""
|
||||||
global SWIFT_SESSION
|
global SWIFT_SESSION
|
||||||
|
|
||||||
adapter_opts = dict()
|
|
||||||
# TODO(pas-ha): remove handling deprecated options in Rocky
|
|
||||||
if CONF.swift.os_region and not CONF.swift.region_name:
|
|
||||||
adapter_opts['region_name'] = CONF.swift.os_region
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not SWIFT_SESSION:
|
if not SWIFT_SESSION:
|
||||||
SWIFT_SESSION = keystone.get_session('swift')
|
SWIFT_SESSION = keystone.get_session('swift')
|
||||||
|
|
||||||
adapter = keystone.get_adapter('swift', session=SWIFT_SESSION,
|
adapter = keystone.get_adapter('swift', session=SWIFT_SESSION)
|
||||||
**adapter_opts)
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise utils.Error(_("Could not create an adapter to connect to "
|
raise utils.Error(_("Could not create an adapter to connect to "
|
||||||
"the object storage service: %s") % exc)
|
"the object storage service: %s") % exc)
|
||||||
|
@ -35,23 +35,6 @@ _OPTS = [
|
|||||||
default='ironic-inspector',
|
default='ironic-inspector',
|
||||||
help=_('Default Swift container to use when creating '
|
help=_('Default Swift container to use when creating '
|
||||||
'objects.')),
|
'objects.')),
|
||||||
cfg.StrOpt('os_service_type',
|
|
||||||
default='object-store',
|
|
||||||
help=_('Swift service type.'),
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_reason=_('Use [swift]/service_type option '
|
|
||||||
'to set specific service type')),
|
|
||||||
cfg.StrOpt('os_endpoint_type',
|
|
||||||
default='internalURL',
|
|
||||||
help=_('Swift endpoint type.'),
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_reason=_('Use [swift]/valid_interfaces option '
|
|
||||||
'to specify endpoint interfaces.')),
|
|
||||||
cfg.StrOpt('os_region',
|
|
||||||
help=_('Keystone region to get endpoint for.'),
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_reason=_("Use [swift]/region_name option to "
|
|
||||||
"configure region."))
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,11 +56,7 @@ class SwiftTestCase(BaseTest):
|
|||||||
super(SwiftTestCase, self).setUp()
|
super(SwiftTestCase, self).setUp()
|
||||||
swift.reset_swift_session()
|
swift.reset_swift_session()
|
||||||
self.swift_exception = swift_exception.ClientException('', '')
|
self.swift_exception = swift_exception.ClientException('', '')
|
||||||
self.cfg.config(group='swift',
|
self.cfg.config(group='swift', max_retries=2)
|
||||||
os_service_type='object-store',
|
|
||||||
os_endpoint_type='internalURL',
|
|
||||||
os_region='somewhere',
|
|
||||||
max_retries=2)
|
|
||||||
# NOTE(aarefiev) register keystoneauth dynamic options
|
# NOTE(aarefiev) register keystoneauth dynamic options
|
||||||
adapter_opts = kloading.get_adapter_conf_options(
|
adapter_opts = kloading.get_adapter_conf_options(
|
||||||
include_deprecated=False)
|
include_deprecated=False)
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The deprecation configuration options ``os_service_type``, ``os_region``
|
||||||
|
and ``os_endpoint_type`` from the ``[swift]`` section have been removed.
|
Loading…
Reference in New Issue
Block a user