doc: add recomendation for delete notifications
Based on the mail discussion [1] I think we should use the same payload for delete, create, update notifications of the same entity. This will help keep the notifications more consistent and easier to filter. [1] http://lists.openstack.org/pipermail/openstack-dev/2016-December/109501.html Change-Id: If4237b111ffb0e8511b6a73c57807b9bd4addf80
This commit is contained in:
committed by
Matt Riedemann
parent
a74d3ae4e8
commit
65ad654ebb
@@ -293,13 +293,14 @@ requires the notification.
|
||||
payload (note that it is not supported by the notification framework
|
||||
currently) or sending both the old state and the new state of the entity in
|
||||
the payload.
|
||||
* You should not include those parts of the entity that are unchanged or static
|
||||
in relation to the event you are sending the notification about. So that
|
||||
you can limit the size of the payload and avoid unnecessary repetition.
|
||||
* You should never include a nova internal object in the payload. Create a new
|
||||
object and use the SCHEMA field to map the internal object to the
|
||||
notification payload. This way the evolution of the internal object model
|
||||
can be decoupled from the evolution of the notification payload.
|
||||
* The delete notification should contain the same information as the create or
|
||||
update notifications. This makes it possible for the consumer to listen only to
|
||||
the delete notifications but still filter on some fields of the entity
|
||||
(e.g. project_id).
|
||||
|
||||
Existing versioned notifications
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user