Fix typo in config and rename Quantrum > Neutron everywhere

Change-Id: I95e26f5235ff320a2ac5427b2bca8a4ca07d8b0d
This commit is contained in:
Endre Karlson 2013-11-29 15:17:53 +01:00 committed by Gerrit Code Review
parent eb164336c5
commit 23009b8193
9 changed files with 19 additions and 19 deletions

@ -20,21 +20,21 @@ from designate.notification_handler.base import BaseAddressHandler
LOG = logging.getLogger(__name__)
cfg.CONF.register_group(cfg.OptGroup(
name='handler:quantum_floatingip',
title="Configuration for Quantum Notification Handler"
name='handler:neutron_floatingip',
title="Configuration for Neutron Notification Handler"
))
cfg.CONF.register_opts([
cfg.ListOpt('notification-topics', default=['monitor']),
cfg.StrOpt('control-exchange', default='quantum'),
cfg.StrOpt('control-exchange', default='neutron'),
cfg.StrOpt('domain-id', default=None),
cfg.StrOpt('format', default=None)
], group='handler:quantum_floatingip')
], group='handler:neutron_floatingip')
class QuantumFloatingHandler(BaseAddressHandler):
""" Handler for Quantum's notifications """
__plugin_name__ = 'quantum_floatingip'
class NeutronFloatingHandler(BaseAddressHandler):
""" Handler for Neutron's notifications """
__plugin_name__ = 'neutron_floatingip'
def get_exchange_topics(self):
exchange = cfg.CONF[self.name].control_exchange
@ -53,7 +53,7 @@ class QuantumFloatingHandler(BaseAddressHandler):
LOG.debug('%s recieved notification - %s',
self.get_canonical_name(), event_type)
# FIXME: Quantum doesn't send ipv in the payload, should maybe
# FIXME: Neutron doesn't send ipv in the payload, should maybe
# determine this?
if event_type not in self.get_event_types():
raise ValueError('NovaFixedHandler recieved an invalid event type')

@ -15,29 +15,29 @@
# under the License.
from designate.openstack.common import log as logging
from designate.tests import TestCase
from designate.notification_handler.quantum import QuantumFloatingHandler
from designate.notification_handler.neutron import NeutronFloatingHandler
from designate.tests.test_notification_handler import \
NotificationHandlerMixin
LOG = logging.getLogger(__name__)
class QuantumFloatingHandlerTest(TestCase, NotificationHandlerMixin):
class NeutronFloatingHandlerTest(TestCase, NotificationHandlerMixin):
def setUp(self):
super(QuantumFloatingHandlerTest, self).setUp()
super(NeutronFloatingHandlerTest, self).setUp()
self.central_service = self.start_service('central')
domain = self.create_domain()
self.domain_id = domain['id']
self.config(domain_id=domain['id'], group='handler:quantum_floatingip')
self.config(domain_id=domain['id'], group='handler:neutron_floatingip')
self.plugin = QuantumFloatingHandler()
self.plugin = NeutronFloatingHandler()
def test_floatingip_associate(self):
event_type = 'floatingip.update.end'
fixture = self.get_notification_fixture(
'quantum', event_type + '_associate')
'neutron', event_type + '_associate')
self.assertIn(event_type, self.plugin.get_event_types())
@ -58,13 +58,13 @@ class QuantumFloatingHandlerTest(TestCase, NotificationHandlerMixin):
def test_floatingip_disassociate(self):
start_event_type = 'floatingip.update.end'
start_fixture = self.get_notification_fixture(
'quantum', start_event_type + '_associate')
'neutron', start_event_type + '_associate')
self.plugin.process_notification(start_event_type,
start_fixture['payload'])
event_type = 'floatingip.update.end'
fixture = self.get_notification_fixture(
'quantum', event_type + '_disassociate')
'neutron', event_type + '_disassociate')
self.assertIn(event_type, self.plugin.get_event_types())

@ -129,12 +129,12 @@ root_helper = sudo
#format = '%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s'
#------------------------
# Quantum Floating Handler
# Neutron Floating Handler
#------------------------
[handler:quantum_floating]
[handler:neutron_floatingip]
#domain_id = <random uuid>
#notification_topics = monitor
#control_exchange = 'quantum'
#control_exchange = 'neutron'
#format = '%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s'