summaryrefslogtreecommitdiffstats
path: root/runtime/src/test/resources/clds
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/test/resources/clds')
-rw-r--r--runtime/src/test/resources/clds/blueprint-with-microservice-chain.yaml202
-rw-r--r--runtime/src/test/resources/clds/clds-parse-exception.json1
-rw-r--r--runtime/src/test/resources/clds/clds-users-incomplete-permissions.json14
-rw-r--r--runtime/src/test/resources/clds/clds-users-no-permission.json7
-rw-r--r--runtime/src/test/resources/clds/clds-users-two-users.json26
-rw-r--r--runtime/src/test/resources/clds/new-microservice.yaml46
-rw-r--r--runtime/src/test/resources/clds/policy-merger.json215
-rw-r--r--runtime/src/test/resources/clds/sdc-controller-config-NULL.json11
-rw-r--r--runtime/src/test/resources/clds/sdc-controller-config-TLS.json14
-rw-r--r--runtime/src/test/resources/clds/sdc-controller-config-bad.json13
-rw-r--r--runtime/src/test/resources/clds/sdc-controller-config-empty-encrypted.json14
-rw-r--r--runtime/src/test/resources/clds/sdc-controllers-config-bad.json26
-rw-r--r--runtime/src/test/resources/clds/sdc-controllers-config-missing-param.json13
-rw-r--r--runtime/src/test/resources/clds/sdc-controllers-config.json30
-rw-r--r--runtime/src/test/resources/clds/single-microservice-fragment-invalid.yaml25
-rw-r--r--runtime/src/test/resources/clds/single-microservice-fragment-valid-with-version.yaml21
-rw-r--r--runtime/src/test/resources/clds/single-microservice-fragment-without-name.yaml22
-rw-r--r--runtime/src/test/resources/clds/single-microservice-fragment-without-properties.yaml18
-rw-r--r--runtime/src/test/resources/clds/single-microservice-fragment-without-relationships.yaml18
-rw-r--r--runtime/src/test/resources/clds/templates/dcae-deployment-template.json9
-rw-r--r--runtime/src/test/resources/clds/templates/dcae-template.json26
-rw-r--r--runtime/src/test/resources/clds/templates/globalProperties.json104
-rw-r--r--runtime/src/test/resources/clds/templates/sdc-decode-service_ids.json1
-rw-r--r--runtime/src/test/resources/clds/templates/sdc-template.json1
-rw-r--r--runtime/src/test/resources/clds/templates/tca-policy-template.json19
-rw-r--r--runtime/src/test/resources/clds/templates/tca-template.json14
-rw-r--r--runtime/src/test/resources/clds/templates/tca-thresholds-template.json9
-rw-r--r--runtime/src/test/resources/clds/templates/ui-location-default.json5
-rw-r--r--runtime/src/test/resources/clds/util/file.xml6
29 files changed, 930 insertions, 0 deletions
diff --git a/runtime/src/test/resources/clds/blueprint-with-microservice-chain.yaml b/runtime/src/test/resources/clds/blueprint-with-microservice-chain.yaml
new file mode 100644
index 000000000..0e9e4bc8c
--- /dev/null
+++ b/runtime/src/test/resources/clds/blueprint-with-microservice-chain.yaml
@@ -0,0 +1,202 @@
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+ This blueprint deploys/manages the TCA module as a Docker container
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml
+ - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml
+inputs:
+ aaiEnrichmentHost:
+ type: string
+ default: "aai.onap.svc.cluster.local"
+ aaiEnrichmentPort:
+ type: string
+ default: "8443"
+ enableAAIEnrichment:
+ type: string
+ default: true
+ dmaap_host:
+ type: string
+ default: message-router.onap.svc.cluster.local
+ dmaap_port:
+ type: string
+ default: "3904"
+ enableRedisCaching:
+ type: string
+ default: false
+ redisHosts:
+ type: string
+ default: dcae-redis.onap.svc.cluster.local:6379
+ tag_version:
+ type: string
+ default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0-STAGING-latest"
+ consul_host:
+ type: string
+ default: consul-server.onap.svc.cluster.local
+ consul_port:
+ type: string
+ default: "8500"
+ cbs_host:
+ type: string
+ default: "config-binding-service.dcae.svc.cluster.local"
+ cbs_port:
+ type: string
+ default: "10000"
+ policy_id:
+ type: string
+ default: "none"
+ external_port:
+ type: string
+ description: Kubernetes node port on which CDAPgui is exposed
+ default: "32012"
+ policy_model_id:
+ type: string
+ default: "onap.policies.monitoring.cdap.tca.hi.lo.app"
+
+node_templates:
+ first_app:
+ type: dcae.nodes.ContainerizedServiceComponent
+ properties:
+ service_component_type: 'dcaegen2-analytics-tca'
+ application_config: {}
+ docker_config: {}
+ image:
+ get_input: tag_version
+ log_info:
+ log_directory: "/opt/app/TCAnalytics/logs"
+ relationships:
+ - target: tca_policy_1
+ type: cloudify.relationships.depends_on
+ second_app:
+ type: dcae.nodes.ContainerizedServiceComponent
+ relationships:
+ - target: tca_policy_2
+ type: cloudify.relationships.depends_on
+ - type: clamp_node.relationships.gets_input_from
+ target: first_app
+ properties:
+ service_component_type: 'dcaegen2-analytics-tca'
+ application_config: {}
+ docker_config: {}
+ image:
+ get_input: tag_version
+ log_info:
+ log_directory: "/opt/app/TCAnalytics/logs"
+ application_config:
+ app_config:
+ appDescription: DCAE Analytics Threshold Crossing Alert Application
+ appName: dcae-tca
+ tcaAlertsAbatementTableName: TCAAlertsAbatementTable
+ tcaAlertsAbatementTableTTLSeconds: '1728000'
+ tcaSubscriberOutputStreamName: TCASubscriberOutputStream
+ tcaVESAlertsTableName: TCAVESAlertsTable
+ tcaVESAlertsTableTTLSeconds: '1728000'
+ tcaVESMessageStatusTableName: TCAVESMessageStatusTable
+ tcaVESMessageStatusTableTTLSeconds: '86400'
+ thresholdCalculatorFlowletInstances: '2'
+ app_preferences:
+ aaiEnrichmentHost:
+ get_input: aaiEnrichmentHost
+ aaiEnrichmentIgnoreSSLCertificateErrors: 'true'
+ aaiEnrichmentPortNumber: '8443'
+ aaiEnrichmentProtocol: https
+ aaiEnrichmentUserName: dcae@dcae.onap.org
+ aaiEnrichmentUserPassword: demo123456!
+ aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query
+ aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf
+ enableAAIEnrichment:
+ get_input: enableAAIEnrichment
+ enableRedisCaching:
+ get_input: enableRedisCaching
+ redisHosts:
+ get_input: redisHosts
+ enableAlertCEFFormat: 'false'
+ publisherContentType: application/json
+ publisherHostName:
+ get_input: dmaap_host
+ publisherHostPort:
+ get_input: dmaap_port
+ publisherMaxBatchSize: '1'
+ publisherMaxRecoveryQueueSize: '100000'
+ publisherPollingInterval: '20000'
+ publisherProtocol: http
+ publisherTopicName: unauthenticated.DCAE_CL_OUTPUT
+ subscriberConsumerGroup: OpenDCAE-c12
+ subscriberConsumerId: c12
+ subscriberContentType: application/json
+ subscriberHostName:
+ get_input: dmaap_host
+ subscriberHostPort:
+ get_input: dmaap_port
+ subscriberMessageLimit: '-1'
+ subscriberPollingInterval: '30000'
+ subscriberProtocol: http
+ subscriberTimeoutMS: '-1'
+ subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT
+ tca_policy: ''
+ service_component_type: dcaegen2-analytics_tca
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ DMAAPHOST:
+ { get_input: dmaap_host }
+ DMAAPPORT:
+ { get_input: dmaap_port }
+ DMAAPPUBTOPIC: "unauthenticated.DCAE_CL_OUTPUT"
+ DMAAPSUBTOPIC: "unauthenticated.VES_MEASUREMENT_OUTPUT"
+ AAIHOST:
+ { get_input: aaiEnrichmentHost }
+ AAIPORT:
+ { get_input: aaiEnrichmentPort }
+ CONSUL_HOST:
+ { get_input: consul_host }
+ CONSUL_PORT:
+ { get_input: consul_port }
+ CBS_HOST:
+ { get_input: cbs_host }
+ CBS_PORT:
+ { get_input: cbs_port }
+ CONFIG_BINDING_SERVICE: "config_binding_service"
+ ports:
+ - concat: ["11011:", { get_input: external_port }]
+ third_app:
+ type: dcae.nodes.ContainerizedServiceComponent
+ properties:
+ service_component_type: 'dcaegen2-analytics-tca'
+ application_config: {}
+ docker_config: {}
+ image:
+ get_input: tag_version
+ log_info:
+ log_directory: "/opt/app/TCAnalytics/logs"
+ relationships:
+ - target: tca_policy_3
+ type: cloudify.relationships.depends_on
+ - type: clamp_node.relationships.gets_input_from
+ target: second_app
+ tca_policy_1:
+ type: dcae.nodes.policy
+ properties:
+ policy_id:
+ get_input: policy_id
+ policy_model_id:
+ get_input: policy_model_id
+ tca_policy_2:
+ type: dcae.nodes.policy
+ properties:
+ policy_id:
+ get_input: policy_id
+ policy_model_id:
+ get_input: policy_model_id
+
+ tca_policy_3:
+ type: dcae.nodes.policy
+ properties:
+ policy_id:
+ get_input: policy_id
+ policy_model_id:
+ get_input: policy_model_id
diff --git a/runtime/src/test/resources/clds/clds-parse-exception.json b/runtime/src/test/resources/clds/clds-parse-exception.json
new file mode 100644
index 000000000..1c06a3947
--- /dev/null
+++ b/runtime/src/test/resources/clds/clds-parse-exception.json
@@ -0,0 +1 @@
+This is not json \ No newline at end of file
diff --git a/runtime/src/test/resources/clds/clds-users-incomplete-permissions.json b/runtime/src/test/resources/clds/clds-users-incomplete-permissions.json
new file mode 100644
index 000000000..9e3534ff4
--- /dev/null
+++ b/runtime/src/test/resources/clds/clds-users-incomplete-permissions.json
@@ -0,0 +1,14 @@
+[
+ {
+ "user": "admin1",
+ "password": "5f4dcc3b5aa765d61d8327deb882cf99",
+ "permissions": [
+ "permission-type-cl|dev|",
+ "permission-type-cl|dev",
+ "permission-type-cl-manage|dev|*",
+ "permission-type-filter-vf|dev|*",
+ "permission-type-template|dev|read",
+ "permission-type-template|dev|update"
+ ]
+ }
+]
diff --git a/runtime/src/test/resources/clds/clds-users-no-permission.json b/runtime/src/test/resources/clds/clds-users-no-permission.json
new file mode 100644
index 000000000..ac91540f2
--- /dev/null
+++ b/runtime/src/test/resources/clds/clds-users-no-permission.json
@@ -0,0 +1,7 @@
+[
+ {
+ "user": "admin1",
+ "permissions": [
+ ]
+ }
+]
diff --git a/runtime/src/test/resources/clds/clds-users-two-users.json b/runtime/src/test/resources/clds/clds-users-two-users.json
new file mode 100644
index 000000000..b3721946a
--- /dev/null
+++ b/runtime/src/test/resources/clds/clds-users-two-users.json
@@ -0,0 +1,26 @@
+[
+ {
+ "user": "admin1",
+ "password": "5f4dcc3b5aa765d61d8327deb882cf99",
+ "permissions": [
+ "permission-type-cl|dev|read",
+ "permission-type-cl|dev|update",
+ "permission-type-cl-manage|dev|*",
+ "permission-type-filter-vf|dev|*",
+ "permission-type-template|dev|read",
+ "permission-type-template|dev|update"
+ ]
+ },
+ {
+ "user": "admin2",
+ "password": "5f4dcc3b5aa765d61d8327deb882cf99",
+ "permissions": [
+ "permission-type-cl|dev|read",
+ "permission-type-cl|dev|update",
+ "permission-type-cl-manage|dev|*",
+ "permission-type-filter-vf|dev|*",
+ "permission-type-template|dev|read",
+ "permission-type-template|dev|update"
+ ]
+ }
+]
diff --git a/runtime/src/test/resources/clds/new-microservice.yaml b/runtime/src/test/resources/clds/new-microservice.yaml
new file mode 100644
index 000000000..70c1eda46
--- /dev/null
+++ b/runtime/src/test/resources/clds/new-microservice.yaml
@@ -0,0 +1,46 @@
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - "http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml"
+ - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/k8splugin/1.4.13/k8splugin_types.yaml"
+ - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml"
+
+inputs:
+ tag_version:
+ type: string
+ description: docker image
+ policy_model_id:
+ type: 'string'
+ default: 'onap.policies.monitoring.dcae-pm-initiation-handler'
+ policy_id:
+ type: 'string'
+ default: 'onap.policies.monitoring.dcae-pm-initiation-handler'
+
+node_templates:
+ pmsh:
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: pmsh-policy
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '8443:0'
+ - '8081:0'
+ properties:
+ image:
+ get_input: tag_version
+ replicas: 1
+ service_component_type: "pmsh"
+ service_component_name_override: "pmsh"
+ type: dcae.nodes.ContainerizedServiceComponent
+
+ pmsh-policy:
+ type: clamp.nodes.policy
+ properties:
+ policy_model_id:
+ get_input: policy_model_id
+ policy_id:
+ get_input: policy_id
diff --git a/runtime/src/test/resources/clds/policy-merger.json b/runtime/src/test/resources/clds/policy-merger.json
new file mode 100644
index 000000000..5c6bd5b6b
--- /dev/null
+++ b/runtime/src/test/resources/clds/policy-merger.json
@@ -0,0 +1,215 @@
+{
+ "policies": [
+ {
+ "MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0": {
+ "type": "onap.policies.monitoring.tcagen2",
+ "type_version": "1.0.0",
+ "properties": {
+ "tca.policy": {
+ "domain": "measurementsForVfScaling",
+ "metricsPerEventName": [
+ {
+ "policyScope": "DCAE",
+ "thresholds": [
+ {
+ "version": "1.0.2",
+ "severity": "MAJOR",
+ "thresholdValue": 200,
+ "closedLoopEventStatus": "ONSET",
+ "closedLoopControlName": "LOOP_test",
+ "direction": "LESS_OR_EQUAL",
+ "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta"
+ }
+ ],
+ "eventName": "vLoadBalancer",
+ "policyVersion": "v0.0.1",
+ "controlLoopSchemaType": "VM",
+ "policyName": "DCAE.Config_tca-hi-lo"
+ }
+ ]
+ }
+ },
+ "name": "MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0",
+ "version": "1.0.0",
+ "metadata": {
+ "policy-id": "MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0",
+ "policy-version": "1.0.0"
+ },
+ "pdpGroupInfo": {
+ "pdpGroup": "pdpGroup2",
+ "pdpSubGroup": "subGroup2"
+ },
+ "supportedPdpGroups": [
+ {
+ "pdpGroup2": [
+ "subGroup2",
+ "subGroup3"
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd": {
+ "type": "onap.policies.controlloop.operational.common.Drools",
+ "type_version": "1.0.0",
+ "properties": {
+ "abatement": false,
+ "operations": [
+ {
+ "failure_retries": "final_failure_retries",
+ "id": "test1",
+ "failure_timeout": "final_failure_timeout",
+ "failure": "final_failure",
+ "operation": {
+ "payload": {
+ "artifact_name": "baseconfiguration",
+ "artifact_version": "1.0.0",
+ "mode": "async",
+ "data": "{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"hostname\":\"\",\"request-info\":{\"prop1\":\"\",\"prop2\":\"\"}}}"
+ },
+ "target": {
+ "entityIds": {
+ "resourceID": "Vloadbalancerms..vdns..module-3",
+ "modelInvariantId": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
+ "modelVersionId": "4fa73b49-8a6c-493e-816b-eb401567b720",
+ "modelName": "Vloadbalancerms..vdns..module-3",
+ "modelVersion": "1",
+ "modelCustomizationId": "bafcdab0-801d-4d81-9ead-f464640a38b1"
+ },
+ "targetType": "VNF"
+ },
+ "actor": "SDNR",
+ "operation": "BandwidthOnDemand"
+ },
+ "failure_guard": "final_failure_guard",
+ "retries": 0,
+ "timeout": 0,
+ "failure_exception": "final_failure_exception",
+ "description": "test",
+ "success": "final_success"
+ }
+ ],
+ "trigger": "test1",
+ "timeout": 0,
+ "id": "LOOP_test"
+ },
+ "name": "OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd",
+ "version": "1.0.0",
+ "metadata": {
+ "policy-id": "OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd",
+ "policy-version": "1.0.0"
+ },
+ "pdpGroupInfo": {
+ "pdpGroup": "pdpGroup2",
+ "pdpSubGroup": "subGroup3"
+ },
+ "supportedPdpGroups": [
+ {
+ "pdpGroup2": [
+ "subGroup2",
+ "subGroup3"
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP": {
+ "type": "onap.policies.Naming",
+ "type_version": "1.0.0",
+ "properties": {
+ "naming-models": [
+ {
+ "naming-type": "VNF",
+ "naming-recipe": "AIC_CLOUD_REGION|DELIMITER|CONSTANT|DELIMITER|TIMESTAMP",
+ "name-operation": "to_lower_case()",
+ "naming-properties": [
+ {
+ "property-name": "AIC_CLOUD_REGION"
+ },
+ {
+ "property-name": "CONSTANT",
+ "property-value": "onap-nf"
+ },
+ {
+ "property-name": "TIMESTAMP"
+ },
+ {
+ "property-value": "-",
+ "property-name": "DELIMITER"
+ }
+ ]
+ },
+ {
+ "naming-type": "VNFC",
+ "naming-recipe": "VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE",
+ "name-operation": "to_lower_case()",
+ "naming-properties": [
+ {
+ "property-name": "VNF_NAME"
+ },
+ {
+ "property-name": "SEQUENCE",
+ "increment-sequence": {
+ "max": "zzz",
+ "scope": "ENTIRETY",
+ "start-value": "1",
+ "length": "3",
+ "increment": "1",
+ "sequence-type": "alpha-numeric"
+ }
+ },
+ {
+ "property-name": "NFC_NAMING_CODE"
+ },
+ {
+ "property-value": "-",
+ "property-name": "DELIMITER"
+ }
+ ]
+ },
+ {
+ "naming-type": "VF-MODULE",
+ "naming-recipe": "VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE",
+ "name-operation": "to_lower_case()",
+ "naming-properties": [
+ {
+ "property-name": "VNF_NAME"
+ },
+ {
+ "property-value": "-",
+ "property-name": "DELIMITER"
+ },
+ {
+ "property-name": "VF_MODULE_LABEL"
+ },
+ {
+ "property-name": "VF_MODULE_TYPE"
+ },
+ {
+ "property-name": "SEQUENCE",
+ "increment-sequence": {
+ "max": "zzz",
+ "scope": "PRECEEDING",
+ "start-value": "1",
+ "length": "3",
+ "increment": "1",
+ "sequence-type": "alpha-numeric"
+ }
+ }
+ ]
+ }
+ ],
+ "policy-instance-name": "ONAP_NF_NAMING_TIMESTAMP"
+ },
+ "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
+ "version": "1.0.0",
+ "metadata": {
+ "policy-id": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
+ "policy-version": "1.0.0"
+ }
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/runtime/src/test/resources/clds/sdc-controller-config-NULL.json b/runtime/src/test/resources/clds/sdc-controller-config-NULL.json
new file mode 100644
index 000000000..bf310c706
--- /dev/null
+++ b/runtime/src/test/resources/clds/sdc-controller-config-NULL.json
@@ -0,0 +1,11 @@
+{
+ "user": "User",
+ "consumerGroup": "NULL",
+ "consumerId": "consumerId",
+ "environmentName": "environmentName",
+ "sdcAddress": "hostname:8080",
+ "password": "bb3871669d893c7fb8aaacda31b77b4f537E67A081C2726889548ED7BC4C2DE6",
+ "pollingInterval":10,
+ "pollingTimeout":30,
+ "messageBusAddresses":["localhost"]
+}
diff --git a/runtime/src/test/resources/clds/sdc-controller-config-TLS.json b/runtime/src/test/resources/clds/sdc-controller-config-TLS.json
new file mode 100644
index 000000000..4d5f02945
--- /dev/null
+++ b/runtime/src/test/resources/clds/sdc-controller-config-TLS.json
@@ -0,0 +1,14 @@
+{
+ "user": "User",
+ "consumerGroup": "consumerGroup",
+ "consumerId": "consumerId",
+ "environmentName": "environmentName",
+ "sdcAddress": "hostname:8080",
+ "password": "QpF2TcrdRSFADqDxH1HwDYdYUIbMxOj-TrGd6Vqvwzd",
+ "pollingInterval":10,
+ "pollingTimeout":30,
+ "activateServerTLSAuth": true,
+ "keyStorePassword":"QpF2TcrdRSFADqDxH1HwDYdYUIbMxOj-TrGd6Vqvwzd",
+ "keyStorePath": "/test",
+ "messageBusAddresses":["localhost"]
+}
diff --git a/runtime/src/test/resources/clds/sdc-controller-config-bad.json b/runtime/src/test/resources/clds/sdc-controller-config-bad.json
new file mode 100644
index 000000000..194ff5f4b
--- /dev/null
+++ b/runtime/src/test/resources/clds/sdc-controller-config-bad.json
@@ -0,0 +1,13 @@
+{
+ "sdc-connections": {
+ "sdc-controller1": {
+ "user": "testuser",
+ "consumerGroup": "consumerGroup",
+ "consumerId": "consumerId",
+ "environmentName": "environmentName",
+ "sdcAddress": "hostname1:8080",
+ "pollingInterval": 10,
+ "pollingTimeout": 30
+ }
+ }
+}
diff --git a/runtime/src/test/resources/clds/sdc-controller-config-empty-encrypted.json b/runtime/src/test/resources/clds/sdc-controller-config-empty-encrypted.json
new file mode 100644
index 000000000..2a70b9edc
--- /dev/null
+++ b/runtime/src/test/resources/clds/sdc-controller-config-empty-encrypted.json
@@ -0,0 +1,14 @@
+{
+ "user": "User",
+ "consumerGroup": "consumerGroup",
+ "consumerId": "consumerId",
+ "environmentName": "environmentName",
+ "sdcAddress": "hostname:8080",
+ "password": "bb3871669d893c7fb8aaacda31b77b4f537E67A081C2726889548ED7BC4C2DE6",
+ "pollingInterval":10,
+ "pollingTimeout":30,
+ "activateServerTLSAuth": true,
+ "keyStorePassword":"",
+ "keyStorePath": "/test",
+ "messageBusAddresses":["localhost"]
+}
diff --git a/runtime/src/test/resources/clds/sdc-controllers-config-bad.json b/runtime/src/test/resources/clds/sdc-controllers-config-bad.json
new file mode 100644
index 000000000..0b417b745
--- /dev/null
+++ b/runtime/src/test/resources/clds/sdc-controllers-config-bad.json
@@ -0,0 +1,26 @@
+{
+ "sdc-connections":{,
+ "sdc-controller1":{
+ "user": "User1",
+ "consumerGroup": "consumerGroup1",
+ "consumerId": "consumerId1",
+ "environmentName": "environmentName1",
+ "sdcAddress": "hostname1",
+ "password": "bb3871669d893c7fb8aaacda31b77b4f537E67A081C2726889548ED7BC4C2DE6",
+ "pollingInterval":10,
+ "pollingTimeout":30
+
+ },
+ "sdc-controller2":{
+ "user": "User2",
+ "consumerGroup": "consumerGroup2",
+ "consumerId": "consumerId2",
+ "environmentName": "environmentName2",
+ "sdcAddress": "hostname2",
+ "password": "bb3871669d893c7fb8aaacda31b77b4f537E67A081C2726889548ED7BC4C2DE6",
+ "pollingInterval":10,
+ "pollingTimeout":30
+
+ }
+ }
+}
diff --git a/runtime/src/test/resources/clds/sdc-controllers-config-missing-param.json b/runtime/src/test/resources/clds/sdc-controllers-config-missing-param.json
new file mode 100644
index 000000000..d99ed5801
--- /dev/null
+++ b/runtime/src/test/resources/clds/sdc-controllers-config-missing-param.json
@@ -0,0 +1,13 @@
+{
+ "sdc-connections": {
+ "sdc-controller1": {
+ "user": "testuser",
+ "consumerGroup": "consumerGroup",
+ "consumerId": "consumerId",
+ "environmentName": "environmentName",
+ "sdcAddress": "hostname1",
+ "pollingInterval": 10,
+ "pollingTimeout": 30
+ }
+ }
+}
diff --git a/runtime/src/test/resources/clds/sdc-controllers-config.json b/runtime/src/test/resources/clds/sdc-controllers-config.json
new file mode 100644
index 000000000..aafd7d61d
--- /dev/null
+++ b/runtime/src/test/resources/clds/sdc-controllers-config.json
@@ -0,0 +1,30 @@
+{
+ "sdc-connections": {
+ "sdc-controller1": {
+ "user": "User1",
+ "consumerGroup": "consumerGroup1",
+ "consumerId": "consumerId1",
+ "environmentName": "environmentName1",
+ "sdcAddress": "localhost:${docker.http-cache.port.host}",
+ "password": "enc:QpF2TcrdRSFADqDxH1HwDYdYUIbMxOj-TrGd6Vqvwzd",
+ "pollingInterval": 10,
+ "pollingTimeout": 30,
+ "messageBusAddresses": [
+ "localhost"
+ ]
+ },
+ "sdc-controller2": {
+ "user": "User2",
+ "consumerGroup": "consumerGroup2",
+ "consumerId": "consumerId2",
+ "environmentName": "environmentName2",
+ "sdcAddress": "localhost:${docker.http-cache.port.host}",
+ "password": "enc:QpF2TcrdRSFADqDxH1HwDYdYUIbMxOj-TrGd6Vqvwzd",
+ "pollingInterval": 10,
+ "pollingTimeout": 30,
+ "messageBusAddresses": [
+ "localhost"
+ ]
+ }
+ }
+}
diff --git a/runtime/src/test/resources/clds/single-microservice-fragment-invalid.yaml b/runtime/src/test/resources/clds/single-microservice-fragment-invalid.yaml
new file mode 100644
index 000000000..2c1680717
--- /dev/null
+++ b/runtime/src/test/resources/clds/single-microservice-fragment-invalid.yaml
@@ -0,0 +1,25 @@
+second_app:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+ properties:
+ service_component_type: dcaegen2-analytics-tca
+ service_component_name_override: second_app
+ image: { get_input: second_app_docker_image }
+ name: second_app
+ policy_id:
+ policy_model_id: "type1"
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ grpc_server.host: "first_app.onap"
+ dmaap_ip: {get_input: dmaap_ip}
+ dmapp_topic: {get_input: dmaap_topic}
+ policy_id: {get_input: policy_id}
+ ports:
+ - 8080:8080
+ relationships:
+ - type: cloudify.relationships.connected_to
+ target: first_app
+ - type: clamp_node.relationships.gets_input_from
+ target: first_app \ No newline at end of file
diff --git a/runtime/src/test/resources/clds/single-microservice-fragment-valid-with-version.yaml b/runtime/src/test/resources/clds/single-microservice-fragment-valid-with-version.yaml
new file mode 100644
index 000000000..ae31fb16a
--- /dev/null
+++ b/runtime/src/test/resources/clds/single-microservice-fragment-valid-with-version.yaml
@@ -0,0 +1,21 @@
+second_app:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+ properties:
+ service_component_type: dcaegen2-analytics-tca
+ service_component_name_override: second_app
+ image: { get_input: second_app_docker_image }
+ name: second_app
+ policy_id:
+ policy_model_id: "type1"
+ policy_model_version: "10.0.0"
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ grpc_server.host: "first_app.onap"
+ dmaap_ip: {get_input: dmaap_ip}
+ dmapp_topic: {get_input: dmaap_topic}
+ policy_id: {get_input: policy_id}
+ ports:
+ - 8080:8080
diff --git a/runtime/src/test/resources/clds/single-microservice-fragment-without-name.yaml b/runtime/src/test/resources/clds/single-microservice-fragment-without-name.yaml
new file mode 100644
index 000000000..f9ac53cac
--- /dev/null
+++ b/runtime/src/test/resources/clds/single-microservice-fragment-without-name.yaml
@@ -0,0 +1,22 @@
+second_app:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+ properties:
+ service_component_type: dcaegen2-analytics-tca
+ service_component_name_override: second_app
+ image: { get_input: second_app_docker_image }
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ grpc_server.host: "first_app.onap"
+ dmaap_ip: {get_input: dmaap_ip}
+ dmapp_topic: {get_input: dmaap_topic}
+ policy_id: {get_input: policy_id}
+ ports:
+ - 8080:8080
+ relationships:
+ - type: cloudify.relationships.connected_to
+ target: first_app
+ - type: clamp_node.relationships.gets_input_from
+ target: first_app \ No newline at end of file
diff --git a/runtime/src/test/resources/clds/single-microservice-fragment-without-properties.yaml b/runtime/src/test/resources/clds/single-microservice-fragment-without-properties.yaml
new file mode 100644
index 000000000..a34ccc6d4
--- /dev/null
+++ b/runtime/src/test/resources/clds/single-microservice-fragment-without-properties.yaml
@@ -0,0 +1,18 @@
+second_app:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ grpc_server.host: "first_app.onap"
+ dmaap_ip: {get_input: dmaap_ip}
+ dmapp_topic: {get_input: dmaap_topic}
+ policy_id: {get_input: policy_id}
+ ports:
+ - 8080:8080
+ relationships:
+ - type: cloudify.relationships.connected_to
+ target: first_app
+ - type: clamp_node.relationships.gets_input_from
+ target: first_app \ No newline at end of file
diff --git a/runtime/src/test/resources/clds/single-microservice-fragment-without-relationships.yaml b/runtime/src/test/resources/clds/single-microservice-fragment-without-relationships.yaml
new file mode 100644
index 000000000..0354acd69
--- /dev/null
+++ b/runtime/src/test/resources/clds/single-microservice-fragment-without-relationships.yaml
@@ -0,0 +1,18 @@
+second_app:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+ properties:
+ service_component_type: dcaegen2-analytics-tca
+ service_component_name_override: second_app
+ image: { get_input: second_app_docker_image }
+ name: second_app
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ grpc_server.host: "first_app.onap"
+ dmaap_ip: {get_input: dmaap_ip}
+ dmapp_topic: {get_input: dmaap_topic}
+ policy_id: {get_input: policy_id}
+ ports:
+ - 8080:8080 \ No newline at end of file
diff --git a/runtime/src/test/resources/clds/templates/dcae-deployment-template.json b/runtime/src/test/resources/clds/templates/dcae-deployment-template.json
new file mode 100644
index 000000000..d4891747e
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/dcae-deployment-template.json
@@ -0,0 +1,9 @@
+{
+ "serviceTypeId": "???",
+ "inputs": {
+ "aaiEnrichmentHost": "10.0.1.1",
+ "enableAAIEnrichment": "true",
+ "subscriberHostName": "10.0.11.1",
+ "publisherHostName": "10.0.11.1"
+ }
+}
diff --git a/runtime/src/test/resources/clds/templates/dcae-template.json b/runtime/src/test/resources/clds/templates/dcae-template.json
new file mode 100644
index 000000000..b76baf2d4
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/dcae-template.json
@@ -0,0 +1,26 @@
+{
+ "properties": {
+ "service_name": "",
+ "service_ids": [
+ ],
+ "vnf_ids": [
+ ],
+ "location_ids": [
+ ]
+ },
+ "template": {
+ "tca": {
+ "dcae": {
+ "inputTopic": "",
+ "outputTopic": "",
+ "closedLoopControlName": "",
+ "closedLoopEventClient": "configuration.dcae.microservice.tca.xml",
+ "policyName": "",
+ "policyScope": "DCAE",
+ "policyVersion": "v0.0.1",
+ "serviceConfigurations": {
+ }
+ }
+ }
+ }
+}
diff --git a/runtime/src/test/resources/clds/templates/globalProperties.json b/runtime/src/test/resources/clds/templates/globalProperties.json
new file mode 100644
index 000000000..067063ea2
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/globalProperties.json
@@ -0,0 +1,104 @@
+{
+ "tca": {
+ "tname": "New_Set",
+ "tcaInt": "1",
+ "tcaVio": "1",
+ "eventName": {
+ "vLoadBalancer": "vLoadBalancer",
+ "vFirewallBroadcastPackets": "vFirewallBroadcastPackets",
+ "Measurement_vGMUX":"Measurement_vGMUX"
+ },
+ "fieldPathM": {
+ "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value": "packetLossRate",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta":"receivedTotalPacketsDelta"
+ },
+ "operator": {
+ ">": "GREATER",
+ ">=": "GREATER_OR_EQUAL",
+ "=": "EQUAL",
+ "<=": "LESS_OR_EQUAL",
+ "<": "LESS"
+ },
+ "opsPolicy": {
+ "POLICY_test_X": "POLICY_test_X",
+ "POLICY_test_Y": "POLICY_test_Y"
+ },
+ "controlLoopSchemaType": {
+ "": "",
+ "VM": "VM",
+ "VNF": "VNF"
+ },
+ "closedLoopEventStatus": {
+ "": "",
+ "ONSET": "ONSET",
+ "ABATED": "ABATED"
+ }
+ },
+ "global": {
+ "actionSet": {
+ "vnfRecipe": "VNF"
+ },
+ "location": {
+ "DC1": "Data Center 1",
+ "DC2": "Data Center 2",
+ "DC3": "Data Center 3"
+ }
+ },
+ "policy": {
+ "pname": "0",
+ "timeout": 345,
+ "vnfRecipe": {
+ "": "",
+ "Restart": "Restart",
+ "Rebuild": "Rebuild",
+ "Migrate": "Migrate",
+ "HealthCheck": "Health Check",
+ "ModifyConfig": "Modify Config",
+ "VF Module Create":"VF Module Create",
+ "VF Module Delete":"VF Module Delete",
+ "Reroute":"Reroute"
+ },
+ "maxRetries": "3",
+ "retryTimeLimit": 180,
+ "resource": {
+ "vCTS": "vCTS",
+ "v3CDB": "v3CDB",
+ "vUDR": "vUDR",
+ "vCOM": "vCOM",
+ "vRAR": "vRAR",
+ "vLCS": "vLCS",
+ "vUDR-BE": "vUDR-BE",
+ "vDBE": "vDBE"
+ },
+ "parentPolicyConditions": {
+ "Failure_Retries": "Failure: Max Retries Exceeded",
+ "Failure_Timeout": "Failure: Time Limit Exceeded",
+ "Failure_Guard": "Failure: Guard",
+ "Failure_Exception": "Failure: Exception",
+ "Failure": "Failure: Other",
+ "Success": "Success"
+ }
+ },
+ "shared": {
+ "byService": {
+ "": {
+ "vf": {
+ "": ""
+ },
+ "location": {
+ "": ""
+ },
+ "alarmCondition": {
+ "": ""
+ }
+ }
+ },
+ "byVf": {
+ "": {
+ "vfc": {
+ "": ""
+ }
+ }
+ }
+ }
+}
diff --git a/runtime/src/test/resources/clds/templates/sdc-decode-service_ids.json b/runtime/src/test/resources/clds/templates/sdc-decode-service_ids.json
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/sdc-decode-service_ids.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/runtime/src/test/resources/clds/templates/sdc-template.json b/runtime/src/test/resources/clds/templates/sdc-template.json
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/sdc-template.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/runtime/src/test/resources/clds/templates/tca-policy-template.json b/runtime/src/test/resources/clds/templates/tca-policy-template.json
new file mode 100644
index 000000000..559aacb29
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/tca-policy-template.json
@@ -0,0 +1,19 @@
+{
+ "service": "tca_policy",
+ "version": "1.1.0",
+ "location": "SampleServiceLocation",
+ "configName": "SampleConfigName",
+ "uuid": "test",
+ "policyScope": "CLAMP",
+ "templateVersion": "OpenSource.version.1",
+ "policyName": "MicroService",
+ "description": "MicroService Policy",
+ "priority": "1",
+ "riskType": "SampleRiskType",
+ "riskLevel": "1",
+ "guard": "False",
+ "content": {
+ "tca_policy": {
+ }
+ }
+}
diff --git a/runtime/src/test/resources/clds/templates/tca-template.json b/runtime/src/test/resources/clds/templates/tca-template.json
new file mode 100644
index 000000000..892fc0d62
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/tca-template.json
@@ -0,0 +1,14 @@
+{
+ "domain": "measurementsForVfScaling",
+ "metricsPerEventName": [
+ {
+ "eventName": "???",
+ "controlLoopSchemaType": "VNF",
+ "policyScope": "DCAE",
+ "policyName": "???",
+ "policyVersion": "v0.0.1",
+ "thresholds": [
+ ]
+ }
+ ]
+}
diff --git a/runtime/src/test/resources/clds/templates/tca-thresholds-template.json b/runtime/src/test/resources/clds/templates/tca-thresholds-template.json
new file mode 100644
index 000000000..b67e96321
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/tca-thresholds-template.json
@@ -0,0 +1,9 @@
+{
+ "closedLoopControlName": "???",
+ "version": "1.0.2",
+ "fieldPath": "?????",
+ "thresholdValue": 0,
+ "direction": "???",
+ "severity": "MAJOR",
+ "closedLoopEventStatus": "???"
+}
diff --git a/runtime/src/test/resources/clds/templates/ui-location-default.json b/runtime/src/test/resources/clds/templates/ui-location-default.json
new file mode 100644
index 000000000..c0043d988
--- /dev/null
+++ b/runtime/src/test/resources/clds/templates/ui-location-default.json
@@ -0,0 +1,5 @@
+{
+ "DC1": "Data Center 1",
+ "DC2": "Data Center 2",
+ "DC3": "Data Center 3"
+}
diff --git a/runtime/src/test/resources/clds/util/file.xml b/runtime/src/test/resources/clds/util/file.xml
new file mode 100644
index 000000000..81560bab4
--- /dev/null
+++ b/runtime/src/test/resources/clds/util/file.xml
@@ -0,0 +1,6 @@
+<note>
+ <to>Tove</to>
+ <from>Jani</from>
+ <heading>Reminder</heading>
+ <body>Message body</body>
+</note>