From ef17d89e0869973c25aa027430fbe446bba55e4b Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Tue, 2 Jul 2013 21:09:02 -0400 Subject: [PATCH] update Quantum references to Neutron implements bug 1197208 Change-Id: I5b9467a0534a0842b0262efa79f316178780f0bd --- ceilometer/network/notifications.py | 23 ++++++++++++----------- doc/source/architecture.rst | 2 +- doc/source/configuration.rst | 2 +- doc/source/measurements.rst | 2 +- etc/ceilometer/ceilometer.conf.sample | 4 ++-- tools/enable_notifications.sh | 8 ++++++++ 6 files changed, 25 insertions(+), 16 deletions(-) diff --git a/ceilometer/network/notifications.py b/ceilometer/network/notifications.py index 4686457b5..71843cb46 100644 --- a/ceilometer/network/notifications.py +++ b/ceilometer/network/notifications.py @@ -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. """ diff --git a/doc/source/architecture.rst b/doc/source/architecture.rst index fb3bc353e..eb5bf50d1 100644 --- a/doc/source/architecture.rst +++ b/doc/source/architecture.rst @@ -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 diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 3bfe6a88d..cd8d45fe9 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -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 diff --git a/doc/source/measurements.rst b/doc/source/measurements.rst index 136baec67..9a45a012e 100644 --- a/doc/source/measurements.rst +++ b/doc/source/measurements.rst @@ -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) ================= ======================== ========== ======== ======== ============ ====================================================== diff --git a/etc/ceilometer/ceilometer.conf.sample b/etc/ceilometer/ceilometer.conf.sample index a90cd1463..78b811a7f 100644 --- a/etc/ceilometer/ceilometer.conf.sample +++ b/etc/ceilometer/ceilometer.conf.sample @@ -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 # diff --git a/tools/enable_notifications.sh b/tools/enable_notifications.sh index 38967ede4..c9564ab64 100755 --- a/tools/enable_notifications.sh +++ b/tools/enable_notifications.sh @@ -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.