3 The Spike microservice consumes and processes the Champ graph data event stream from which it generates events to be consumed by other components.
9 Spike receives events from the Champ microservice regarding changes to the graph database. Spike will buffer these events in an attempt to ensure proper chronological ordering, and then output them onto a configurable kafka or DMaaP queue.
11 The messages are in a similar format to Gizmo's async pipeline. Here are some examples:
18 "event-type":"update-notification",
19 "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
20 "source-name":"SPIKE",
21 "timestamp":"20180807T153514Z"
24 "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
26 "schema-version":"V14",
28 "key":"541cf447-09f5-4484-a765-845e71aab1f2",
30 "aai-last-mod-ts":1533656090789,
32 "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2",
33 "vserver-name":"test-vserver",
34 "aai-created-ts":1533656090789,
36 "last-mod-source-of-truth":"Gizmo-Creator",
37 "vserver-name2":"alt-test-vserver",
38 "source-of-truth":"Gizmo-Creator",
39 "vserver-selflink":"http://1.2.3.4/moreInfo",
40 "is-closed-loop-disabled":false,
41 "aai-node-type":"vserver"
45 "timestamp":1533656091474
53 "event-type":"update-notification",
54 "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
55 "source-name":"SPIKE",
56 "timestamp":"20180807T153514Z"
59 "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
61 "schema-version":"V14",
63 "key":"541cf447-09f5-4484-a765-845e71aab1f2",
65 "aai-last-mod-ts":1533656090789,
67 "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2",
68 "vserver-name":"test-vserver",
69 "aai-created-ts":1533656090789,
71 "last-mod-source-of-truth":"Gizmo-Creator",
72 "vserver-name2":"alt-test-vserver",
73 "source-of-truth":"Gizmo-Creator",
74 "vserver-selflink":"http://1.2.3.4/moreInfo",
75 "is-closed-loop-disabled":false,
76 "aai-node-type":"vserver"
80 "timestamp":1533656091474
88 "event-type":"update-notification",
89 "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
90 "source-name":"SPIKE",
91 "timestamp":"20180807T153514Z"
94 "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
96 "schema-version":"V14",
98 "key":"541cf447-09f5-4484-a765-845e71aab1f2",
100 "aai-last-mod-ts":1533656090789,
102 "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2",
103 "vserver-name":"test-vserver",
104 "aai-created-ts":1533656090789,
105 "vserver-id":"VSER1",
106 "last-mod-source-of-truth":"Gizmo-Creator",
107 "vserver-name2":"alt-test-vserver",
108 "source-of-truth":"Gizmo-Creator",
109 "vserver-selflink":"http://1.2.3.4/moreInfo",
110 "is-closed-loop-disabled":false,
111 "aai-node-type":"vserver"
114 "operation":"DELETE",
115 "timestamp":1533656091474
120 ##### Create Relationship
124 "event-type":"update-notification",
125 "request-id":"1f2eced7-8300-4e72-966d-f345027c987a",
126 "source-name":"SPIKE",
127 "timestamp":"20180807T153514Z"
130 "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a",
134 "key":"ed76551f-f47f-47f9-a23d-052634446e76"
136 "schema-version":"v14",
137 "type":"tosca.relationships.HostedOn",
138 "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b",
140 "prevent-delete":"IN",
142 "delete-other-v":"NONE",
143 "contains-other-v":"NONE"
147 "key":"981c0494-c742-4d75-851c-8194bbbd8a96"
150 "operation":"CREATE",
151 "timestamp":1533656086207
155 ##### Update Relationship
159 "event-type":"update-notification",
160 "request-id":"1f2eced7-8300-4e72-966d-f345027c987a",
161 "source-name":"SPIKE",
162 "timestamp":"20180807T153514Z"
165 "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a",
169 "key":"ed76551f-f47f-47f9-a23d-052634446e76"
171 "schema-version":"v14",
172 "type":"tosca.relationships.HostedOn",
173 "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b",
175 "prevent-delete":"IN",
177 "delete-other-v":"NONE",
178 "contains-other-v":"NONE"
182 "key":"981c0494-c742-4d75-851c-8194bbbd8a96"
185 "operation":"UPDATE",
186 "timestamp":1533656086207
190 ##### Delete Relationship
194 "event-type":"update-notification",
195 "request-id":"1f2eced7-8300-4e72-966d-f345027c987a",
196 "source-name":"SPIKE",
197 "timestamp":"20180807T153514Z"
200 "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a",
204 "key":"ed76551f-f47f-47f9-a23d-052634446e76"
206 "schema-version":"v14",
207 "type":"tosca.relationships.HostedOn",
208 "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b",
210 "prevent-delete":"IN",
212 "delete-other-v":"NONE",
213 "contains-other-v":"NONE"
217 "key":"981c0494-c742-4d75-851c-8194bbbd8a96"
220 "operation":"DELETE",
221 "timestamp":1533656086207
227 Champ, and therefore Spike, will publish separate events for each operation done within a transaction. Operations from the same transaction can be identified via the database-transaction-id field.
229 ##### Transaction example
231 The following three events were created in a single bulk request from Gizmo. Note the database-transaction-id.
236 "event-type":"update-notification",
237 "request-id":"9fc953af-bb41-4cfe-b522-dc6a9d1b5830",
238 "source-name":"SPIKE",
239 "timestamp":"20180807T162714Z"
242 "transaction-id":"9fc953af-bb41-4cfe-b522-dc6a9d1b5830",
244 "schema-version":"V14",
246 "key":"9c649f2b-7500-4b35-abb8-d51008fb28fe",
248 "aai-last-mod-ts":1533659209321,
250 "aai-uuid":"9c649f2b-7500-4b35-abb8-d51008fb28fe",
251 "vserver-name":"test-vserver",
252 "aai-created-ts":1533659209321,
253 "vserver-id":"VSER1",
254 "last-mod-source-of-truth":"test1",
255 "vserver-name2":"alt-test-vserver",
256 "source-of-truth":"test1",
257 "vserver-selflink":"http://1.2.3.4/moreInfo",
258 "is-closed-loop-disabled":false
261 "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378",
262 "operation":"CREATE",
263 "timestamp":1533659209324
268 "event-type":"update-notification",
269 "request-id":"6f7db331-a0b9-4194-917c-7f24124b5d46",
270 "source-name":"SPIKE",
271 "timestamp":"20180807T162714Z"
274 "transaction-id":"6f7db331-a0b9-4194-917c-7f24124b5d46",
276 "schema-version":"V14",
278 "key":"ecec281a-c0c0-47af-8ec8-019753edc28c",
280 "ptnii-equip-name":"e-name",
281 "aai-last-mod-ts":1533659209637,
282 "equip-type":"server",
284 "fqdn":"myhost.onap.net",
285 "purpose":"my-purpose",
286 "aai-created-ts":1533659209637,
287 "ipv4-oam-address":"1.2.3.4",
288 "source-of-truth":"test1",
289 "hostname":"steve-host2",
290 "equip-model":"DL380p-nd",
292 "aai-uuid":"ecec281a-c0c0-47af-8ec8-019753edc28c",
293 "last-mod-source-of-truth":"test1"
296 "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378",
297 "operation":"CREATE",
298 "timestamp":1533659209645
303 "event-type":"update-notification",
304 "request-id":"54f0f573-eb22-4ce2-b51b-4af0904c9782",
305 "source-name":"SPIKE",
306 "timestamp":"20180807T162714Z"
309 "transaction-id":"54f0f573-eb22-4ce2-b51b-4af0904c9782",
310 "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378",
314 "key":"9c649f2b-7500-4b35-abb8-d51008fb28fe"
316 "schema-version":"v14",
317 "type":"tosca.relationships.HostedOn",
318 "key":"410cb65a-1b46-4d23-a5b4-9f57bdc918c1",
320 "prevent-delete":"IN",
322 "delete-other-v":"NONE",
323 "contains-other-v":"NONE"
327 "key":"ecec281a-c0c0-47af-8ec8-019753edc28c"
330 "operation":"CREATE",
331 "timestamp":1533659210721
337 The Spike micro service supports the standard echo service to allow it to be 'pinged' to verify that the service is up and responding.
339 The echo service is reachable via the following REST end point:
341 https://<host>:9518/services/spike/v1/echo-service/echo