From 52f108c0d9fd1828b2be639beb5a5d93d3ad87c1 Mon Sep 17 00:00:00 2001 From: Maciej Szankin Date: Mon, 14 Nov 2016 13:56:44 -0600 Subject: [PATCH] conf: remove deprecated cert_topic option Change-Id: Iade8ed5b8697e715fbecadd62076c3560af2bba9 Implements: blueprint centralize-config-options-ocata --- nova/cert/manager.py | 1 - nova/cert/rpcapi.py | 2 +- nova/cmd/cert.py | 2 +- nova/conf/__init__.py | 2 - nova/conf/cert.py | 41 ------------------- nova/tests/unit/cert/test_rpcapi.py | 1 - ..._cert_topic_conf_opt-6402aeca8629da95.yaml | 5 +++ 7 files changed, 7 insertions(+), 47 deletions(-) delete mode 100644 nova/conf/cert.py create mode 100644 releasenotes/notes/remove_deprecated_cert_topic_conf_opt-6402aeca8629da95.yaml diff --git a/nova/cert/manager.py b/nova/cert/manager.py index f986a515255c..65ae899ab33e 100644 --- a/nova/cert/manager.py +++ b/nova/cert/manager.py @@ -16,7 +16,6 @@ Cert manager manages x509 certificates. **Related Flags** -:cert_topic: What :mod:`rpc` topic to listen to (default: `cert`). :cert_manager: The module name of a class derived from :class:`manager.Manager` (default: :class:`nova.cert.manager.Manager`). diff --git a/nova/cert/rpcapi.py b/nova/cert/rpcapi.py index 2345494b76f7..77ade6c5ff8a 100644 --- a/nova/cert/rpcapi.py +++ b/nova/cert/rpcapi.py @@ -57,7 +57,7 @@ class CertAPI(object): def __init__(self): super(CertAPI, self).__init__() - target = messaging.Target(topic=CONF.cert_topic, version='2.0') + target = messaging.Target(topic='cert', version='2.0') version_cap = self.VERSION_ALIASES.get(CONF.upgrade_levels.cert, CONF.upgrade_levels.cert) self.client = rpc.get_client(target, version_cap=version_cap) diff --git a/nova/cmd/cert.py b/nova/cmd/cert.py index b4298cb6011d..bea336493fd6 100644 --- a/nova/cmd/cert.py +++ b/nova/cmd/cert.py @@ -44,6 +44,6 @@ def main(): gmr.TextGuruMeditation.setup_autorun(version) - server = service.Service.create(binary='nova-cert', topic=CONF.cert_topic) + server = service.Service.create(binary='nova-cert') service.serve(server) service.wait() diff --git a/nova/conf/__init__.py b/nova/conf/__init__.py index 82519b9ee432..7c0362757b04 100644 --- a/nova/conf/__init__.py +++ b/nova/conf/__init__.py @@ -24,7 +24,6 @@ from nova.conf import availability_zone from nova.conf import base from nova.conf import cache from nova.conf import cells -from nova.conf import cert from nova.conf import cinder from nova.conf import cloudpipe from nova.conf import compute @@ -81,7 +80,6 @@ availability_zone.register_opts(CONF) base.register_opts(CONF) cache.register_opts(CONF) cells.register_opts(CONF) -cert.register_opts(CONF) cinder.register_opts(CONF) cloudpipe.register_opts(CONF) compute.register_opts(CONF) diff --git a/nova/conf/cert.py b/nova/conf/cert.py deleted file mode 100644 index 3d8e01059896..000000000000 --- a/nova/conf/cert.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2016 IBM Corp. -# Copyright 2016 OpenStack Foundation -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from oslo_config import cfg - -cert_opts = [ - cfg.StrOpt("cert_topic", - deprecated_for_removal=True, - deprecated_since="14.0.0", - deprecated_reason=""" -Since the nova-cert service is marked for deprecation, the feature to change -RPC topic that cert nodes listen may be removed as early as the 15.0.0 -Ocata release. -""", - default="cert", - help=""" -Determines the RPC topic that the cert nodes listen on. For most deployments -there is no need to ever change it. -"""), -] - - -def register_opts(conf): - conf.register_opts(cert_opts) - - -def list_opts(): - return {"DEFAULT": cert_opts} diff --git a/nova/tests/unit/cert/test_rpcapi.py b/nova/tests/unit/cert/test_rpcapi.py index 34743f853799..62714193dcd2 100644 --- a/nova/tests/unit/cert/test_rpcapi.py +++ b/nova/tests/unit/cert/test_rpcapi.py @@ -32,7 +32,6 @@ class CertRpcAPITestCase(test.NoDBTestCase): rpcapi = cert_rpcapi.CertAPI() self.assertIsNotNone(rpcapi.client) - self.assertEqual(CONF.cert_topic, rpcapi.client.target.topic) orig_prepare = rpcapi.client.prepare diff --git a/releasenotes/notes/remove_deprecated_cert_topic_conf_opt-6402aeca8629da95.yaml b/releasenotes/notes/remove_deprecated_cert_topic_conf_opt-6402aeca8629da95.yaml new file mode 100644 index 000000000000..3876998277c1 --- /dev/null +++ b/releasenotes/notes/remove_deprecated_cert_topic_conf_opt-6402aeca8629da95.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + ``cert_topic`` has been removed from the ``DEFAULT`` section. It was marked + as deprecated due to planned removal of nova-cert service. \ No newline at end of file