Re: [openstack-dev] [nova] objects notifications

2014-07-30 Thread Jay Lau
So we need to create a decorator method for create(), save(), destroy() etc as following? NOTIFICATION_FIELDS = ['host', 'metadata', ...] @notify_on_save(NOTIFICATION_FIELDS) @base.remotable def save(context): @notify_on_create(NOTIFICATION_FIELDS) @base.remotable def

Re: [openstack-dev] [nova] objects notifications

2014-07-30 Thread Gary Kotton
On 7/30/14, 7:26 AM, Dan Smith d...@danplanet.com wrote: When reviewing https://review.openstack.org/#/c/107954/ it occurred to me that maybe we should consider having some kind of generic object wrapper that could do notifications for objects. Any thoughts on this? I think it might be good

[openstack-dev] [nova] objects notifications

2014-07-29 Thread Gary Kotton
Hi, When reviewing https://review.openstack.org/#/c/107954/ it occurred to me that maybe we should consider having some kind of generic object wrapper that could do notifications for objects. Any thoughts on this? Thanks Gary ___ OpenStack-dev mailing

Re: [openstack-dev] [nova] objects notifications

2014-07-29 Thread Lance Bragstad
Keystone has a notifications module that is based on this idea. When implementing notification in Keystone, we wanted it to be easy to deliver notifications on new resources and extensions [1], which is where the idea of the wrapper came from. With that framework in place, we wrap our CRUD methods

Re: [openstack-dev] [nova] objects notifications

2014-07-29 Thread Mike Spreitzer
Gary Kotton gkot...@vmware.com wrote on 07/29/2014 12:43:08 PM: Hi, When reviewing https://review.openstack.org/#/c/107954/ it occurred to me that maybe we should consider having some kind of generic object wrapper that could do notifications for objects. Any thoughts on this? I am not

Re: [openstack-dev] [nova] objects notifications

2014-07-29 Thread Jay Lau
Its a good idea to have a generic way to handle object notifications. Considering that different objects might have different payload and different logic for handling payload, we may need some clear design for this. Seems a bp is needed for this. Thanks. 2014-07-30 2:49 GMT+08:00 Mike Spreitzer

Re: [openstack-dev] [nova] objects notifications

2014-07-29 Thread Dan Smith
When reviewing https://review.openstack.org/#/c/107954/ it occurred to me that maybe we should consider having some kind of generic object wrapper that could do notifications for objects. Any thoughts on this? I think it might be good to do this in a repeatable, but perhaps not totally