Merge "Adding v2 namespaced event to zone manager" into stable/mitaka

This commit is contained in:
Jenkins 2016-03-31 22:14:23 +00:00 committed by Gerrit Code Review
commit f35da84c49
2 changed files with 14 additions and 2 deletions

View File

@ -165,9 +165,14 @@ class PeriodicExistsTest(TaskTest):
data = dict(zone)
data.update(self.period_data)
self.mock_notifier.info.assert_called_with(
# Ensure both the old (domain) and new (zone) events are fired
# until the old is fully deprecated.
self.mock_notifier.info.assert_any_call(
self.ctxt, "dns.domain.exists", data)
self.mock_notifier.info.assert_any_call(
self.ctxt, "dns.zone.exists", data)
def test_emit_exists_no_zones(self):
with mock.patch.object(self.task, '_iter_zones') as iter_:
iter_.return_value = []
@ -184,9 +189,15 @@ class PeriodicExistsTest(TaskTest):
for z in zones:
data = dict(z)
data.update(self.period_data)
self.mock_notifier.info.assert_called_with(
# Ensure both the old (domain) and new (zone) events are fired
# until the old is fully deprecated.
self.mock_notifier.info.assert_any_call(
self.ctxt, "dns.domain.exists", data)
self.mock_notifier.info.assert_any_call(
self.ctxt, "dns.zone.exists", data)
class PeriodicSecondaryRefreshTest(TaskTest):
def setUp(self):

View File

@ -192,6 +192,7 @@ class PeriodicExistsTask(PeriodicTask):
zone_data.update(extra_data)
self.notifier.info(ctxt, 'dns.domain.exists', zone_data)
self.notifier.info(ctxt, 'dns.zone.exists', zone_data)
LOG.info(_LI("Finished emitting %(counter)d events for shards "
"%(start)s to %(end)s"),