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:
dongwenjuan 2016-11-11 17:44:33 +08:00
parent 427237bb5c
commit 1b4fcf5f39
2 changed files with 3 additions and 1 deletions

View 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: