update Quantum references to Neutron

implements bug 1197208

Change-Id: I5b9467a0534a0842b0262efa79f316178780f0bd
This commit is contained in:
Mark McClain 2013-07-02 21:09:02 -04:00
parent 8a7dc3ea36
commit ef17d89e08
6 changed files with 25 additions and 16 deletions

View File

@ -15,7 +15,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Handler for producing network counter messages from Quantum notification
"""Handler for producing network counter messages from Neutron notification
events.
"""
@ -27,9 +27,10 @@ from ceilometer.openstack.common import log
from ceilometer import plugin
OPTS = [
cfg.StrOpt('quantum_control_exchange',
default='quantum',
help="Exchange name for Quantum notifications"),
cfg.StrOpt('neutron_control_exchange',
default='neutron',
help="Exchange name for Neutron notifications",
deprecated_name='quantum_control_exchange'),
]
cfg.CONF.register_opts(OPTS)
@ -46,7 +47,7 @@ class NetworkNotificationBase(plugin.NotificationBase):
'%s.create.end' % (self.resource_name),
'%s.update.end' % (self.resource_name),
'%s.exists' % (self.resource_name),
# FIXME(dhellmann): Quantum delete notifications do
# FIXME(dhellmann): Neutron delete notifications do
# not include the same metadata as the other messages,
# so we ignore them for now. This isn't ideal, since
# it may mean we miss charging for some amount of time,
@ -63,7 +64,7 @@ class NetworkNotificationBase(plugin.NotificationBase):
"""
return [
plugin.ExchangeTopics(
exchange=conf.quantum_control_exchange,
exchange=conf.neutron_control_exchange,
topics=set(topic + ".info"
for topic in conf.notification_topics)),
]
@ -102,7 +103,7 @@ class NetworkNotificationBase(plugin.NotificationBase):
class Network(NetworkNotificationBase):
"""Listen for Quantum network notifications in order to mediate with the
"""Listen for Neutron network notifications in order to mediate with the
metering framework.
"""
@ -120,7 +121,7 @@ class Network(NetworkNotificationBase):
class Subnet(NetworkNotificationBase):
"""Listen for Quantum notifications in order to mediate with the
"""Listen for Neutron notifications in order to mediate with the
metering framework.
"""
@ -141,7 +142,7 @@ class Subnet(NetworkNotificationBase):
class Port(NetworkNotificationBase):
"""Listen for Quantum notifications in order to mediate with the
"""Listen for Neutron notifications in order to mediate with the
metering framework.
"""
@ -161,7 +162,7 @@ class Port(NetworkNotificationBase):
class Router(NetworkNotificationBase):
"""Listen for Quantum notifications in order to mediate with the
"""Listen for Neutron notifications in order to mediate with the
metering framework.
"""
@ -177,7 +178,7 @@ class Router(NetworkNotificationBase):
class FloatingIP(NetworkNotificationBase):
"""Listen for Quantum notifications in order to mediate with the
"""Listen for Neutron notifications in order to mediate with the
metering framework.
"""

View File

@ -157,7 +157,7 @@ Handling Notifications
The heart of the system is the collector, which monitors the message
bus for data being provided by the pollsters via the agent as well as
notification messages from other OpenStack components such as nova,
glance, quantum, and swift.
glance, neutron, and swift.
The collector loads one or more *listener* plugins, using the namespace
``ceilometer.collector``. Each plugin can listen to any topics, but by

View File

@ -34,7 +34,7 @@ Parameter Default Note
nova_control_exchange nova Exchange name for Nova notifications
glance_control_exchange glance Exchange name for Glance notifications
cinder_control_exchange cinder Exchange name for Cinder notifications
quantum_control_exchange quantum Exchange name for Quantum notifications
neutron_control_exchange neutron Exchange name for Neutron notifications
metering_secret change this or be hacked Secret value for signing metering messages
metering_topic metering the topic ceilometer uses for metering messages
counter_source openstack The source name of emited counters

View File

@ -89,7 +89,7 @@ hypervisors while test coverage was mostly done based on KVM. Contributors
are welcome to implement other virtualization backends meters or complete
the existing ones.
Network (Quantum)
Network (Neutron)
=================
======================== ========== ======== ======== ============ ======================================================

View File

@ -82,8 +82,8 @@
# Options defined in ceilometer.network.notifications
#
# Exchange name for Quantum notifications (string value)
#quantum_control_exchange=quantum
# Exchange name for Neutron notifications (string value)
#neutron_control_exchange=neutron
#

View File

@ -21,12 +21,20 @@ then
echo "notification_driver=cinder.openstack.common.notifier.rabbit_notifier" >> $CINDER_CONF
fi
# For compatibility with Grizzly
QUANTUM_CONF=/etc/quantum/quantum.conf
if ! grep -q "notification_driver=quantum.openstack.common.notifier.rabbit_notifier" $QUANTUM_CONF
then
echo "notification_driver=quantum.openstack.common.notifier.rabbit_notifier" >> $QUANTUM_CONF
fi
# Havana release onward
NEUTRON_CONF=/etc/neutron/neutron.conf
if ! grep -q "notification_driver=neutron.openstack.common.notifier.rabbit_notifier" $NEUTRON_CONF
then
echo "notification_driver=neutron.openstack.common.notifier.rabbit_notifier" >> $NEUTRON_CONF
fi
# For nova we set both the rabbit notifier and the special ceilometer
# notifier that forces one more poll to happen before an instance is
# removed.