Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changes per Alex and Vijay

...

FieldR/OTypeDescription
ONAPNameRStringName of the ONAP Project that is making the request.
ONAPComponentOStringName of the ONAP Project 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.













...

Code Block
titleDecision API Call - Policy ID
linenumberstrue
{
  "ONAPName": "DCAE",
  "ONAPComponent": "PolicyHandler",
  "ONAPInstance": "policy-handler-0UUID",
  "action": "configure",
  "resource": {
      "policy-id": "onap.scaleout"
  }
}

...

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



This example below shows the JSON body of a query for a multiple policy-id's

...

Code Block
titleDecision API Call - Policy ID
linenumberstrue
{
  "ONAPName": "DCAE",
  "ONAPInstance": "policy-handler-0",
  "action": "configure",
  "resource": {
      "policy-id": [
		"onap.vcpe.tca",
"action		"onap.modifyconfig",
		"onap.restart"
		]
  }
}




Code Block
languagejs
titleDecision Response - Single Policy ID query
linenumberstrue
{
	"policies": {
		"onap.vcpe.tca": {
			"type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
			"version": "configure1.0.0",
  "resource			"metadata": {
      				"policy-id": [ 		"onap.scaleoutvcpe.tca",
		"onap.modifyconfig",
		"onap.restart"
		]
  }
}
Code Block
languagejs
titleDecision Response - Single Policy ID query
linenumberstrue
{
    "policies": [
      {
	      "onap.scaleout.tca": {
    	    policy-version": 1
			},
			"properties": {
				"domain": "measurementsForVfScaling"
			}
		},
		"onap.modifyconfig": {
			"type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
        			"version": "1.0.0",
	        			"metadata": {
    	        				"policy-id": "onap.scaleout.tcamodifyconfig",
        	    				"policy-version": 1
	        			},
  
 	    			"properties": {
        	    				"domain": "measurementsForVfScaling"
				<OMITTED FOR BREVITY>
        	}
	      }
    	},
      {
	      		"onap.firewall.tcarestart": {
    	    			"type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
        			"version": "1.0.0",
	        			"metadata": {
    	        				"policy-id": "onap.firewall.tcarestart",
        	    				"policy-version": 1
	        			},
    	    			"properties": {
        	    				"domain": "measurementsForVfScaling"
				<OMITTED FOR BREVITY>

        	}
	      }
   }
		}
	}
	]
}



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.

...