From 11a3345cf03c2ad820fa40440dbe4c89eb963b26 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Mon, 13 Aug 2018 23:42:40 +0000 Subject: Add RestConf Collector Issue-ID: DCAEGEN2-612 1. Instantiated to support CCVPN Close Loop Use Case 2. In general, this supports data collection from all PNF or devices that supports RestConf protocol Change-Id: I6311ad618e8d68badc5423a63d7781a19dc62829 Signed-off-by: rama-huawei --- src/test/resources/RestConfEvent.json | 26 ++++++++++++++++++++++ .../resources/testParseDMaaPCredentialsGen2.json | 21 +++++++++++++++++ .../resources/testParseDMaaPCredentialsLegacy.json | 26 ++++++++++++++++++++++ src/test/resources/testParseDMaaPGen2.json | 12 ++++++++++ src/test/resources/testParseDMaaPLegacy.json | 21 +++++++++++++++++ 5 files changed, 106 insertions(+) create mode 100755 src/test/resources/RestConfEvent.json create mode 100755 src/test/resources/testParseDMaaPCredentialsGen2.json create mode 100755 src/test/resources/testParseDMaaPCredentialsLegacy.json create mode 100755 src/test/resources/testParseDMaaPGen2.json create mode 100755 src/test/resources/testParseDMaaPLegacy.json (limited to 'src/test/resources') diff --git a/src/test/resources/RestConfEvent.json b/src/test/resources/RestConfEvent.json new file mode 100755 index 0000000..93d0b64 --- /dev/null +++ b/src/test/resources/RestConfEvent.json @@ -0,0 +1,26 @@ +{ + "ietf-notification:notification" : { + "eventTime" : "eventtime", + "ietf-yang-push:push-change-update": { + "subscription-id":"100", + "datastore-changes": { + "ietf-yang-patch:yang-patch":{ + "patch-id":"patch-id", + "edit":[{ + "edit-id":"edit-id", + "operation":"create", + "target":"target", + "value": { + "ietf-interfaces:interfaces-state":{ + "interface": { + "name":"eth0", + "oper-status":"up" + } + } + } + }] + } + } + } + } +} \ No newline at end of file diff --git a/src/test/resources/testParseDMaaPCredentialsGen2.json b/src/test/resources/testParseDMaaPCredentialsGen2.json new file mode 100755 index 0000000..23230c1 --- /dev/null +++ b/src/test/resources/testParseDMaaPCredentialsGen2.json @@ -0,0 +1,21 @@ +{ + "auth-credentials-null": { + "aaf_username": null, + "dmaap_info": { + "topic_url": "http://UEBHOST:3904/events/DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + }, + "aaf_password": null + }, + "auth-credentials-present": { + "aaf_username": "sampleUser", + "dmaap_info": { + "topic_url": "http://UEBHOST:3904/events/DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + }, + "aaf_password": "samplePassword" + }, + "auth-credentials-missing": { + "dmaap_info": { + "topic_url": "http://UEBHOST:3904/events/DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + } + } +} \ No newline at end of file diff --git a/src/test/resources/testParseDMaaPCredentialsLegacy.json b/src/test/resources/testParseDMaaPCredentialsLegacy.json new file mode 100755 index 0000000..ee215e2 --- /dev/null +++ b/src/test/resources/testParseDMaaPCredentialsLegacy.json @@ -0,0 +1,26 @@ +{ + "channels": [ + { + "name": "auth-credentials-null", + "cambria.url": "127.0.0.1:3904", + "cambria.hosts": "uebsb91kcdc.it.att.com,uebsb92kcdc.it.att.com,uebsb93kcdc.it.att.com", + "cambria.topic": "DCAE-RESTCONF-COLLECTOR-EVENTS-DEV", + "basicAuthPassword": null, + "basicAuthUsername": null + }, + { + "name": "auth-credentials-present", + "cambria.url": "127.0.0.1:3904", + "cambria.hosts": "uebsb91kcdc.it.att.com,uebsb92kcdc.it.att.com,uebsb93kcdc.it.att.com", + "cambria.topic": "DCAE-RESTCONF-COLLECTOR-EVENTS-DEV", + "basicAuthPassword": "samplePassword", + "basicAuthUsername": "sampleUser" + }, + { + "name": "auth-credentials-missing", + "cambria.url": "127.0.0.1:3904", + "cambria.hosts": "uebsb91kcdc.it.att.com,uebsb92kcdc.it.att.com,uebsb93kcdc.it.att.com", + "cambria.topic": "DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/testParseDMaaPGen2.json b/src/test/resources/testParseDMaaPGen2.json new file mode 100755 index 0000000..4ef04a2 --- /dev/null +++ b/src/test/resources/testParseDMaaPGen2.json @@ -0,0 +1,12 @@ +{ + "event-segments-with-port": { + "dmaap_info": { + "topic_url": "http://UEBHOST:3904/events/DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + } + }, + "other-segments-without-ports": { + "dmaap_info": { + "topic_url": "http://UEBHOST:3904/somethingHere/DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + } + } +} \ No newline at end of file diff --git a/src/test/resources/testParseDMaaPLegacy.json b/src/test/resources/testParseDMaaPLegacy.json new file mode 100755 index 0000000..fda9c60 --- /dev/null +++ b/src/test/resources/testParseDMaaPLegacy.json @@ -0,0 +1,21 @@ +{ + "channels": [ + { + "name": "url-precedes-hosts", + "cambria.url": "127.0.0.1:3904", + "cambria.hosts": "h1.att.com,h2.att.com", + "cambria.topic": "DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + }, + { + "name": "url-key-missing", + "cambria.hosts": "h1.att.com,h2.att.com", + "cambria.topic": "DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + }, + { + "name": "url-is-null", + "cambria.url": null, + "cambria.hosts": "h1.att.com,h2.att.com", + "cambria.topic": "DCAE-RESTCONF-COLLECTOR-EVENTS-DEV" + } + ] +} \ No newline at end of file -- cgit 1.2.3-korg