[openstack-dev] [nova] objects notifications
Dan Smith
dms at danplanet.com
Wed Jul 30 04:26:54 UTC 2014
> 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:
NOTIFICATION_FIELDS = ['host', 'metadata', ...]
@notify_on_save(NOTIFICATION_FIELDS)
@base.remotable
def save(context):
...
--Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140729/23d9b294/attachment.pgp>
More information about the OpenStack-dev
mailing list