Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleCL Event Ouput
collapsetrue


{  
   "closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca",
   "policyVersion":"1.0.0.5",
   "policyName":"vFirewall",
   "policyScope":"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
   "target_type":"VNF",
   "AAI":{  
      "generic-vnf.in-maint":false,
      "generic-vnf.is-closed-loop-disabled":false,
      "generic-vnf.orchestration-status":"Created",
      "generic-vnf.prov-status":"PREPROV",
      "generic-vnf.resource-version":"value",
      "generic-vnf.service-id":"e8cb8968-5411-478b-906a-f28747de72cd",
      "generic-vnf.vnf-id":"63b31229-9a3a-444f-9159-04ce2dca3be9",
      "generic-vnf.vnf-name":"vCPEInfraVNF13",
      "generic-vnf.vnf-type":"vCPEInfraService10/vCPEInfraService10 0"
   },
   "closedLoopAlarmStart":1484855291527925,
   "closedLoopEventStatus":"ONSET",
   "closedLoopControlName":"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8",
   "version":"1.0.2",
   "target":"generic-vnf.vnf-id",
   "requestID":"8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc",
   "from":"DCAE"
}  


VES Event Flow enrichment case for VM


Code Block
titleVES Input
collapsetrue
       "event": {
              "commonEventHeader": {
                     "startEpochMicrosec": 1500584201765465,
                     "sourceId": "Dummy VM UUID - No Metadata available",
                     "eventId": "11",
                     "reportingEntityId": "No UUID available",
                     "internalHeaderFields": {
                           "collectorTimeStamp": "Thu, 07 20 2017 08:56:52 GMT"
                     },
                     "eventType": "HTTP request rate",
                     "priority": "Normal",
                     "version": 1.2,
                     "reportingEntityName": "vLB",
                     "sequence": 10,
                     "domain": "measurementsForVfScaling",
                     "lastEpochMicrosec": 1500584212017216,
                     "eventName": "vLoadBalancer",
                     "sourceName": "vserver-name-val-2"
              },
              "measurementsForVfScalingFields": {
                     "cpuUsageArray": [{
                           "percentUsage": 0,
                           "cpuIdentifier": "cpu1",
                           "cpuIdle": 100,
                           "cpuUsageSystem": 0,
                           "cpuUsageUser": 0
                     }],
                     "measurementInterval": 10,
                     "requestRate": 7832,
                     "vNicUsageArray": [{
                           "transmittedOctetsDelta": 5680,
                           "receivedTotalPacketsDelta": 14,
                           "vNicIdentifier": "eth0",
                           "valuesAreSuspect": "true",
                           "transmittedTotalPacketsDelta": 31,
                           "receivedOctetsDelta": 1332
                     }],
                     "measurementsForVfScalingVersion": 2.1
              }
       }
 }
Code Block
titleA&AI query and output sample
collapsetrue
Query-1
curl -k -X GET --user DCAE:DCAE -H "X-FromAppId: testUser" -H "X-TransactionId: testUserTrans" -H "Content-Type: application/json" -H "Accept: application/json" -H "Real-Time: true" "https://209.61.160.97:8443/aai/v11/search/nodes-query?search-node-type=vserver&filter=vserver-name:EQUALS:example-vserver-name-val-2" | python -m json.tool
{
    "result-data": [
        {
            "resource-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/DFW/tenants/tenant/1031120/vservers/vserver/example-vserver-id-val-2",
            "resource-type": "vserver"
        }
    ]
}
 
Query-2
$ curl -k -X GET --user DCAE:DCAE -H "X-FromAppId: testUser" -H "X-TransactionId: testUserTrans" -H "Content-Type: application/json" -H "Accept: application/json" -H "Real-Time: true" "https://209.61.160.97:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/DFW/tenants/tenant/1031120/vservers/vserver/example-vserver-id-val-2" | python -m json.tool
{
    "in-maint": true,
    "is-closed-loop-disabled": true,
    "prov-status": "example-prov-status-val-2",
    "resource-version": "1504912891060",
    "vserver-id": "example-vserver-id-val-2",
    "vserver-name": "example-vserver-name-val-2",
    "vserver-name2": "example-vserver-name2-val-2",
    "vserver-selflink": "example-vserver-selflink-val-2"
}

Code Block
titleCL Event Ouput
collapsetrue
{ 
       "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
       "policyVersion": "1.0.0.5",
       "policyName": "vLoadBalancer",
       "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
       "target_type": "VM",
       "AAI": { 
           "vserver.in-maint": true,
           "vserver.is-closed-loop-disabled": true,
           "vserver.prov-status": "example-prov-status-val-2",
           "vserver.resource-version": "1504912891060"
           "vserver.vserver-id": "example-vserver-id-val-2",
           "vserver.vserver-name": "example-vserver-name-val-2",
           "vserver.vserver-name2": "example-vserver-name2-val-2"
           "vserver.vserver-selflink": "example-vserver-selflink-val-2"
       
       },
       "closedLoopAlarmStart": 1484855291527925,
       "closedLoopEventStatus": "ONSET",
       "closedLoopControlName": "CL-LB-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8",
       "version": "1.0.2",
       "target": "generic-vnf.vnf-id",
       "requestID": "8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc",
       "from": "DCAE"
}


DCAE TCA design for Enrichment

 

Besides configuration for TCA processing, TCA configuration model will be enhanced to support following new configuration

    • RESTProxyHost, RESTProxyPor  (this will be defined part of TCA app_config to indicate A&AI host/port (or MSB host/port) to be used for enrichment. This value will be preset into blueprint for demo setup)
    • Configurable cache time (to avoid repeated A&AI query)
    • Per CL flow
      • controlLoopSchemaType = VM|VNF
      • closedLoopEventStatus= ONSET | ABATED

Enrichment flow (VM enrichment is stretch goal for R1)

    • When new CL condition is met
    • invoke A&AI to check vnf (generic-vnf object lookup)

If generic-vnf object lookup is successful

      • Set/override fields based on new CL structure and set target-type and AAI setting based on generic-vnf object

                If no match from A&AI – proceed to vm based check

    • Invoke A&AI to check vserver (involves two additional AAI API call 1) get vserver link 2) query vserver object)

If vserver object lookup is successful

      • Set/override fields based on new CL structure and set target-type and AAI setting based on vserver object

                If no match from A&AI – proceed to configuration model based setting.

    • Use configuration model identified “controlLoopSchemaType” to set CL event (structure as we have currently)

 


Reference

Policy - https://wiki.onap.org/display/DW/Control+Loop+Operational+Policy?focusedCommentId=10782165#comment-10782165

A&AI - https://wiki.onap.org/pages/viewpage.action?pageId=13598793