aboutsummaryrefslogtreecommitdiffstats
path: root/ASYNC.md
diff options
context:
space:
mode:
authorShwetank Dave <shwetank.dave@amdocs.com>2018-01-03 15:00:04 -0500
committerShwetank Dave <shwetank.dave@amdocs.com>2018-01-04 09:49:42 -0500
commitd86d24d971c5b8f696ace97b2244669a331342b1 (patch)
treebcab00d607b19c815ade87c580f74f8b41188936 /ASYNC.md
parentcb54da50943ca8f2b339444bb0ce73c0d777d257 (diff)
Document Async event payloads.
For vertices and edges document respective payloads for Adding, Updating, and Deleting edges and vertices. Issue-ID: AAI-604 Change-Id: I9f8802e5bcd9083d786d71db2457caa682304133 Signed-off-by: Shwetank Dave <shwetank.dave@amdocs.com>
Diffstat (limited to 'ASYNC.md')
-rw-r--r--ASYNC.md146
1 files changed, 146 insertions, 0 deletions
diff --git a/ASYNC.md b/ASYNC.md
new file mode 100644
index 0000000..2b72675
--- /dev/null
+++ b/ASYNC.md
@@ -0,0 +1,146 @@
+# ASYNCHRONOUS MODE
+
+Gizmo has two modes, a Synchoronous (sync) mode and an Asynchronous (async) mode.
+
+In the Async mode, Gizmo uses the consumer/producer model where when a
+client makes a request, Gizmo will generate an event payload and
+publish it on the async event stream. It will then wait for a
+response for that particular event on a different event stream. Once it recieves a
+response, gizmo will send a response back to the client which made the
+original request.
+
+## Here are a few examples of the events published by Gizmo
+
+### Vertex
+
+#### Adding a Vertex
+
+ {
+ "timestamp": 1514927928167,
+ "operation": "CREATE",
+ "vertex": {
+ "properties": {
+ "ipv4-oam-address": "1.2.3.4",
+ "resource-version": "1477013499",
+ "purpose": "my-purpose",
+ "fqdn": "myhost.onap.net",
+ "in-maint": false,
+ "equip-model": "DL380p-nd",
+ "equip-vendor": "HP",
+ "equip-type": "server",
+ "hostname": "myhost",
+ "ptnii-equip-name": "e-name"
+ },
+ "key": "",
+ "type": "pserver",
+ "schema-version": "vX"
+ },
+ "transaction-id": "c0a81fa7-5ef4-49cd-ab39-e42c53c9b9a4"
+ }
+
+#### Updating a Vertex
+
+ {
+ "timestamp": 1514929776429,
+ "operation": "UPDATE",
+ "vertex": {
+ "properties": {
+ "ipv4-oam-address": "1.2.3.4",
+ "resource-version": "1477013499",
+ "purpose": "my-purpose",
+ "fqdn": "updated.myhost.onap.net",
+ "in-maint": false,
+ "equip-model": "DELL380p-nd",
+ "equip-vendor": "DELL",
+ "equip-type": "updated-server",
+ "hostname": "updated-myhost",
+ "ptnii-equip-name": "name-has-been-updated"
+ },
+ "key": "84bf7b3f-81f5-4c34-ab5c-207281cb71bd",
+ "type": "pserver",
+ "schema-version": "vX"
+ },
+ "transaction-id": "3b8df1d5-4c51-47e3-bbef-c27b47e11149"
+ }
+
+#### Deleting a Vertex
+
+ {
+ "timestamp": 1514930052327,
+ "operation": "DELETE",
+ "vertex": {
+ "key": "84bf7b3f-81f5-4c34-ab5c-207281cb71bd",
+ "type": "pserver",
+ "schema-version": "vX"
+ },
+ "transaction-id": "6bb7a27b-a942-4cac-9b2b-0fa1f3897b8c"
+ }
+
+
+#### Adding an Edge
+
+ {
+ "timestamp": 1515005153863,
+ "operation": "CREATE",
+ "edge": {
+ "target": {
+ "key": "febd8996-62ec-4ce6-ba8e-d2fa1609e13b",
+ "type": "pserver"
+ },
+ "properties": {
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "IN",
+ "SVC-INFRA": "OUT"
+ },
+ "key": "",
+ "type": "tosca.relationships.HostedOn",
+ "schema-version": "v11",
+ "source": {
+ "key": "7beade35-19f1-4c1d-a1bd-bfba59e0b582",
+ "type": "vserver"
+ }
+ },
+ "transaction-id": "63a8994d-1118-4e65-ab06-fff40f6f48ef"
+ }
+
+#### Replace an Edge
+
+ {
+ "timestamp": 1515005301622,
+ "operation": "UPDATE",
+ "edge": {
+ "target": {
+ "key": "febd8996-62ec-4ce6-ba8e-d2fa1609e13b",
+ "type": "pserver"
+ },
+ "properties": {
+ "contains-other-v": "NOPE",
+ "delete-other-v": "YES",
+ "prevent-delete": "MAYBE",
+ "SVC-INFRA": "OUT"
+ },
+ "key": "9727a0ea-559e-497c-98e4-0cbdaede0346",
+ "type": "tosca.relationships.HostedOn",
+ "schema-version": "v11",
+ "source": {
+ "key": "7beade35-19f1-4c1d-a1bd-bfba59e0b582",
+ "type": "vserver"
+ }
+ },
+ "transaction-id": "ed284991-6c2f-4c94-a592-76fed17a2f14"
+ }
+
+
+#### Deleting an Edge
+
+ {
+ "timestamp": 1515005579837,
+ "operation": "DELETE",
+ "edge": {
+ "key": "9727a0ea-559e-497c-98e4-0cbdaede0346",
+ "type": "tosca.relationships.HostedOn",
+ "schema-version": "v11"
+ },
+ "transaction-id": "b4583bc9-dd96-483f-ab2d-20c1c6e5622f"
+ }