3 The Spike microservice consumes and processes the Champ graph data event stream
4 from which it generates events to be consumed by other components.
10 Spike receives events from the Champ microservice regarding changes to the graph database.
11 Spike will buffer these events in an attempt to ensure proper chronological ordering,
12 and then output them onto a configurable queue.
14 The messages are in a similar format to Gizmo's async pipeline. Here are some examples:
21 "event-type":"update-notification",
22 "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
23 "source-name":"SPIKE",
24 "timestamp":"20180807T153514Z"
27 "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
29 "schema-version":"V14",
31 "key":"541cf447-09f5-4484-a765-845e71aab1f2",
33 "aai-last-mod-ts":1533656090789,
35 "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2",
36 "vserver-name":"test-vserver",
37 "aai-created-ts":1533656090789,
39 "last-mod-source-of-truth":"Gizmo-Creator",
40 "vserver-name2":"alt-test-vserver",
41 "source-of-truth":"Gizmo-Creator",
42 "vserver-selflink":"http://1.2.3.4/moreInfo",
43 "is-closed-loop-disabled":false,
44 "aai-node-type":"vserver"
48 "timestamp":1533656091474
56 "event-type":"update-notification",
57 "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
58 "source-name":"SPIKE",
59 "timestamp":"20180807T153514Z"
62 "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
64 "schema-version":"V14",
66 "key":"541cf447-09f5-4484-a765-845e71aab1f2",
68 "aai-last-mod-ts":1533656090789,
70 "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2",
71 "vserver-name":"test-vserver",
72 "aai-created-ts":1533656090789,
74 "last-mod-source-of-truth":"Gizmo-Creator",
75 "vserver-name2":"alt-test-vserver",
76 "source-of-truth":"Gizmo-Creator",
77 "vserver-selflink":"http://1.2.3.4/moreInfo",
78 "is-closed-loop-disabled":false,
79 "aai-node-type":"vserver"
83 "timestamp":1533656091474
91 "event-type":"update-notification",
92 "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
93 "source-name":"SPIKE",
94 "timestamp":"20180807T153514Z"
97 "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021",
99 "schema-version":"V14",
101 "key":"541cf447-09f5-4484-a765-845e71aab1f2",
103 "aai-last-mod-ts":1533656090789,
105 "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2",
106 "vserver-name":"test-vserver",
107 "aai-created-ts":1533656090789,
108 "vserver-id":"VSER1",
109 "last-mod-source-of-truth":"Gizmo-Creator",
110 "vserver-name2":"alt-test-vserver",
111 "source-of-truth":"Gizmo-Creator",
112 "vserver-selflink":"http://1.2.3.4/moreInfo",
113 "is-closed-loop-disabled":false,
114 "aai-node-type":"vserver"
117 "operation":"DELETE",
118 "timestamp":1533656091474
123 ##### Create Relationship
127 "event-type":"update-notification",
128 "request-id":"1f2eced7-8300-4e72-966d-f345027c987a",
129 "source-name":"SPIKE",
130 "timestamp":"20180807T153514Z"
133 "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a",
137 "key":"ed76551f-f47f-47f9-a23d-052634446e76"
139 "schema-version":"v14",
140 "type":"tosca.relationships.HostedOn",
141 "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b",
143 "prevent-delete":"IN",
145 "delete-other-v":"NONE",
146 "contains-other-v":"NONE"
150 "key":"981c0494-c742-4d75-851c-8194bbbd8a96"
153 "operation":"CREATE",
154 "timestamp":1533656086207
158 ##### Update Relationship
162 "event-type":"update-notification",
163 "request-id":"1f2eced7-8300-4e72-966d-f345027c987a",
164 "source-name":"SPIKE",
165 "timestamp":"20180807T153514Z"
168 "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a",
172 "key":"ed76551f-f47f-47f9-a23d-052634446e76"
174 "schema-version":"v14",
175 "type":"tosca.relationships.HostedOn",
176 "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b",
178 "prevent-delete":"IN",
180 "delete-other-v":"NONE",
181 "contains-other-v":"NONE"
185 "key":"981c0494-c742-4d75-851c-8194bbbd8a96"
188 "operation":"UPDATE",
189 "timestamp":1533656086207
193 ##### Delete Relationship
197 "event-type":"update-notification",
198 "request-id":"1f2eced7-8300-4e72-966d-f345027c987a",
199 "source-name":"SPIKE",
200 "timestamp":"20180807T153514Z"
203 "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a",
207 "key":"ed76551f-f47f-47f9-a23d-052634446e76"
209 "schema-version":"v14",
210 "type":"tosca.relationships.HostedOn",
211 "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b",
213 "prevent-delete":"IN",
215 "delete-other-v":"NONE",
216 "contains-other-v":"NONE"
220 "key":"981c0494-c742-4d75-851c-8194bbbd8a96"
223 "operation":"DELETE",
224 "timestamp":1533656086207
230 Champ, and therefore Spike, will publish separate events for each operation done within a transaction.
231 Operations from the same transaction can be identified via the database-transaction-id field.
233 ##### Transaction example
235 The following three events were created in a single bulk request from Gizmo. Note the database-transaction-id.
240 "event-type":"update-notification",
241 "request-id":"9fc953af-bb41-4cfe-b522-dc6a9d1b5830",
242 "source-name":"SPIKE",
243 "timestamp":"20180807T162714Z"
246 "transaction-id":"9fc953af-bb41-4cfe-b522-dc6a9d1b5830",
248 "schema-version":"V14",
250 "key":"9c649f2b-7500-4b35-abb8-d51008fb28fe",
252 "aai-last-mod-ts":1533659209321,
254 "aai-uuid":"9c649f2b-7500-4b35-abb8-d51008fb28fe",
255 "vserver-name":"test-vserver",
256 "aai-created-ts":1533659209321,
257 "vserver-id":"VSER1",
258 "last-mod-source-of-truth":"test1",
259 "vserver-name2":"alt-test-vserver",
260 "source-of-truth":"test1",
261 "vserver-selflink":"http://1.2.3.4/moreInfo",
262 "is-closed-loop-disabled":false
265 "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378",
266 "operation":"CREATE",
267 "timestamp":1533659209324
272 "event-type":"update-notification",
273 "request-id":"6f7db331-a0b9-4194-917c-7f24124b5d46",
274 "source-name":"SPIKE",
275 "timestamp":"20180807T162714Z"
278 "transaction-id":"6f7db331-a0b9-4194-917c-7f24124b5d46",
280 "schema-version":"V14",
282 "key":"ecec281a-c0c0-47af-8ec8-019753edc28c",
284 "ptnii-equip-name":"e-name",
285 "aai-last-mod-ts":1533659209637,
286 "equip-type":"server",
288 "fqdn":"myhost.onap.net",
289 "purpose":"my-purpose",
290 "aai-created-ts":1533659209637,
291 "ipv4-oam-address":"1.2.3.4",
292 "source-of-truth":"test1",
293 "hostname":"steve-host2",
294 "equip-model":"DL380p-nd",
296 "aai-uuid":"ecec281a-c0c0-47af-8ec8-019753edc28c",
297 "last-mod-source-of-truth":"test1"
300 "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378",
301 "operation":"CREATE",
302 "timestamp":1533659209645
307 "event-type":"update-notification",
308 "request-id":"54f0f573-eb22-4ce2-b51b-4af0904c9782",
309 "source-name":"SPIKE",
310 "timestamp":"20180807T162714Z"
313 "transaction-id":"54f0f573-eb22-4ce2-b51b-4af0904c9782",
314 "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378",
318 "key":"9c649f2b-7500-4b35-abb8-d51008fb28fe"
320 "schema-version":"v14",
321 "type":"tosca.relationships.HostedOn",
322 "key":"410cb65a-1b46-4d23-a5b4-9f57bdc918c1",
324 "prevent-delete":"IN",
326 "delete-other-v":"NONE",
327 "contains-other-v":"NONE"
331 "key":"ecec281a-c0c0-47af-8ec8-019753edc28c"
334 "operation":"CREATE",
335 "timestamp":1533659210721
341 The Spike micro service supports the standard echo service to allow it
342 to be 'pinged' to verify that the service is up and responding.
344 The echo service is reachable via the following REST end point:
346 https://<host>:9518/services/spike/v1/echo-service/echo