summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-31 22:14:23 +0000
committerGerrit Code Review <review@openstack.org>2016-03-31 22:14:24 +0000
commitf35da84c490448d70ff35c9cef35ed47c4af45b6 (patch)
tree5e5282a94c001499db3e38e449ea41323263c9cd
parent0078575428e5cd00730204838662b24e44f0fe50 (diff)
parentc7b70754053ea482b302a78eb241b15985419dad (diff)
downloaddesignate-2.0.0.tar.gz
Merge "Adding v2 namespaced event to zone manager" into stable/mitaka2.0.0.0rc22.0.0
-rw-r--r--designate/tests/unit/test_zone_manager/test_tasks.py15
-rw-r--r--designate/zone_manager/tasks.py1
2 files changed, 14 insertions, 2 deletions
diff --git a/designate/tests/unit/test_zone_manager/test_tasks.py b/designate/tests/unit/test_zone_manager/test_tasks.py
index 7fef90be..f4694692 100644
--- a/designate/tests/unit/test_zone_manager/test_tasks.py
+++ b/designate/tests/unit/test_zone_manager/test_tasks.py
@@ -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):
diff --git a/designate/zone_manager/tasks.py b/designate/zone_manager/tasks.py
index d808c596..0e4040ec 100644
--- a/designate/zone_manager/tasks.py
+++ b/designate/zone_manager/tasks.py
@@ -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"),