Add audit.strategy events

In this changeset, I implemented the following notifications:

- audit.strategy.start
- audit.strategy.end
- audit.strategy.error

Partially Implements: blueprint audit-versioned-notifications-api

Change-Id: I6ae8468caf8d215bc8bc694813beb4dc94f53fdb
This commit is contained in:
Vincent Françoise
2016-11-07 11:52:46 +01:00
parent 6f9f67cacc
commit 19fe0a0c56
13 changed files with 583 additions and 47 deletions

View File

@@ -11,6 +11,7 @@
# under the License.
import inspect
import sys
import six
@@ -31,7 +32,8 @@ class ExceptionPayload(notificationbase.NotificationPayloadBase):
}
@classmethod
def from_exception(cls, fault):
def from_exception(cls, fault=None):
fault = fault or sys.exc_info()[1]
trace = inspect.trace()[-1]
# TODO(gibi): apply strutils.mask_password on exception_message and
# consider emitting the exception_message only if the safe flag is