Emit event notifications in Horizon

Registered by Ala Rezmerita

This blueprint has been superseded. See the newer blueprint "Support for realtime communication" for updated plans.

Horizon should use oslo.notify to emit event notifications.

This can be usefull for several reasons :
* Usage
- for diagnosis purposes by identifying user’s actions in Horizon (addressing customer support tools)
- for behavioural analysis of customer (addressing marketing tools)
- for audit purposes
- for billing
* QoS :
- for global performance analysis (response time) (adressing operational tools)
- for reliablitity and availability analysis (error and exceptions occurences) vs end-user experience (and maybe SLA violation)

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
High
Drafter:
Ala Rezmerita
Direction:
Needs approval
Assignee:
None
Definition:
Superseded
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Matthias Runge

Related branches

Sprints

Whiteboard

2013-11-25 | Florent Flament | Implementation proposal

Notifications are implemented in several Openstack projects, including
Nova, Cinder and Keystone.

Notifications are implemented in two different manners:

* Cinder and Nova define `notify_about_*` functions in a `utils.py`
  (ex volume/utils.py) file. These functions are then called when
  required by the different methods (ex volume/manager.py).

* Keystone defines decorators (created, updated and deleted) in the
  `notifications.py` file. These decorators are then used to decorate
  methods that need to send notifications (ex identity/core.py method
  Manager.create_user)

We propose to reproduce Cinder/Nova notifications implementation into
Horizon. We believe that this implementation is more flexible, since
it allows adding notifications inside the body of methods (for
instance in except blocks). While decorators only allow notifications
just before or after calling decorated methods.

To provide a full coverage of every possible user action, we will have
to add notifications to each form/workflow "handle" method. As of
today, there are 83 such methods to update:

    $ grep -r "def handle" horizon/openstack_dashboard/ | wc -l

2013-11-26 | Florent Flament | Implementation proposal update

An interesting article about notifications is available there:
http://www.sandywalsh.com/2013/09/notification-usage-in-openstack-report.html

The .start/.end notification pattern will be adopted and implemented
using decorators, based on Keystone's implementation. Specific
notifications may be implemented later using function calls (or other
decorators).

A general purpose notification decorator will first be pushed to
Oslo-incubator, then pushed to Horizon.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.