Remove deprecated *_control_exchange

Change-Id: Id0c976b7e7e57fe9fd908376edc2c85dd1aa2abf
This commit is contained in:
Julien Danjou 2017-08-22 17:42:09 +02:00
parent 2644fc0e0e
commit 508fad109d
5 changed files with 16 additions and 90 deletions

View File

@ -1,82 +0,0 @@
#
# 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
EXCHANGE_OPTS = [
cfg.StrOpt('nova_control_exchange',
default='nova',
help="Exchange name for Nova notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('neutron_control_exchange',
default='neutron',
help="Exchange name for Neutron notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('heat_control_exchange',
default='heat',
help="Exchange name for Heat notifications",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('glance_control_exchange',
default='glance',
help="Exchange name for Glance notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('keystone_control_exchange',
default='keystone',
help="Exchange name for Keystone notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('cinder_control_exchange',
default='cinder',
help="Exchange name for Cinder notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('sahara_control_exchange',
default='sahara',
help="Exchange name for Data Processing notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('swift_control_exchange',
default='swift',
help="Exchange name for Swift notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('magnum_control_exchange',
default='magnum',
help="Exchange name for Magnum notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('trove_control_exchange',
default='trove',
help="Exchange name for DBaaS notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('zaqar_control_exchange',
default='zaqar',
help="Exchange name for Messaging service notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('dns_control_exchange',
default='central',
help="Exchange name for DNS service notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
cfg.StrOpt('ceilometer_control_exchange',
default='ceilometer',
help="Exchange name for ceilometer notifications.",
deprecated_for_removal=True,
deprecated_reason="Use notification_control_exchanges instead"),
]

View File

@ -31,7 +31,6 @@ import ceilometer.dispatcher.file
import ceilometer.dispatcher.gnocchi_opts
import ceilometer.dispatcher.http
import ceilometer.event.converter
import ceilometer.exchange_control
import ceilometer.hardware.discovery
import ceilometer.hardware.pollsters.generic
import ceilometer.image.discovery
@ -91,7 +90,6 @@ def list_opts():
ceilometer.pipeline.OPTS,
ceilometer.sample.OPTS,
ceilometer.utils.OPTS,
ceilometer.exchange_control.EXCHANGE_OPTS,
OPTS)),
('api', itertools.chain(ceilometer.api.app.API_OPTS,
ceilometer.api.controllers.v2.root.API_OPTS)),

View File

@ -26,9 +26,12 @@ class TelemetryBase(plugin_base.NotificationBase):
Sequence defining the exchange and topics to be connected for this
plugin.
"""
return [oslo_messaging.Target(
topic=topic, exchange=conf.ceilometer_control_exchange)
for topic in self.get_notification_topics(conf)]
return [
oslo_messaging.Target(
topic=topic,
exchange=conf.notification.notification_control_exchanges[0])
for topic in self.get_notification_topics(conf)
]
class TelemetryIpc(TelemetryBase):

View File

@ -86,9 +86,12 @@ class _FakeNotificationPlugin(plugin_base.NotificationBase):
event_types = ['fake.event']
def get_targets(self, conf):
return [oslo_messaging.Target(
topic=topic, exchange=conf.nova_control_exchange)
for topic in self.get_notification_topics(conf)]
return [
oslo_messaging.Target(
topic=topic,
exchange=conf.notification.notification_control_exchanges[0])
for topic in self.get_notification_topics(conf)
]
def process_notification(self, message):
return []

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
The deprecated control exchange options have been removed.