3 Gizmo has two modes, a Synchoronous (sync) mode and an Asynchronous (async) mode.
5 In the Async mode, Gizmo uses the consumer/producer model where when a
6 client makes a request, Gizmo will generate an event payload and
7 publish it on the async event stream. It will then wait for a
8 response for that particular event on a different event stream. Once it recieves a
9 response, gizmo will send a response back to the client which made the
12 Note: In the examples below, there is a database-transaction-id and a
13 transaction-id. A database-transaction-id is only present in the
14 payload when it's part of bulk operation.
16 ## Here are a few examples of the events published by Gizmo
23 "timestamp": 1514927928167,
24 "operation": "CREATE",
27 "ipv4-oam-address": "1.2.3.4",
28 "resource-version": "1477013499",
29 "purpose": "my-purpose",
30 "fqdn": "myhost.onap.net",
32 "equip-model": "DL380p-nd",
34 "equip-type": "server",
36 "ptnii-equip-name": "e-name"
40 "schema-version": "vX"
42 "transaction-id": "c0a81fa7-5ef4-49cd-ab39-e42c53c9b9a4",
43 "database-transaction-id": "b3e2853e-f643-47a3-a0c3-cb54cc997ad3"
46 #### Updating a Vertex
49 "timestamp": 1514929776429,
50 "operation": "UPDATE",
53 "ipv4-oam-address": "1.2.3.4",
54 "resource-version": "1477013499",
55 "purpose": "my-purpose",
56 "fqdn": "updated.myhost.onap.net",
58 "equip-model": "DELL380p-nd",
59 "equip-vendor": "DELL",
60 "equip-type": "updated-server",
61 "hostname": "updated-myhost",
62 "ptnii-equip-name": "name-has-been-updated"
64 "key": "84bf7b3f-81f5-4c34-ab5c-207281cb71bd",
66 "schema-version": "vX"
68 "transaction-id": "3b8df1d5-4c51-47e3-bbef-c27b47e11149",
69 "database-transaction-id": "b3e2853e-f643-47a3-a0c3-cb54cc997ad3"
72 #### Deleting a Vertex
75 "timestamp": 1514930052327,
76 "operation": "DELETE",
78 "key": "84bf7b3f-81f5-4c34-ab5c-207281cb71bd",
80 "schema-version": "vX"
82 "transaction-id": "6bb7a27b-a942-4cac-9b2b-0fa1f3897b8c",
83 "database-transaction-id": "b3e2853e-f643-47a3-a0c3-cb54cc997ad3"
90 "timestamp": 1515005153863,
91 "operation": "CREATE",
94 "key": "febd8996-62ec-4ce6-ba8e-d2fa1609e13b",
98 "contains-other-v": "NONE",
99 "delete-other-v": "NONE",
100 "prevent-delete": "IN",
104 "type": "tosca.relationships.HostedOn",
105 "schema-version": "v11",
107 "key": "7beade35-19f1-4c1d-a1bd-bfba59e0b582",
111 "transaction-id": "63a8994d-1118-4e65-ab06-fff40f6f48ef",
112 "database-transaction-id": "b3e2853e-f643-47a3-a0c3-cb54cc997ad3"
118 "timestamp": 1515005301622,
119 "operation": "UPDATE",
122 "key": "febd8996-62ec-4ce6-ba8e-d2fa1609e13b",
126 "contains-other-v": "NOPE",
127 "delete-other-v": "YES",
128 "prevent-delete": "MAYBE",
131 "key": "9727a0ea-559e-497c-98e4-0cbdaede0346",
132 "type": "tosca.relationships.HostedOn",
133 "schema-version": "v11",
135 "key": "7beade35-19f1-4c1d-a1bd-bfba59e0b582",
139 "transaction-id": "ed284991-6c2f-4c94-a592-76fed17a2f14",
140 "database-transaction-id": "b3e2853e-f643-47a3-a0c3-cb54cc997ad3"
144 #### Deleting an Edge
147 "timestamp": 1515005579837,
148 "operation": "DELETE",
150 "key": "9727a0ea-559e-497c-98e4-0cbdaede0346",
151 "type": "tosca.relationships.HostedOn",
152 "schema-version": "v11"
154 "transaction-id": "b4583bc9-dd96-483f-ab2d-20c1c6e5622f",
155 "database-transaction-id": "b3e2853e-f643-47a3-a0c3-cb54cc997ad3"
159 ## Gizmo expects a response event in the following formats
163 #### Adding Vertex Response
166 "timestamp": 1519832579046,
167 "operation": "CREATE",
170 "last-mod-source-of-truth": "champ-response",
171 "resource-version": "1477013499",
172 "aai-uuid": "12a0ca27-25b1-41c2-b9ff-4bf54a3caa8a",
174 "equip-model": "DELL380p-nd",
175 "hostname": "updated-myhost",
176 "source-of-truth": "champ-response",
177 "ipv4-oam-address": "1.2.3.4",
178 "aai-created-ts": 1519832577709,
179 "purpose": "my-purpose",
180 "fqdn": "updated.myhost.onap.net",
181 "equip-vendor": "DELL",
182 "equip-type": "updated-server",
183 "aai-last-mod-ts": 1519832577709,
184 "ptnii-equip-name": "testing"
186 "key": "12a0ca27-25b1-41c2-b9ff-4bf54a3caa8a",
188 "schema-version": "v11"
190 "transaction-id": "d5c15dd3-2492-4ab9-86a3-e1cd39221e4a",
194 #### Updating Vertex Response
197 "timestamp": 1519833774425,
198 "operation": "UPDATE",
201 "last-mod-source-of-truth": "shwetank-updating",
202 "resource-version": "shwetank-resource",
203 "aai-uuid": "12a0ca27-25b1-41c2-b9ff-4bf54a3caa8a",
205 "equip-model": "testing-update",
207 "source-of-truth": "champ-response",
208 "ipv4-oam-address": "1.2.3.4",
209 "aai-created-ts": 1519832577709,
210 "purpose": "my-purpose-testing-update",
211 "fqdn": "created.myhost.onap.net",
212 "equip-vendor": "testing-update",
213 "equip-type": "shwetank",
214 "aai-last-mod-ts": 1519833774407,
215 "ptnii-equip-name": "testing-update"
217 "key": "12a0ca27-25b1-41c2-b9ff-4bf54a3caa8a",
219 "schema-version": "v11"
221 "transaction-id": "2981a1b0-30d6-4323-8b36-c80636a1639f",
226 #### Deleting Vertex Response
229 "timestamp": 1519839126416,
230 "operation": "DELETE",
232 "key": "12a0ca27-25b1-41c2-b9ff-4bf54a3caa8a",
234 "schema-version": "v11"
236 "transaction-id": "78650070-a500-47bb-98e5-e46aba77612a",
243 #### Adding Edge Response
246 "timestamp": 1519835679492,
247 "operation": "CREATE",
250 "key": "2674b073-2eb5-484b-a21c-7e36983b7cd4",
254 "contains-other-v": "NONE",
255 "delete-other-v": "NONE",
256 "aai-created-ts": 1519835679447,
257 "prevent-delete": "IN",
259 "aai-uuid": "149620ae-2382-41a2-b626-1dd321fad4bb",
260 "aai-last-mod-ts": 1519835679447
262 "key": "149620ae-2382-41a2-b626-1dd321fad4bb",
263 "type": "tosca.relationships.HostedOn",
264 "schema-version": "v11",
266 "key": "b945d923-b596-4339-a80f-f72ca9a4fe1f",
270 "transaction-id": "83c7776d-88c9-4fbe-b129-11f40d20348b",
274 #### Update Edge Response
277 "timestamp": 1519838804681,
278 "operation": "UPDATE",
281 "key": "2674b073-2eb5-484b-a21c-7e36983b7cd4",
285 "contains-other-v": "NONE",
286 "delete-other-v": "NONE",
287 "aai-created-ts": 1519835679447,
289 "prevent-delete": "TRUE",
290 "aai-uuid": "149620ae-2382-41a2-b626-1dd321fad4bb",
291 "aai-last-mod-ts": 1519838804671
293 "key": "149620ae-2382-41a2-b626-1dd321fad4bb",
294 "type": "tosca.relationships.HostedOn",
295 "schema-version": "v11",
297 "key": "b945d923-b596-4339-a80f-f72ca9a4fe1f",
301 "transaction-id": "644839f0-bb6d-490f-8f79-bb8227198ed2",
305 #### Delete Edge Response
308 "timestamp": 1519838964576,
309 "operation": "DELETE",
311 "key": "149620ae-2382-41a2-b626-1dd321fad4bb",
312 "type": "tosca.relationships.HostedOn",
313 "schema-version": "v11"
315 "transaction-id": "db3e67ae-28e3-4c1d-bf63-ec398cf28d98",
322 #### Failed Operation Response
326 "timestamp": 1519843867529,
327 "operation": "UPDATE",
328 "httpErrorStatus": "BAD_REQUEST",
329 "error-message": "aai-created-ts can't be updated",
332 "last-mod-source-of-truth": "shwetank-creating-for-update",
333 "ipv4-oam-address": "1.2.3.4",
334 "aai-created-ts": 123456789,
335 "resource-version": "shwetank-resource",
336 "purpose": "my-purpose-creating-for-patching",
337 "fqdn": "created.myhost.onap.net",
339 "equip-model": "creating-for-patching",
340 "equip-vendor": "creating-for-patching",
341 "equip-type": "testing-2",
343 "ptnii-equip-name": "creating-for-patching"
345 "key": "10572385-3211-4c80-a7c5-cea648513271",
347 "schema-version": "v11"
349 "transaction-id": "25d4c3e9-d4ab-41ec-b2a9-832286a726db",