Add audit.planner events

In this changeset, I implemented the following notifications:

- audit.planner.start
- audit.planner.end
- audit.planner.error

Partially Implements: blueprint audit-versioned-notifications-api

Change-Id: I29d371f8cb3fd7948c87bec97186e24a88e8fdb6
This commit is contained in:
Vincent Françoise
2016-11-08 11:13:58 +01:00
parent 19fe0a0c56
commit 25da1636b1
10 changed files with 331 additions and 68 deletions

View File

@@ -65,6 +65,12 @@ class TestOneShotAuditHandler(base.DbTestCase):
phase=objects.fields.NotificationPhase.START),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.STRATEGY,
phase=objects.fields.NotificationPhase.END),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.PLANNER,
phase=objects.fields.NotificationPhase.START),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.PLANNER,
phase=objects.fields.NotificationPhase.END)]
self.assertEqual(
@@ -106,6 +112,12 @@ class TestOneShotAuditHandler(base.DbTestCase):
phase=objects.fields.NotificationPhase.START),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.STRATEGY,
phase=objects.fields.NotificationPhase.END),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.PLANNER,
phase=objects.fields.NotificationPhase.START),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.PLANNER,
phase=objects.fields.NotificationPhase.END)]
self.assertEqual(
@@ -125,6 +137,12 @@ class TestOneShotAuditHandler(base.DbTestCase):
phase=objects.fields.NotificationPhase.START),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.STRATEGY,
phase=objects.fields.NotificationPhase.END),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.PLANNER,
phase=objects.fields.NotificationPhase.START),
mock.call(self.context, self.audit,
action=objects.fields.NotificationAction.PLANNER,
phase=objects.fields.NotificationPhase.END)]
self.assertEqual(