<html><body>
<p><tt><font size="2">Sandy Walsh <sandy.walsh@rackspace.com> wrote on 11/25/2013 10:30:05 AM:<br>
<br>
> From: Sandy Walsh <sandy.walsh@rackspace.com></font></tt><br>
<tt><font size="2">> To: <openstack-dev@lists.openstack.org>, </font></tt><br>
<tt><font size="2">> Date: 11/25/2013 10:34 AM</font></tt><br>
<tt><font size="2">> Subject: Re: [openstack-dev] Adding notifications to Horizon</font></tt><br>
<tt><font size="2">> <br>
> +1 on the inline method. It makes it clear when a notification should be<br>
> emitted and, as you say, handles the exception handling better.</font></tt><br>
<br>
<tt><font size="2">This might be a good opportunity to add the decorator from Keystone's </font></tt><br>
<tt><font size="2">notification module to Oslo-incubator, and recycle some of that code.</font></tt><br>
<br>
<a href="https://github.com/openstack/keystone/blob/master/keystone/notifications.py#L26"><font size="3" color="#0000FF" face="serif"><u>https://github.com/openstack/keystone/blob/master/keystone/notifications.py#L26</u></font></a><font size="3" face="serif"> </font><br>
<br>
<tt><font size="2">I know some projects may require more information to be sent in the event payload: </font></tt><br>
<a href="https://github.com/openstack/nova/blob/master/nova/compute/api.py#L783"><font size="3" color="#0000FF" face="serif"><u>https://github.com/openstack/nova/blob/master/nova/compute/api.py#L783</u></font></a><font size="3" face="serif"> </font><br>
<br>
<tt><font size="2">but a general case (like Keystone) that requires only a UUID of the resource </font></tt><br>
<tt><font size="2">and the type of action being created, the current decorator does this pretty well.</font></tt><br>
<a href="https://github.com/openstack/keystone/blob/master/keystone/assignment/core.py#L66"><font size="3" color="#0000FF" face="serif"><u>https://github.com/openstack/keystone/blob/master/keystone/assignment/core.py#L66</u></font></a><font size="3" face="serif"> </font><br>
<br>
<tt><font size="2">If this is the direction of event notifications in Horizon, it would be nice to </font></tt><br>
<tt><font size="2">settle on one implementation.</font></tt><br>
<tt><font size="2"><br>
> <br>
> Also, if it makes sense for Horizon, consider bracketing long-running<br>
> operations in .start/.end pairs. This will help with performance tuning<br>
> and early error detection.<br>
> <br>
> More info on "well behaved notifications" in here:<br>
> <a href="http://www.sandywalsh.com/2013/09/notification-usage-in-openstack-report.html">http://www.sandywalsh.com/2013/09/notification-usage-in-openstack-report.html</a><br>
> <br>
> Great to see!<br>
> <br>
> -S<br>
> <br>
> <br>
> On 11/25/2013 11:58 AM, Florent Flament wrote:<br>
> > Hi,<br>
> > <br>
> > I am interested in adding AMQP notifications to the Horizon dashboard,<br>
> > as described in the following blueprint:<br>
> > <a href="https://blueprints.launchpad.net/horizon/+spec/horizon-notifications">https://blueprints.launchpad.net/horizon/+spec/horizon-notifications</a><br>
> > <br>
> > There are currently several implementations in Openstack. While<br>
> > Nova and Cinder define `notify_about_*` methods that are called<br>
> > whenever a notification has to be sent, Keystone uses decorators,<br>
> > which send appropriate notifications when decorated methods are<br>
> > called.<br>
> > <br>
> > I fed the blueprint's whiteboard with an implementation proposal,<br>
> > based on Nova and Cinder implementation. I would be interested in<br>
> > having your opinion about which method would fit best, and whether<br>
> > these notifications make sense at all.<br>
> > <br>
> > Cheers,<br>
> > Florent Flament<br>
> > <br>
> > _______________________________________________<br>
> > OpenStack-dev mailing list<br>
> > OpenStack-dev@lists.openstack.org<br>
> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
> > <br>
> <br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> OpenStack-dev@lists.openstack.org<br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
> <br>
</font></tt><br>
<font size="2" face="sans-serif"><br>
<br>
Best Regards, <br>
<br>
Lance Bragstad <br>
</font></body></html>