diff options
-rw-r--r-- | README.md | 479 |
1 files changed, 285 insertions, 194 deletions
@@ -2,8 +2,6 @@ The Spike microservice consumes and processes the Champ graph data event stream from which it generates events to be consumed by other components. ---- - ## Public Interfaces ### Stream output @@ -15,149 +13,214 @@ The messages are in a similar format to Gizmo's async pipeline. Here are some ex #### Vertex ##### Create Vertex - { - "transaction-id": "38fe6bb0-6b3b-4c1d-95ea-7a9f5a29d857", - "vertex": { - "schema-version": "v11", - "type": "vserver", - "key": "a7cbd3fb-a7ee-4fec-91fb-d94793b4c641", - "properties": { - "in-maint": false, - "vserver-name": "dan", - "vserver-id": "dan-vserv", - "last-mod-source-of-truth": "Dan-laptop", - "source-of-truth": "Dan-laptop", - "vserver-selflink": "something", - "is-closed-loop-disabled": false - } + { + "header":{ + "event-type":"update-notification", + "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021", + "source-name":"SPIKE", + "timestamp":"20180807T153514Z" }, - "operation": "CREATE", - "timestamp": 1515524454947 - } + "body":{ + "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021", + "vertex":{ + "schema-version":"V14", + "type":"vserver", + "key":"541cf447-09f5-4484-a765-845e71aab1f2", + "properties":{ + "aai-last-mod-ts":1533656090789, + "in-maint":false, + "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2", + "vserver-name":"test-vserver", + "aai-created-ts":1533656090789, + "vserver-id":"VSER1", + "last-mod-source-of-truth":"Gizmo-Creator", + "vserver-name2":"alt-test-vserver", + "source-of-truth":"Gizmo-Creator", + "vserver-selflink":"http://1.2.3.4/moreInfo", + "is-closed-loop-disabled":false, + "aai-node-type":"vserver" + } + }, + "operation":"CREATE", + "timestamp":1533656091474 + } + } ##### Update Vertex - { - "transaction-id": "cf0ef29b-3f38-42d9-8e65-2e03a8c97aae", - "vertex": { - "schema-version": "v11", - "type": "vserver", - "key": "a7cbd3fb-a7ee-4fec-91fb-d94793b4c641", - "properties": { - "in-maint": false, - "vserver-name": "dan-updated", - "vserver-id": "dan-vserv", - "last-mod-source-of-truth": "Dan-laptop", - "vserver-selflink": "something", - "is-closed-loop-disabled": false - } + { + "header":{ + "event-type":"update-notification", + "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021", + "source-name":"SPIKE", + "timestamp":"20180807T153514Z" }, - "operation": "UPDATE", - "timestamp": 1515525164176 - } + "body":{ + "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021", + "vertex":{ + "schema-version":"V14", + "type":"vserver", + "key":"541cf447-09f5-4484-a765-845e71aab1f2", + "properties":{ + "aai-last-mod-ts":1533656090789, + "in-maint":false, + "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2", + "vserver-name":"test-vserver", + "aai-created-ts":1533656090789, + "vserver-id":"VSER1", + "last-mod-source-of-truth":"Gizmo-Creator", + "vserver-name2":"alt-test-vserver", + "source-of-truth":"Gizmo-Creator", + "vserver-selflink":"http://1.2.3.4/moreInfo", + "is-closed-loop-disabled":false, + "aai-node-type":"vserver" + } + }, + "operation":"UPDATE", + "timestamp":1533656091474 + } + } ##### Delete Vertex - { - "transaction-id": "3962b400-f5b2-4159-a0eb-cb7aa4e48580", - "vertex": { - "schema-version": "v11", - "type": "vserver", - "key": "a7cbd3fb-a7ee-4fec-91fb-d94793b4c641", - "properties": { - "in-maint": false, - "vserver-name": "dan-updated", - "vserver-id": "dan-vserv", - "last-mod-source-of-truth": "Dan-laptop", - "vserver-selflink": "something", - "is-closed-loop-disabled": false - } + { + "header":{ + "event-type":"update-notification", + "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021", + "source-name":"SPIKE", + "timestamp":"20180807T153514Z" }, - "operation": "DELETE", - "timestamp": 1515525766057 - } + "body":{ + "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021", + "vertex":{ + "schema-version":"V14", + "type":"vserver", + "key":"541cf447-09f5-4484-a765-845e71aab1f2", + "properties":{ + "aai-last-mod-ts":1533656090789, + "in-maint":false, + "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2", + "vserver-name":"test-vserver", + "aai-created-ts":1533656090789, + "vserver-id":"VSER1", + "last-mod-source-of-truth":"Gizmo-Creator", + "vserver-name2":"alt-test-vserver", + "source-of-truth":"Gizmo-Creator", + "vserver-selflink":"http://1.2.3.4/moreInfo", + "is-closed-loop-disabled":false, + "aai-node-type":"vserver" + } + }, + "operation":"DELETE", + "timestamp":1533656091474 + } + } #### Relationship ##### Create Relationship - { - "transaction-id": "e654eee5-d8fc-445e-b09d-7dba20029a78", - "relationship": { - "source": { - "type": "vserver", - "key": "2223dc8b-9e26-4c90-b767-7d1f61e8fa8d" - }, - "schema-version": "v12", - "type": "tosca.relationships.HostedOn", - "key": "6a443848-21bb-4801-ab00-53ee286c290d", - "properties": { - "prevent-delete": "java.lang.String", - "SVC-INFRA": "java.lang.String", - "delete-other-v": "java.lang.String", - "contains-other-v": "java.lang.String" - }, - "target": { - "type": "pserver", - "key": "32ed5257-a6ac-4d63-8635-ae1d3a615960" - } + { + "header":{ + "event-type":"update-notification", + "request-id":"1f2eced7-8300-4e72-966d-f345027c987a", + "source-name":"SPIKE", + "timestamp":"20180807T153514Z" }, - "operation": "CREATE", - "timestamp": 1515526740371 - } + "body":{ + "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a", + "relationship":{ + "source":{ + "type":"vserver", + "key":"ed76551f-f47f-47f9-a23d-052634446e76" + }, + "schema-version":"v14", + "type":"tosca.relationships.HostedOn", + "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b", + "properties":{ + "prevent-delete":"IN", + "SVC-INFRA":"OUT", + "delete-other-v":"NONE", + "contains-other-v":"NONE" + }, + "target":{ + "type":"pserver", + "key":"981c0494-c742-4d75-851c-8194bbbd8a96" + } + }, + "operation":"CREATE", + "timestamp":1533656086207 + } + } ##### Update Relationship - { - "transaction-id": "db8d1626-346d-4f04-8856-f5a5e0e54313", - "relationship": { - "source": { - "type": "vserver", - "key": "2223dc8b-9e26-4c90-b767-7d1f61e8fa8d" - }, - "schema-version": "v12", - "type": "tosca.relationships.HostedOn", - "key": "6a443848-21bb-4801-ab00-53ee286c290d", - "properties": { - "prevent-delete": "java.lang.String", - "SVC-INFRA": "java.lang.String", - "delete-other-v": "updated", - "contains-other-v": "java.lang.String" - }, - "target": { - "type": "pserver", - "key": "32ed5257-a6ac-4d63-8635-ae1d3a615960" - } + { + "header":{ + "event-type":"update-notification", + "request-id":"1f2eced7-8300-4e72-966d-f345027c987a", + "source-name":"SPIKE", + "timestamp":"20180807T153514Z" }, - "operation": "UPDATE", - "timestamp": 1515526920973 - } + "body":{ + "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a", + "relationship":{ + "source":{ + "type":"vserver", + "key":"ed76551f-f47f-47f9-a23d-052634446e76" + }, + "schema-version":"v14", + "type":"tosca.relationships.HostedOn", + "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b", + "properties":{ + "prevent-delete":"IN", + "SVC-INFRA":"OUT", + "delete-other-v":"NONE", + "contains-other-v":"NONE" + }, + "target":{ + "type":"pserver", + "key":"981c0494-c742-4d75-851c-8194bbbd8a96" + } + }, + "operation":"UPDATE", + "timestamp":1533656086207 + } + } ##### Delete Relationship - { - "transaction-id": "e7dbd137-cc07-41c4-8ba4-694334f4b2e4", - "relationship": { - "source": { - "type": "vserver", - "key": "2223dc8b-9e26-4c90-b767-7d1f61e8fa8d" - }, - "schema-version": "v12", - "type": "tosca.relationships.HostedOn", - "key": "6a443848-21bb-4801-ab00-53ee286c290d", - "properties": { - "prevent-delete": "java.lang.String", - "SVC-INFRA": "java.lang.String", - "delete-other-v": "updated", - "contains-other-v": "java.lang.String" - }, - "target": { - "type": "pserver", - "key": "32ed5257-a6ac-4d63-8635-ae1d3a615960" - } + { + "header":{ + "event-type":"update-notification", + "request-id":"1f2eced7-8300-4e72-966d-f345027c987a", + "source-name":"SPIKE", + "timestamp":"20180807T153514Z" }, - "operation": "DELETE", - "timestamp": 1515527840630 - } + "body":{ + "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a", + "relationship":{ + "source":{ + "type":"vserver", + "key":"ed76551f-f47f-47f9-a23d-052634446e76" + }, + "schema-version":"v14", + "type":"tosca.relationships.HostedOn", + "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b", + "properties":{ + "prevent-delete":"IN", + "SVC-INFRA":"OUT", + "delete-other-v":"NONE", + "contains-other-v":"NONE" + }, + "target":{ + "type":"pserver", + "key":"981c0494-c742-4d75-851c-8194bbbd8a96" + } + }, + "operation":"DELETE", + "timestamp":1533656086207 + } + } #### Transactions @@ -167,80 +230,108 @@ Champ, and therefore Spike, will publish separate events for each operation done The following three events were created in a single bulk request from Gizmo. Note the database-transaction-id. - { - "transaction-id": "7397ce4c-70ed-4b32-b8d0-24b6496e1791", - "vertex": { - "schema-version": "v11", - "type": "vserver", - "key": "b7c80b13-3b32-4007-83c6-553617d64cfa", - "properties": { - "in-maint": false, - "vserver-name": "dan-vserver-1", - "prov-status": "Provisioned", - "vserver-id": "Vserver-AMT-002-HSGW", - "last-mod-source-of-truth": "Dan-laptop", - "vserver-name2": "Vs2-HSGW-OTT", - "source-of-truth": "Dan-laptop", - "vserver-selflink": "AMT VserverLink", - "is-closed-loop-disabled": false - } +[ + { + "header":{ + "event-type":"update-notification", + "request-id":"9fc953af-bb41-4cfe-b522-dc6a9d1b5830", + "source-name":"SPIKE", + "timestamp":"20180807T162714Z" }, - "database-transaction-id": "52eb5657-0d43-4e4b-a4d5-042acc9bc574", - "operation": "CREATE", - "timestamp": 1515528272536 - } - - { - "transaction-id": "ec3d0552-e20b-4fc1-aa8e-634ddd2a9d76", - "vertex": { - "schema-version": "v11", - "type": "pserver", - "key": "ae43af1c-8479-4358-9325-416d3a854d69", - "properties": { - "ptnii-equip-name": "amdocs199snd9", - "hostname": "dan-bulk-1", - "equip-type": "server", - "equip-vendor": "HP", - "equip-model": "DL380p-nd", - "in-maint": false, - "fqdn": "amdocs199snd9.amdocs.lab.com", - "purpose": "", - "resource-version": "1477013499", - "ipv4-oam-address": "135.182.138.60", - "last-mod-source-of-truth": "Dan-laptop", - "source-of-truth": "Dan-laptop" - } + "body":{ + "transaction-id":"9fc953af-bb41-4cfe-b522-dc6a9d1b5830", + "vertex":{ + "schema-version":"V14", + "type":"vserver", + "key":"9c649f2b-7500-4b35-abb8-d51008fb28fe", + "properties":{ + "aai-last-mod-ts":1533659209321, + "in-maint":false, + "aai-uuid":"9c649f2b-7500-4b35-abb8-d51008fb28fe", + "vserver-name":"test-vserver", + "aai-created-ts":1533659209321, + "vserver-id":"VSER1", + "last-mod-source-of-truth":"test1", + "vserver-name2":"alt-test-vserver", + "source-of-truth":"test1", + "vserver-selflink":"http://1.2.3.4/moreInfo", + "is-closed-loop-disabled":false + } + }, + "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378", + "operation":"CREATE", + "timestamp":1533659209324 + } + }, + { + "header":{ + "event-type":"update-notification", + "request-id":"6f7db331-a0b9-4194-917c-7f24124b5d46", + "source-name":"SPIKE", + "timestamp":"20180807T162714Z" }, - "database-transaction-id": "52eb5657-0d43-4e4b-a4d5-042acc9bc574", - "operation": "CREATE", - "timestamp": 1515528272841 - } - - { - "transaction-id": "81b6a5bc-bf82-4043-92a7-f3bafe647f8e", - "database-transaction-id": "52eb5657-0d43-4e4b-a4d5-042acc9bc574", - "relationship": { - "source": { - "type": "vserver", - "key": "b7c80b13-3b32-4007-83c6-553617d64cfa" - }, - "schema-version": "v12", - "type": "tosca.relationships.HostedOn", - "key": "592d93d5-a17d-4dfd-83f2-68b777da0481", - "properties": { - "prevent-delete": "asdf", - "SVC-INFRA": "fdsa", - "delete-other-v": "asdf", - "contains-other-v": "fdsa" - }, - "target": { - "type": "pserver", - "key": "ae43af1c-8479-4358-9325-416d3a854d69" - } + "body":{ + "transaction-id":"6f7db331-a0b9-4194-917c-7f24124b5d46", + "vertex":{ + "schema-version":"V14", + "type":"pserver", + "key":"ecec281a-c0c0-47af-8ec8-019753edc28c", + "properties":{ + "ptnii-equip-name":"e-name", + "aai-last-mod-ts":1533659209637, + "equip-type":"server", + "equip-vendor":"HP", + "fqdn":"myhost.onap.net", + "purpose":"my-purpose", + "aai-created-ts":1533659209637, + "ipv4-oam-address":"1.2.3.4", + "source-of-truth":"test1", + "hostname":"steve-host2", + "equip-model":"DL380p-nd", + "in-maint":false, + "aai-uuid":"ecec281a-c0c0-47af-8ec8-019753edc28c", + "last-mod-source-of-truth":"test1" + } + }, + "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378", + "operation":"CREATE", + "timestamp":1533659209645 + } + }, + { + "header":{ + "event-type":"update-notification", + "request-id":"54f0f573-eb22-4ce2-b51b-4af0904c9782", + "source-name":"SPIKE", + "timestamp":"20180807T162714Z" }, - "operation": "CREATE", - "timestamp": 1515528273738 - } + "body":{ + "transaction-id":"54f0f573-eb22-4ce2-b51b-4af0904c9782", + "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378", + "relationship":{ + "source":{ + "type":"vserver", + "key":"9c649f2b-7500-4b35-abb8-d51008fb28fe" + }, + "schema-version":"v14", + "type":"tosca.relationships.HostedOn", + "key":"410cb65a-1b46-4d23-a5b4-9f57bdc918c1", + "properties":{ + "prevent-delete":"IN", + "SVC-INFRA":"OUT", + "delete-other-v":"NONE", + "contains-other-v":"NONE" + }, + "target":{ + "type":"pserver", + "key":"ecec281a-c0c0-47af-8ec8-019753edc28c" + } + }, + "operation":"CREATE", + "timestamp":1533659210721 + } + } +] ### Echo Service The Spike micro service supports the standard echo service to allow it to be 'pinged' to verify that the service is up and responding. |