summaryrefslogtreecommitdiffstats
path: root/mod2/catalog-service/src/test/resources
diff options
context:
space:
mode:
authorDhrumin Desai <dd303q@att.com>2020-08-31 13:04:35 -0400
committerDhrumin Desai <dd303q@att.com>2020-09-23 16:04:49 -0400
commitdd74c5ec9c4761de2bec19f9fb53bba36c7c6c2c (patch)
tree997cd0277ec7e91f5114363aeb39bd591d26e986 /mod2/catalog-service/src/test/resources
parentb4287ad1fab97142df4d5260ec94d41bb782992a (diff)
adding catalog-service for mod2
Issue-ID: DCAEGEN2-2317 Change-Id: I8a0a85a1db2512744b41efa0a22617747642747d Signed-off-by: Dhrumin Desai <dd303q@att.com>
Diffstat (limited to 'mod2/catalog-service/src/test/resources')
-rw-r--r--mod2/catalog-service/src/test/resources/application.properties1
-rw-r--r--mod2/catalog-service/src/test/resources/http/requests/CreateSpecificationRequest.json180
-rw-r--r--mod2/catalog-service/src/test/resources/http/requests/CreateSpecificationResponse.json188
-rw-r--r--mod2/catalog-service/src/test/resources/specification/componentSpec_hello_world-with-dmaap.json149
-rw-r--r--mod2/catalog-service/src/test/resources/specification/policy_json_sample_3.json28
5 files changed, 546 insertions, 0 deletions
diff --git a/mod2/catalog-service/src/test/resources/application.properties b/mod2/catalog-service/src/test/resources/application.properties
new file mode 100644
index 0000000..d6a913c
--- /dev/null
+++ b/mod2/catalog-service/src/test/resources/application.properties
@@ -0,0 +1 @@
+#spring.data.mongodb.port=0 \ No newline at end of file
diff --git a/mod2/catalog-service/src/test/resources/http/requests/CreateSpecificationRequest.json b/mod2/catalog-service/src/test/resources/http/requests/CreateSpecificationRequest.json
new file mode 100644
index 0000000..a0465d8
--- /dev/null
+++ b/mod2/catalog-service/src/test/resources/http/requests/CreateSpecificationRequest.json
@@ -0,0 +1,180 @@
+{
+ "specContent": {
+ "self": {
+ "component_type": "docker",
+ "description": "Hello World mS for subscribing the data from local DMaaP, DR or MR, processing them and publishing them as PM files to local DMaaP DR",
+ "name": "dcae-collectors-vcc-helloworld-pm",
+ "version": "1.0.1"
+ },
+ "services": {
+ "calls": [],
+ "provides": []
+ },
+ "streams": {
+ "publishes": [
+ {
+ "config_key": "DCAE-HELLO-WORLD-PUB-DR",
+ "format": "dataformat_Hello_World_PM",
+ "type": "data_router",
+ "version": "1.0.0"
+ },
+ {
+ "config_key": "DCAE-HELLO-WORLD-PUB-MR",
+ "format": "dataformat_Hello_World_PM",
+ "type": "message_router",
+ "version": "1.0.0"
+ }
+ ],
+ "subscribes": [
+ {
+ "config_key": "DCAE-HELLO-WORLD-SUB-MR",
+ "format": "dataformat_Hello_World_PM",
+ "route": "/DCAE_HELLO_WORLD_SUB_MR",
+ "type": "message_router",
+ "version": "1.0.0"
+ },
+ {
+ "config_key": "DCAE-HELLO-WORLD-SUB-DR",
+ "format": "dataformat_Hello_World_PM",
+ "route": "/DCAE-HELLO-WORLD-SUB-DR",
+ "type": "data_router",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ "parameters": [
+ {
+ "name": "vcc_hello_name",
+ "value": "120",
+ "type": "integer",
+ "description": "the name entered for specific person",
+ "sourced_at_deployment": false,
+ "designer_editable": false,
+ "policy_editable": false
+ },
+ {
+ "name": "useDtiConfig",
+ "value": false,
+ "type": "boolean",
+ "description": "component depends on configuration from dti.",
+ "sourced_at_deployment": false,
+ "designer_editable": true,
+ "policy_editable": false,
+ "required": true
+ },
+ {
+ "name": "isSelfServeComponent",
+ "value": false,
+ "type": "boolean",
+ "description": "Is this used as self serve component.",
+ "sourced_at_deployment": false,
+ "designer_editable": true,
+ "policy_editable": false,
+ "required": true
+ }
+ ],
+ "auxilary": {
+ "healthcheck": {
+ "interval": "60s",
+ "initialDelaySeconds": "120s",
+ "timeout": "20s",
+ "script": "/opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh",
+ "type": "docker"
+ },
+ "livehealthcheck": {
+ "interval": "60s",
+ "initialDelaySeconds": "120s",
+ "timeout": "20s",
+ "script": "/opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh",
+ "type": "docker"
+ },
+ "reconfigs": {
+ "app_reconfig": "abc"
+ },
+ "volumes": [
+ {
+ "container": {
+ "bind": "/opt/app/dcae-certificate"
+ },
+ "host": {
+ "path": "/opt/app/dcae-certificate"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/logs/DCAE/dmd/AGENT"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/dmd/AGENT"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/logs/DCAE/dmd/WATCHER"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/dmd/WATCHER"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/app/vcc/logs/DCAE"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/vcc-logs"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/app/vcc/archive/data"
+ },
+ "host": {
+ "path": "/opt/data/DCAE/helloworldpm/vcc-archive"
+ }
+ }
+ ]
+ },
+ "artifacts": [
+ {
+ "type": "docker image",
+ "uri": "dockercentral.it.att.com:5100/com.att.sample/dcae-controller-vcc-helloworld-pm:18.02-001"
+ }
+ ]
+ },
+ "policyJson": {
+ "policies": [
+ {
+ "configAttributes": "",
+ "configName": "",
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_",
+ "unique": false
+ },
+ {
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_",
+ "unique": true
+ },
+ {
+ "configAttributes": "",
+ "configName": "",
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_*",
+ "unique": false
+ }
+ ],
+ "policy": [
+ {
+ "policy_id": "id_0"
+ }
+ ]
+ },
+ "type": "K8S",
+ "user": "abc123",
+ "metadata": {
+ "notes": "Sample 812-1",
+ "labels": [
+ "LATEST"
+ ]
+ }
+} \ No newline at end of file
diff --git a/mod2/catalog-service/src/test/resources/http/requests/CreateSpecificationResponse.json b/mod2/catalog-service/src/test/resources/http/requests/CreateSpecificationResponse.json
new file mode 100644
index 0000000..3cb6dcf
--- /dev/null
+++ b/mod2/catalog-service/src/test/resources/http/requests/CreateSpecificationResponse.json
@@ -0,0 +1,188 @@
+{
+ "id": "5f3417a26aef7f07bc91350a",
+ "status": "ACTIVE",
+ "specContent": {
+ "self": {
+ "component_type": "docker",
+ "description": "Hello World mS for subscribing the data from local DMaaP, DR or MR, processing them and publishing them as PM files to local DMaaP DR",
+ "name": "dcae-collectors-vcc-helloworld-pm",
+ "version": "1.0.1"
+ },
+ "services": {
+ "calls": [],
+ "provides": []
+ },
+ "streams": {
+ "publishes": [
+ {
+ "config_key": "DCAE-HELLO-WORLD-PUB-DR",
+ "format": "dataformat_Hello_World_PM",
+ "type": "data_router",
+ "version": "1.0.0"
+ },
+ {
+ "config_key": "DCAE-HELLO-WORLD-PUB-MR",
+ "format": "dataformat_Hello_World_PM",
+ "type": "message_router",
+ "version": "1.0.0"
+ }
+ ],
+ "subscribes": [
+ {
+ "config_key": "DCAE-HELLO-WORLD-SUB-MR",
+ "format": "dataformat_Hello_World_PM",
+ "route": "/DCAE_HELLO_WORLD_SUB_MR",
+ "type": "message_router",
+ "version": "1.0.0"
+ },
+ {
+ "config_key": "DCAE-HELLO-WORLD-SUB-DR",
+ "format": "dataformat_Hello_World_PM",
+ "route": "/DCAE-HELLO-WORLD-SUB-DR",
+ "type": "data_router",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ "parameters": [
+ {
+ "name": "vcc_hello_name",
+ "value": "120",
+ "type": "integer",
+ "description": "the name entered for specific person",
+ "sourced_at_deployment": false,
+ "designer_editable": false,
+ "policy_editable": false
+ },
+ {
+ "name": "useDtiConfig",
+ "value": false,
+ "type": "boolean",
+ "description": "component depends on configuration from dti.",
+ "sourced_at_deployment": false,
+ "designer_editable": true,
+ "policy_editable": false,
+ "required": true
+ },
+ {
+ "name": "isSelfServeComponent",
+ "value": false,
+ "type": "boolean",
+ "description": "Is this used as self serve component.",
+ "sourced_at_deployment": false,
+ "designer_editable": true,
+ "policy_editable": false,
+ "required": true
+ }
+ ],
+ "auxilary": {
+ "healthcheck": {
+ "interval": "60s",
+ "initialDelaySeconds": "120s",
+ "timeout": "20s",
+ "script": "/opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh",
+ "type": "docker"
+ },
+ "livehealthcheck": {
+ "interval": "60s",
+ "initialDelaySeconds": "120s",
+ "timeout": "20s",
+ "script": "/opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh",
+ "type": "docker"
+ },
+ "reconfigs": {
+ "app_reconfig": "abc"
+ },
+ "volumes": [
+ {
+ "container": {
+ "bind": "/opt/app/dcae-certificate"
+ },
+ "host": {
+ "path": "/opt/app/dcae-certificate"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/logs/DCAE/dmd/AGENT"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/dmd/AGENT"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/logs/DCAE/dmd/WATCHER"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/dmd/WATCHER"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/app/vcc/logs/DCAE"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/vcc-logs"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/app/vcc/archive/data"
+ },
+ "host": {
+ "path": "/opt/data/DCAE/helloworldpm/vcc-archive"
+ }
+ }
+ ]
+ },
+ "artifacts": [
+ {
+ "type": "docker image",
+ "uri": "dockercentral.it.att.com:5100/com.att.sample/dcae-controller-vcc-helloworld-pm:18.02-001"
+ }
+ ]
+ },
+ "policyJson": {
+ "policies": [
+ {
+ "configAttributes": "",
+ "configName": "",
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_",
+ "unique": false
+ },
+ {
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_",
+ "unique": true
+ },
+ {
+ "configAttributes": "",
+ "configName": "",
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_*",
+ "unique": false
+ }
+ ],
+ "policy": [
+ {
+ "policy_id": "id_0"
+ }
+ ]
+ },
+ "type": "K8S",
+ "metadata": {
+ "notes": "Sample 812-1",
+ "labels": [
+ "LATEST"
+ ],
+ "createdBy": "abc123",
+ "createdOn": "2020-08-12T16:24:02.621+0000"
+ },
+ "msInstanceInfo": {
+ "release": "2006",
+ "name": "hello-804",
+ "id": "5f1592ffb551b604628316b0"
+ }
+} \ No newline at end of file
diff --git a/mod2/catalog-service/src/test/resources/specification/componentSpec_hello_world-with-dmaap.json b/mod2/catalog-service/src/test/resources/specification/componentSpec_hello_world-with-dmaap.json
new file mode 100644
index 0000000..0ad6b6e
--- /dev/null
+++ b/mod2/catalog-service/src/test/resources/specification/componentSpec_hello_world-with-dmaap.json
@@ -0,0 +1,149 @@
+{
+ "self": {
+ "component_type": "docker",
+ "description": "Hello World mS for subscribing the data from local DMaaP, DR or MR, processing them and publishing them as PM files to local DMaaP DR",
+ "name": "dcae-collectors-vcc-helloworld-pm",
+ "version": "1.0.1"
+ },
+
+ "services": {
+ "calls": [],
+ "provides": []
+ },
+
+ "streams": {
+ "publishes": [{
+ "config_key": "DCAE-HELLO-WORLD-PUB-DR",
+ "format": "dataformat_Hello_World_PM",
+ "type": "data_router",
+ "version": "1.0.0"
+ },
+ {
+ "config_key": "DCAE-HELLO-WORLD-PUB-MR",
+ "format": "dataformat_Hello_World_PM",
+ "type": "message_router",
+ "version": "1.0.0"
+ }
+ ],
+
+ "subscribes": [{
+ "config_key": "DCAE-HELLO-WORLD-SUB-MR",
+ "format": "dataformat_Hello_World_PM",
+ "route": "/DCAE_HELLO_WORLD_SUB_MR",
+ "type": "message_router",
+ "version": "1.0.0"
+ },
+ {
+ "config_key": "DCAE-HELLO-WORLD-SUB-DR",
+ "format": "dataformat_Hello_World_PM",
+ "route": "/DCAE-HELLO-WORLD-SUB-DR",
+ "type": "data_router",
+ "version": "1.0.0"
+ }
+ ]
+ },
+
+ "parameters":
+ [
+ {
+ "name": "vcc_hello_name",
+ "value": "120",
+ "type": "integer",
+ "description": "the name entered for specific person",
+ "sourced_at_deployment": false,
+ "designer_editable": false,
+ "policy_editable": false
+ },
+
+ {
+ "name": "useDtiConfig",
+ "value": false,
+ "type" : "boolean",
+ "description": "component depends on configuration from dti.",
+ "sourced_at_deployment": false,
+ "designer_editable": true,
+ "policy_editable": false,
+ "required" : true
+ },
+
+ {
+ "name": "isSelfServeComponent",
+ "value": false,
+ "type": "boolean",
+ "description": "Is this used as self serve component.",
+ "sourced_at_deployment": false,
+ "designer_editable": true,
+ "policy_editable": false,
+ "required" : true
+ }
+ ],
+
+ "auxilary": {
+ "healthcheck": {
+ "interval": "60s",
+ "initialDelaySeconds": "120s",
+ "timeout": "20s",
+ "script": "/opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh",
+ "type": "docker"
+ },
+ "livehealthcheck": {
+ "interval": "60s",
+ "initialDelaySeconds": "120s",
+ "timeout": "20s",
+ "script": "/opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh",
+ "type": "docker"
+ },
+ "reconfigs":{
+ "app_reconfig" : "abc"
+ },
+
+ "volumes": [
+ {
+ "container": {
+ "bind": "/opt/app/dcae-certificate"
+ },
+ "host": {
+ "path": "/opt/app/dcae-certificate"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/logs/DCAE/dmd/AGENT"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/dmd/AGENT"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/logs/DCAE/dmd/WATCHER"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/dmd/WATCHER"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/app/vcc/logs/DCAE"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/helloworldpm/vcc-logs"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/app/vcc/archive/data"
+ },
+ "host": {
+ "path": "/opt/data/DCAE/helloworldpm/vcc-archive"
+ }
+ }
+
+ ]
+
+ },
+ "artifacts": [{
+ "type": "docker image",
+ "uri": "dockercentral.it.att.com:5100/com.att.sample/dcae-controller-vcc-helloworld-pm:18.02-001"
+ }]
+} \ No newline at end of file
diff --git a/mod2/catalog-service/src/test/resources/specification/policy_json_sample_3.json b/mod2/catalog-service/src/test/resources/specification/policy_json_sample_3.json
new file mode 100644
index 0000000..4a8c76f
--- /dev/null
+++ b/mod2/catalog-service/src/test/resources/specification/policy_json_sample_3.json
@@ -0,0 +1,28 @@
+{
+ "policies": [
+ {
+ "configAttributes": "",
+ "configName": "",
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_",
+ "unique": false
+ },
+ {
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_",
+ "unique": true
+ },
+ {
+ "configAttributes": "",
+ "configName": "",
+ "onapName": "DCAE",
+ "policyName": "DCAE.Config_*",
+ "unique": false
+ }
+ ],
+ "policy": [
+ {
+ "policy_id" : "id_0"
+ }
+ ]
+} \ No newline at end of file