Remove **kwargs passing in payload __init__

The **kwargs was used in the payload class ctor to pass the payload
fields initialization up to the ovo base class. This is unnecessary
and confusing.

This patch replaces the **kwargs passing with direct field initialization
to make the payload construction more explicit.

Change-Id: I7770f6550fa40c1d9b0417efa57f58fa9c998d45
Implements: bp versioned-notification-transformation-pike
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Balazs Gibizer
2017-01-10 16:12:27 +01:00
committed by Stephen Finucane
parent 6e64cb032e
commit 3cd0908814
8 changed files with 128 additions and 74 deletions

View File

@@ -36,8 +36,7 @@ def _emit_exception_notification(notifier, context, ex, function_name, args,
@rpc.if_notifications_enabled
def _emit_versioned_exception_notification(context, ex, binary):
versioned_exception_payload = exception.ExceptionPayload.from_exception(ex)
publisher = base.NotificationPublisher(context=context, host=CONF.host,
binary=binary)
publisher = base.NotificationPublisher(host=CONF.host, binary=binary)
event_type = base.EventType(
object='compute',
action=fields.NotificationAction.EXCEPTION)