From e3578fcdcd65c9f919c0f7cc16949b79b70d12b4 Mon Sep 17 00:00:00 2001 From: Ravi Mantena Date: Fri, 27 Nov 2020 13:34:11 -0500 Subject: Policy Model Distribution POC Issue-ID: DCAEGEN2-1868 Issue-ID: DCAEGEN2-1868 Change-Id: Ife6421558af59405f3026f66950ff8f2d7aeba17 Signed-off-by: Ravi Mantena --- .../resources/http/requests/pmdist_sample.json | 142 +++++++++++++++++++++ .../http/requests/policy-model_create_request.json | 6 + .../http/requests/policy-model_update_request.json | 5 + .../responses/policy-model_create_response.json | 12 ++ .../responses/policy-model_create_response1.json | 16 +++ 5 files changed, 181 insertions(+) create mode 100644 mod2/catalog-service/src/test/resources/http/requests/pmdist_sample.json create mode 100644 mod2/catalog-service/src/test/resources/http/requests/policy-model_create_request.json create mode 100644 mod2/catalog-service/src/test/resources/http/requests/policy-model_update_request.json create mode 100644 mod2/catalog-service/src/test/resources/http/responses/policy-model_create_response.json create mode 100644 mod2/catalog-service/src/test/resources/http/responses/policy-model_create_response1.json (limited to 'mod2/catalog-service/src/test/resources') diff --git a/mod2/catalog-service/src/test/resources/http/requests/pmdist_sample.json b/mod2/catalog-service/src/test/resources/http/requests/pmdist_sample.json new file mode 100644 index 0000000..16ab65a --- /dev/null +++ b/mod2/catalog-service/src/test/resources/http/requests/pmdist_sample.json @@ -0,0 +1,142 @@ +{ + "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/http/requests/policy-model_create_request.json b/mod2/catalog-service/src/test/resources/http/requests/policy-model_create_request.json new file mode 100644 index 0000000..ace9181 --- /dev/null +++ b/mod2/catalog-service/src/test/resources/http/requests/policy-model_create_request.json @@ -0,0 +1,6 @@ +{ + "name": "tca_policy_dublin12345", + "content": "tosca_definitions_version: tosca_simple_yaml_1_1_0\r\npolicy_types:\r\n onap.policies.Monitoring:\r\n derived_from: tosca.policies.Root\r\n version: 1.0.0\r\n name: tca_policy_dublin12345\r\n description: a base policy type for all policies that govern monitoring provisioning\r\n onap.policies.monitoring.tcagen2:\r\n derived_from: onap.policies.Monitoring\r\n version: 1.0.0\r\n name: onap.policies.monitoring.tcagen2\r\n properties:\r\n tca.policy:\r\n type: onap.datatypes.monitoring.tca_policy\r\n description: TCA Policy JSON\r\n required: true\r\ndata_types:\r\n onap.datatypes.monitoring.metricsPerEventName:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n controlLoopSchemaType:\r\n type: string\r\n required: true\r\n description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\r\n constraints:\r\n - valid_values:\r\n - VM\r\n - VNF\r\n eventName:\r\n type: string\r\n required: true\r\n description: Event name to which thresholds need to be applied\r\n policyName:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope Name\r\n policyScope:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope\r\n policyVersion:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope Version\r\n thresholds:\r\n type: list\r\n required: true\r\n description: Thresholds associated with eventName\r\n entry_schema:\r\n type: onap.datatypes.monitoring.thresholds\r\n onap.datatypes.monitoring.tca_policy:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n domain:\r\n type: string\r\n required: true\r\n description: Domain name to which TCA needs to be applied\r\n default: measurementsForVfScaling\r\n constraints:\r\n - equal: measurementsForVfScaling\r\n metricsPerEventName:\r\n type: list\r\n required: true\r\n description: Contains eventName and threshold details that need to be applied to given eventName\r\n entry_schema:\r\n type: onap.datatypes.monitoring.metricsPerEventName\r\n onap.datatypes.monitoring.thresholds:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n closedLoopControlName:\r\n type: string\r\n required: true\r\n description: Closed Loop Control Name associated with the threshold\r\n closedLoopEventStatus:\r\n type: string\r\n required: true\r\n description: Closed Loop Event Status of the threshold\r\n constraints:\r\n - valid_values:\r\n - ONSET\r\n - ABATED\r\n direction:\r\n type: string\r\n required: true\r\n description: Direction of the threshold\r\n constraints:\r\n - valid_values:\r\n - LESS\r\n - LESS_OR_EQUAL\r\n - GREATER\r\n - GREATER_OR_EQUAL\r\n - EQUAL\r\n fieldPath:\r\n type: string\r\n required: true\r\n description: Json field Path as per CEF message which needs to be analyzed for TCA\r\n constraints:\r\n - valid_values:\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage\r\n - $.event.measurementsForVfScalingFields.meanRequestLatency\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed\r\n - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\r\n severity:\r\n type: string\r\n required: true\r\n description: Threshold Event Severity\r\n constraints:\r\n - valid_values:\r\n - CRITICAL\r\n - MAJOR\r\n - MINOR\r\n - WARNING\r\n - NORMAL\r\n thresholdValue:\r\n type: integer\r\n required: true\r\n description: Threshold value for the field Path inside CEF message\r\n version:\r\n type: string\r\n required: true\r\n description: Version number associated with the threshold", + "owner": "admin", + "version": "1.0.0" +} \ No newline at end of file diff --git a/mod2/catalog-service/src/test/resources/http/requests/policy-model_update_request.json b/mod2/catalog-service/src/test/resources/http/requests/policy-model_update_request.json new file mode 100644 index 0000000..8f2cf5b --- /dev/null +++ b/mod2/catalog-service/src/test/resources/http/requests/policy-model_update_request.json @@ -0,0 +1,5 @@ +{ + "name": "tca_policy_dublin12345", + "owner": "admin123", + "version": "1.0.0" +} \ No newline at end of file diff --git a/mod2/catalog-service/src/test/resources/http/responses/policy-model_create_response.json b/mod2/catalog-service/src/test/resources/http/responses/policy-model_create_response.json new file mode 100644 index 0000000..d689dcb --- /dev/null +++ b/mod2/catalog-service/src/test/resources/http/responses/policy-model_create_response.json @@ -0,0 +1,12 @@ +{ + "id": "5fae8956cd1bac74e55c9d3a", + "name": "tca_policy_dublin12345", + "content": "\ttosca_definitions_version: tosca_simple_yaml_1_0_0\r\npolicy_types:\r\n onap.policies.Monitoring:\r\n derived_from: tosca.policies.Root\r\n description: a base policy type for all policies that governs monitoring provisioning\r\n onap.policies.monitoring.cdap.tca.hi.lo.app:\r\n derived_from: onap.policies.Monitoring\r\n version: 1.0.0\r\n properties:\r\n tca_policy:\r\n type: map\r\n description: TCA Policy JSON\r\n entry_schema:\r\n type: onap.datatypes.monitoring.tca_policy\r\ndata_types:\r\n onap.datatypes.monitoring.metricsPerEventName:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n controlLoopSchemaType:\r\n type: string\r\n required: true\r\n description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\r\n constraints:\r\n - valid_values:\r\n - VM\r\n - VNF\r\n eventName:\r\n type: string\r\n required: true\r\n description: Event name to which thresholds need to be applied\r\n policyName:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope Name\r\n policyScope:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope\r\n policyVersion:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope Version\r\n thresholds:\r\n type: list\r\n required: true\r\n description: Thresholds associated with eventName\r\n entry_schema:\r\n type: onap.datatypes.monitoring.thresholds\r\n onap.datatypes.monitoring.tca_policy:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n domain:\r\n type: string\r\n required: true\r\n description: Domain name to which TCA needs to be applied\r\n default: measurementsForVfScaling\r\n constraints:\r\n - equal: measurementsForVfScaling\r\n metricsPerEventName:\r\n type: list\r\n required: true\r\n description: Contains eventName and threshold details that need to be applied to given eventName\r\n entry_schema:\r\n type: onap.datatypes.monitoring.metricsPerEventName\r\n onap.datatypes.monitoring.thresholds:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n closedLoopControlName:\r\n type: string\r\n required: true\r\n description: Closed Loop Control Name associated with the threshold\r\n closedLoopEventStatus:\r\n type: string\r\n required: true\r\n description: Closed Loop Event Status of the threshold\r\n constraints:\r\n - valid_values:\r\n - ONSET\r\n - ABATED\r\n direction:\r\n type: string\r\n required: true\r\n description: Direction of the threshold\r\n constraints:\r\n - valid_values:\r\n - LESS\r\n - LESS_OR_EQUAL\r\n - GREATER\r\n - GREATER_OR_EQUAL\r\n - EQUAL\r\n fieldPath:\r\n type: string\r\n required: true\r\n description: Json field Path as per CEF message which needs to be analyzed for TCA\r\n constraints:\r\n - valid_values:\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage\r\n - $.event.measurementsForVfScalingFields.meanRequestLatency\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed\r\n - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\r\n severity:\r\n type: string\r\n required: true\r\n description: Threshold Event Severity\r\n constraints:\r\n - valid_values:\r\n - CRITICAL\r\n - MAJOR\r\n - MINOR\r\n - WARNING\r\n - NORMAL\r\n thresholdValue:\r\n type: integer\r\n required: true\r\n description: Threshold value for the field Path inside CEF message\r\n version:\r\n type: string\r\n required: true\r\n description: Version number associated with the threshold", + "owner": "admin", + "version": "1.0.0", + "metadata": { + "createdBy": "rx908f", + "createdOn": "2020-11-13T13:25:42.434+0000", + "notes": "" + } +} \ No newline at end of file diff --git a/mod2/catalog-service/src/test/resources/http/responses/policy-model_create_response1.json b/mod2/catalog-service/src/test/resources/http/responses/policy-model_create_response1.json new file mode 100644 index 0000000..3d3516c --- /dev/null +++ b/mod2/catalog-service/src/test/resources/http/responses/policy-model_create_response1.json @@ -0,0 +1,16 @@ +{ + "id": "5fae8956cd1bac74e55c9d3a", + "name": "tca_policy_dublin12345", + "content": "\tosca_definitions_version: tosca_simple_yaml_1_1_0\r\npolicy_types:\r\n onap.policies.Monitoring:\r\n derived_from: tosca.policies.Root\r\n version: 1.0.0\r\n name: onap.policies.Monitoring\r\n description: a base policy type for all policies that govern monitoring provisioning\r\n onap.policies.monitoring.tcagen2:\r\n derived_from: onap.policies.Monitoring\r\n version: 1.0.0\r\n name: onap.policies.monitoring.tcagen2\r\n properties:\r\n tca.policy:\r\n type: onap.datatypes.monitoring.tca_policy\r\n description: TCA Policy JSON\r\n required: true\r\ndata_types:\r\n onap.datatypes.monitoring.metricsPerEventName:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n controlLoopSchemaType:\r\n type: string\r\n required: true\r\n description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM\r\n constraints:\r\n - valid_values:\r\n - VM\r\n - VNF\r\n eventName:\r\n type: string\r\n required: true\r\n description: Event name to which thresholds need to be applied\r\n policyName:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope Name\r\n policyScope:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope\r\n policyVersion:\r\n type: string\r\n required: true\r\n description: TCA Policy Scope Version\r\n thresholds:\r\n type: list\r\n required: true\r\n description: Thresholds associated with eventName\r\n entry_schema:\r\n type: onap.datatypes.monitoring.thresholds\r\n onap.datatypes.monitoring.tca_policy:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n domain:\r\n type: string\r\n required: true\r\n description: Domain name to which TCA needs to be applied\r\n default: measurementsForVfScaling\r\n constraints:\r\n - equal: measurementsForVfScaling\r\n metricsPerEventName:\r\n type: list\r\n required: true\r\n description: Contains eventName and threshold details that need to be applied to given eventName\r\n entry_schema:\r\n type: onap.datatypes.monitoring.metricsPerEventName\r\n onap.datatypes.monitoring.thresholds:\r\n derived_from: tosca.datatypes.Root\r\n properties:\r\n closedLoopControlName:\r\n type: string\r\n required: true\r\n description: Closed Loop Control Name associated with the threshold\r\n closedLoopEventStatus:\r\n type: string\r\n required: true\r\n description: Closed Loop Event Status of the threshold\r\n constraints:\r\n - valid_values:\r\n - ONSET\r\n - ABATED\r\n direction:\r\n type: string\r\n required: true\r\n description: Direction of the threshold\r\n constraints:\r\n - valid_values:\r\n - LESS\r\n - LESS_OR_EQUAL\r\n - GREATER\r\n - GREATER_OR_EQUAL\r\n - EQUAL\r\n fieldPath:\r\n type: string\r\n required: true\r\n description: Json field Path as per CEF message which needs to be analyzed for TCA\r\n constraints:\r\n - valid_values:\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait\r\n - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage\r\n - $.event.measurementsForVfScalingFields.meanRequestLatency\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree\r\n - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed\r\n - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\r\n severity:\r\n type: string\r\n required: true\r\n description: Threshold Event Severity\r\n constraints:\r\n - valid_values:\r\n - CRITICAL\r\n - MAJOR\r\n - MINOR\r\n - WARNING\r\n - NORMAL\r\n thresholdValue:\r\n type: integer\r\n required: true\r\n description: Threshold value for the field Path inside CEF message\r\n version:\r\n type: string\r\n required: true\r\n description: Version number associated with the threshold", + "owner": "admin", + "version": "1.0.0", + "metadata": { + "createdBy": "rx908f", + "createdOn": "2020-11-13T13:25:42.434+0000", + "notes": "" + }, + "distributionInfo": [{ + "url": "https://:6969/policy/api/v1/", + "status": "FAILED" + }] +} \ No newline at end of file -- cgit 1.2.3-korg