Adding v2 namespaced event to zone manager

Change-Id: Ic5cedb3bd72b95a14665d1a0d14b9b902b92fa61
Closes-bug: #1544911
This commit is contained in:
sonu.kumar 2016-02-15 16:41:37 +05:30 committed by Kiall Mac Innes
parent f591b43bd9
commit c7b7075405
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"),