XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Medium Medium
    • Guilin Release
    • None
    • None
    • None

      Enhance TCA-gen2 to support policy based configuration.

       

      CBS query results without POLICY based configuration

      bash-4.2$ curl https://config-binding-service:10443/service_component_all/dcae-tcagen2 -k
      {"config": {"spring.data.mongodb.uri": "mongodb://dcae-mongohost/dcae-tcagen2", "streams_subscribes": {"tca_handle_in": {"type": "message_router", "dmaap_info": {"topic_url": "http://message-router:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT/"}}}, "tca.enable_ecomp_logging": true, "tca.enable_abatement": true, "tca.aai.password": "DCAE", "streams_subscribes.tca_handle_in.consumer_group": "cg1", "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up": 10000, "tca.aai.node_query_path": "aai/v11/search/nodes-query", "streams_publishes": {"tca_handle_out": {"type": "message_router", "dmaap_info": {"topic_url": "http://message-router:3904/events/unauthenticated.TCAGEN2_OUTPUT/"}}}, "streams_subscribes.tca_handle_in.consumer_ids[1]": "c1", "tca.aai.generic_vnf_path": "aai/v11/network/generic-vnfs/generic-vnf", "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down": 30000, "streams_subscribes.tca_handle_in.polling.auto_adjusting.max": 60000, "tca.aai.username": "DCAE", "streams_subscribes.tca_handle_in.polling.auto_adjusting.min": 30000, "tca.aai.url": "http://aai.onap.svc.cluster.local", "streams_subscribes.tca_handle_in.timeout": -1, "tca.aai.enable_enrichment": true, "tca.policy": "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}", "tca.processing_batch_size": 10000, "streams_subscribes.tca_handle_in.polling.fixed_rate": 0, "streams_subscribes.tca_handle_in.message_limit": 50000, "service_calls": [], "streams_subscribes.tca_handle_in.consumer_ids[0]": "c0"}}
      

      CBS query results with POLICY based configuration

      bash-4.2$ curl https://config-binding-service:10443/service_component_all/s58457435d43e4a76a96dd024df46fba4-dcae-tcagen2 -k
      {"config": {"spring.data.mongodb.uri": "mongodb://dcae-mongohost/dcae-tcagen2", "streams_subscribes": {"tca_handle_in": {"type": "message_router", "dmaap_info": {"topic_url": "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT"}}}, "tca.enable_ecomp_logging": true, "tca.enable_abatement": true, "tca.aai.password": "DCAE", "streams_subscribes.tca_handle_in.consumer_group": "cg1", "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up": 10000, "tca.aai.node_query_path": "aai/v11/search/nodes-query", "streams_publishes": {"tca_handle_out": {"type": "message_router", "dmaap_info": {"topic_url": "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.TCAGEN2-OUTPUT"}}}, "streams_subscribes.tca_handle_in.consumer_ids[1]": "c1", "tca.aai.generic_vnf_path": "aai/v11/network/generic-vnfs/generic-vnf", "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down": 30000, "streams_subscribes.tca_handle_in.polling.auto_adjusting.max": 60000, "tca.aai.username": "DCAE", "streams_subscribes.tca_handle_in.polling.auto_adjusting.min": 30000, "tca.aai.url": "http://aai.onap.svc.cluster.local", "streams_subscribes.tca_handle_in.timeout": -1, "tca.aai.enable_enrichment": true, "tca.policy": "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}", "tca.processing_batch_size": 10000, "streams_subscribes.tca_handle_in.polling.fixed_rate": 0, "streams_subscribes.tca_handle_in.message_limit": 50000, "service_calls": [], "streams_subscribes.tca_handle_in.consumer_ids[0]": "c0"}, "policies": {"event": {"action": "gathered", "timestamp": "2020-04-08T19:45:38.927Z", "update_id": "d86a3b58-8c4b-49e9-ade7-8238501adf02", "policies_count": 1}, "items": [{"policyName": "onap.vfirewall.tca.1-0-0.xml", "name": "onap.vfirewall.tca", "config": {"tca.policy": {"domain": "measurementsForVfScaling", "metricsPerEventName": [{"policyName": "onap.vfirewall.tca", "policyScope": "resource=vLoadBalancer;type=configuration", "thresholds": [{"direction": "LESS_OR_EQUAL", "severity": "MAJOR", "closedLoopControlName": "VVK_ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", "version": "1.0.2", "closedLoopEventStatus": "ONSET", "thresholdValue": 500}, {"direction": "GREATER_OR_EQUAL", "severity": "CRITICAL", "closedLoopControlName": "VVK_ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", "version": "1.0.2", "closedLoopEventStatus": "ONSET", "thresholdValue": 5000}], "eventName": "vLoadBalancer", "controlLoopSchemaType": "VNF", "policyVersion": "v0.0.1"}]}}, "type_version": "1.0.0", "version": "1.0.0", "policyVersion": "1.0.0", "type": "onap.policies.monitoring.cdap.tca.hi.lo.app", "metadata": {"policy-id": "onap.vfirewall.tca", "policy-version": "1.0.0"}}]}}
      

      When policies are returned on CBS query o/p, it should supersede application.config with correponding key under policies.items[0].config. In the above example,
      tca.policy must reflect below setting and used for application runtime.

       "tca.policy": { "tca.policy": { "domain": "measurementsForVfScaling", "metricsPerEventName": [{ "policyName": "onap.vfirewall.tca", "policyScope": "resource=vLoadBalancer;type=configuration", "thresholds": [{ "direction": "LESS_OR_EQUAL", "severity": "MAJOR", "closedLoopControlName": "VVK_ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", "version": "1.0.2", "closedLoopEventStatus": "ONSET", "thresholdValue": 500 }, { "direction": "GREATER_OR_EQUAL", "severity": "CRITICAL", "closedLoopControlName": "VVK_ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", "version": "1.0.2", "closedLoopEventStatus": "ONSET", "thresholdValue": 5000 }], "eventName": "vLoadBalancer", "controlLoopSchemaType": "VNF", "policyVersion": "v0.0.1" }]
      

       

       

        1. 1.3.PNG
          1.3.PNG
          164 kB
        2. 1.4.PNG
          1.4.PNG
          196 kB
        3. 1.5.PNG
          1.5.PNG
          277 kB
        4. image-2020-04-08-16-30-50-693.png
          image-2020-04-08-16-30-50-693.png
          36 kB
        5. image-2020-04-08-16-32-00-432.png
          image-2020-04-08-16-32-00-432.png
          43 kB
        6. image-2020-04-08-16-36-33-283.png
          image-2020-04-08-16-36-33-283.png
          57 kB
        7. image-2020-07-31-17-00-11-662.png
          image-2020-07-31-17-00-11-662.png
          253 kB
        8. image-2020-07-31-17-00-27-247.png
          image-2020-07-31-17-00-27-247.png
          253 kB

            lukai lukai
            vv770d vv770d
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: