extract 'instance_id' as 'resource_id' in event definitions
Currently the 'computer.instance.*' event traits map its 'instance_id' as 'instance_id'. But other events like volume, image, network and etc, they all map their object_id as 'resource_id'. So we support both as the event consumer can deal the events.traits with in a unified pattern. Change-Id: I69935fcce228f1b4d490d3ac91251044102a8f11
This commit is contained in:
parent
427237bb5c
commit
1b4fcf5f39
@ -213,7 +213,7 @@ quotes) like so:
|
||||
payload.image_meta.'org.openstack__1__architecture'
|
||||
|
||||
The syntax used for the field specification is a variant of JSONPath,
|
||||
and is fairly flexible.
|
||||
and is fairly flexible.
|
||||
(see: https://github.com/kennknowles/python-jsonpath-rw for more info)
|
||||
|
||||
Example Definitions file
|
||||
|
@ -7,6 +7,8 @@
|
||||
fields: payload.user_id
|
||||
instance_id:
|
||||
fields: payload.instance_id
|
||||
resource_id:
|
||||
fields: payload.instance_id
|
||||
host:
|
||||
fields: publisher_id.`split(., 1, 1)`
|
||||
service:
|
||||
|
Loading…
Reference in New Issue
Block a user