[openstack-dev] [nova] objects notifications

Gary Kotton gkotton at vmware.com
Wed Jul 30 19:22:35 UTC 2014



On 7/30/14, 7:26 AM, "Dan Smith" <dms at 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 to do this in a repeatable, but perhaps not
>totally automatic way. I can see that any time instance gets changed in
>certain ways, that we'd want a notification about it. However, there are
>probably some cases that don't fit that. For example,
>instance.system_metadata is mostly private to nova I think, so I'm not
>sure we'd want to emit a notification for that. Plus, we'd probably end
>up with some serious duplication if we just do it implicitly.
>
>What if we provided a way to declare the fields of an object that we
>want to trigger a notification? Something like:

I think that this is a nice idea that we should look into

>
>  NOTIFICATION_FIELDS = ['host', 'metadata', ...]
>
>  @notify_on_save(NOTIFICATION_FIELDS)
>  @base.remotable
>  def save(context):
>      ...
>
>--Dan
>




More information about the OpenStack-dev mailing list