Versions Compared

Key

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

...

FieldR/OTypeDescription
ONAPNameRStringName of the ONAP component that is making the request.
ONAPInstanceOStringOptional instance identification for that ONAP component.
actionRString

The action that the ONAP component is performing on a resource.

eg. "configure" → DCAE uS onap.Monitoring policy Decisions to configure uS

"naming"

"placement"

"guard"

These sub metadata structures are used to refine which resource the ONAP component is performing an action upon.

At least one is required in order for Policy to return a Decision.

Multiple structures may be utilized to help refine a Decision.

policy-type-name


StringThe policy type name. This may be a regular expression.
policy-id
String

The policy id. This may be a regular expression or an exact value.














The simple draft This example below shows the JSON body of a query in which all the deployed policies for a specific policy type are returned.specify policy-id

Code Block
js
languagetitleDecision API Call - Policy ID
linenumberstrue
{
  "ONAPName": "DCAE",
  "ONAPInstance": "policy-handler-0",
  "action": "configure",
  "resource": [     {
      "policy-metadataid": {         "policy-type": "onap.policies.monitoring.cdap.tca.hi.lo.app"
   scaleout"
  }
    }
  ]
}

The query above gives a response similar to the example shown below.

Elite soft json viewer
{
    
}


Code Block
languagejs
titleDecision Response - Single Policy ID query
linenumberstrue
{
	"onap.scaleout.tca": {
    	    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
        	"version": "1.0.0",
	        "metadata": {
    	        "policy-id": "onap.scaleout.tca",
        	    "policy-version": 1
	        },
    	    "properties": {
        	    "domain": "measurementsForVfScaling",
        	}
	   "metricsPerEventName": [  }
}



The simple draft example below shows the JSON body of a query in which all the deployed policies for a specific policy type are returned.

Code Block
languagejs
linenumberstrue
{
  "ONAPName": "DCAE",
  "ONAPInstance": "policy-handler-0",
     {
  "action": "configure",
  "resource": {
     "policy-type": "onap.policies.monitoring.cdap.tca.hi.lo.app"
     }
}


The query above gives a response similar to the example shown below.

Code Block
languagejs
{
    "eventNamepolicies": "vLoadBalancer",[
      {
	      "onap.scaleout.tca": {
    	    "controlLoopSchemaTypetype": "VNFonap.policies.monitoring.cdap.tca.hi.lo.app",
                    "policyScope	"version": "resource=vLoadBalancer;type=configuration1.0.0",
	        "metadata": {
    	        "policyNamepolicy-id": "onap.scaleout.tca",
                	    "policyVersionpolicy-version": "v0.0.1",
	        },
    	       "thresholdsproperties": [{
        	    "domain": "measurementsForVfScaling"
				<OMITTED FOR BREVITY>
       { 	}
	      }
    	},
      {
  	      "closedLoopControlNameonap.firewall.tca": "CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A",{
      	                      "closedLoopEventStatus"type": "ONSETonap.policies.monitoring.cdap.tca.hi.lo.app",
                            	"version": "1.0.20",
	        "metadata": {
          	        "fieldPathpolicy-id": "$onap.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulatedfirewall.tca",
        	                    "thresholdValue"policy-version": 500,1
	        },
        	           "direction"properties": "LESS_OR_EQUAL",{
                   	         "severitydomain": "MAJORmeasurementsForVfScaling"
				<OMITTED FOR BREVITY>

        	}
	      }
    	},
                        {
                            "closedLoopControlName": "CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B",
                            "closedLoopEventStatus": "ONSET",
                            "version": "1.0.2",
                            "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
                            "thresholdValue": 5000,
                            "direction": "GREATER_OR_EQUAL",
                            "severity": "CRITICAL"
                        }
                    ]
                }
            ]
        }
    }
}

The  draft example below shows the JSON body of a query in which all possible query fields are specified. This is the most fine-grained query one can create.

Elite soft json viewer
{
  "pep": {
    "name": "DCAE",
    "instance": "policy-handler-0"
  },
  "action": "configure",
  "resource": [
    {
      "policy-metadata": {
        "policy-id": "onap.scaleout.tca",
        "policy-type": "onap.policies.monitoring.cdap.tca.hi.lo.app"
      }
    },
    {
      "service-metadata": {
        "model-invariant-id": "ebacca8b-9fb8-498a-8a2b-24757f5236a9",
        "model-version-id": "e9129f70-1657-4e6d-955c-2651aba4cc28",
        "name": "vLoadBalancerMS"
      }
    },
    {
      "resource-metadata": {
        "model-invariant-id": "20ad46cc-6b16-4404-9895-93d2baaa8d25",
        "model-version-id": "4f715117-08b9-4221-9d63-f3fa86919742",
        "name": "vLoadBalancerMS"
      }
    },
    {
      "controlloop-metadata": {
        "closedLoopControlName": "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8"
      }
    }
  ]
}
	]
}



The  draft example below shows the JSON body of a query in which all possible query fields are specified. This is the most fine-grained query one can create.

4. Policy Framework Internal APIs

...