Remove deprecated ssl options

[DEFAULT]ssl_cert_path and [DEFAULT]ssl_key_path were removed in this
patch.

Change-Id: I9358a4c8d540c4d6b3f4b5c36e357d9e9174af50
This commit is contained in:
Kaifeng Wang 2019-04-08 17:19:06 +08:00
parent 47b9468838
commit 6e7b62a6eb
4 changed files with 5 additions and 45 deletions

View File

@ -12,7 +12,6 @@
from oslo_config import cfg
from oslo_log import log
from oslo_service import sslutils
from ironic_inspector.conf import opts
@ -27,10 +26,5 @@ def prepare_service(args=None):
opts.parse_args(args)
log.setup(CONF, 'ironic_inspector')
# TODO(kaifeng) Remove deprecated options at T* cycle.
sslutils.register_opts(CONF)
CONF.set_default('cert_file', CONF.ssl_cert_path, group='ssl')
CONF.set_default('key_file', CONF.ssl_key_path, group='ssl')
LOG.debug("Configuration:")
CONF.log_opt_values(LOG, log.DEBUG)

View File

@ -53,18 +53,6 @@ _OPTS = [
cfg.BoolOpt('use_ssl',
default=False,
help=_('SSL Enabled/Disabled')),
cfg.StrOpt('ssl_cert_path',
default='',
deprecated_for_removal=True,
deprecated_reason=_('This option will be superseded by '
'[ssl]cert_file.'),
help=_('Path to SSL certificate')),
cfg.StrOpt('ssl_key_path',
default='',
deprecated_for_removal=True,
deprecated_reason=_('This option will be superseded by '
'[ssl]key_file.'),
help=_('Path to SSL key')),
cfg.IntOpt('max_concurrency',
default=1000, min=2,
help=_('The green thread pool size.')),

View File

@ -13,10 +13,8 @@
import eventlet # noqa
import fixtures
import mock
from oslo_config import cfg
from ironic_inspector.common import service_utils
from ironic_inspector.test import base as test_base
from ironic_inspector import wsgi_service
@ -93,28 +91,3 @@ class TestWSGIService(BaseWSGITest):
def test_reset(self):
self.service.reset()
self.server.reset.assert_called_once_with()
@mock.patch.object(service_utils.log, 'register_options', autospec=True)
class TestSSLOptions(test_base.BaseTest):
def test_use_deprecated_options(self, mock_log):
CONF.set_override('ssl_cert_path', 'fake_cert_file')
CONF.set_override('ssl_key_path', 'fake_key_file')
service_utils.prepare_service()
self.assertEqual(CONF.ssl.cert_file, 'fake_cert_file')
self.assertEqual(CONF.ssl.key_file, 'fake_key_file')
def test_use_ssl_options(self, mock_log):
CONF.set_override('ssl_cert_path', 'fake_cert_file')
CONF.set_override('ssl_key_path', 'fake_key_file')
service_utils.prepare_service()
CONF.set_override('cert_file', 'fake_new_cert', 'ssl')
CONF.set_override('key_file', 'fake_new_key', 'ssl')
self.assertEqual(CONF.ssl.cert_file, 'fake_new_cert')
self.assertEqual(CONF.ssl.key_file, 'fake_new_key')

View File

@ -0,0 +1,5 @@
upgrade:
- |
The deprecated SSL configuration options ``[DEFAULT]ssl_cert_path`` and
``[DEFAULT]ssl_key_path`` were removed, please use configuration options
from ``[ssl]`` section.