Versions Compared

Key

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

...

This operation allows the PDP groups and subgroups to be created and deployed together with their policies. A POST operation is used to create a new PDP group name or a new PDP group version. A POST operation is also used to update an existing PDP group, but the PDP group must be in state PASSIVE or the operation is rejected. Many PDP groups can be created or updated in a single POST operation by specifying more than one PDP group in the POST operation body.

...

Code Block
languageyml
titlePOST body to deploy or update PDP groups
collapsetrue
pdp_groups:
  - name: onap.pdpgroup.controlloop.operational
    version: 1.0.0
    description: ONAP Control Loop Operational and Guard policies
    pdp_subgroups:
      - pdp_type: drools
          policies:
            - onap.controllloop.operational.drools.vcpe.EastRegion
            - onap.controllloop.operational.drools.vfw.EastRegion
          min_instance_count: 3group
          properties:
            # The properties below are for illustration only
            instance_spawn_load_threshold: 70%
            instance_kill_load_threshold: 50%
            instance_geo_redundancy: true

      - pdp_type: apex
          policies:
            - onap.controllloop.operational.apex.bbs.EastRegion
            - onap.controllloop.operational.apex.sampledomain.EastRegion
          min_instance_count: 2
          properties:
            # The properties below are for illustration only
            instance_spawn_load_threshold: 80%
            instance_kill_load_threshold: 60%
            instance_geo_redundancy: true

      - pdp_type: xacml
          policies:
            - onap.policies.controlloop.guard.frequencylimiter.EastRegion
            - onap.policies.controlloop.guard.blacklist.EastRegion
            - onap.policies.controlloop.guard.minmax.EastRegion
          min_instance_count: 2
          properties:
            # The properties below are for illustration only
            instance_geo_redundancy: true

  - name: onap.pdpgroup.monitoring
    version: 2.1.3
    description: DCAE mS Configuration Policies
    properties:
      # PDP group level properties if any
    pdp_subgroups:
      - pdp_type: xacml
          policies:
            - onap.scaleout.tca
          min_instance_count: 2
          properties:
            # The properties below are for illustration only
            instance_geo_redundancy: true

...

Code Block
languageyml
titlePOST body to deploy or update PDP groups
collapsetrue
pdp_groups:
  - name: onap.pdpgroup.Monitoring
  
 version: 2.1.3     description: DCAE mS Configuration Policies
    pdp_subgroups:
      - pdp_type: xacml
          policies:
            - onap.scaleout.tca

...

Simple API for CLAMP to push one or more policy-id's with optional policy-version field.

https:{url}:{port}/policy/pap/v1/pdps/policies POST ???

Content-Type: application/json; HERE OR NOT???

Code Block
{
  "policies" : [
    {
      "policy-id": "onap.scaleout.tca",
      "policy-version": 1
    },
    {
      "policy-id": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
    },
    {
      "policy-id": "guard.frequency.ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
    },
    {
      "policy-id": "guard.minmax.ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
    }
    ]
}


HTTP status code indicates success or failure.{

Code Block
	"errorDetails": "some error message"


REsponse

...

}

Simple API for CLAMP to undeploy a policy-id with optional policy-version.

https:{url}:{port}/policy/pap/v1/pdps/policies{policy-id} DELETE

https:{url}:{port}/policy/pap/v1/pdps/policies{policy-id}/versions/{policy-version} DELETE


HTTP status code indicates success or failure.

Code Block
{
	"errorDetails": "some error message"
}



3.3.3 PDP Group Delete

The API also allows PDP groups to be deleted with a DELETE operation. DELETE operations are only permitted on PDP groups in PASSIVE state. In cases where more than one version of a PDP group exist, the version parameter must be specified on the DELETE operation. The format of the delete operation is as below:

https:{url}:{port}/policy/pap/v1/pdps/groups/onap.pdpgroup.monitoring /versions/2.1.3 DELETE

3.3.4 PDP Group State Management

...

https:{url}:{port}/policy/pap/v1/pdps/groups/name=onap.pdpgroup.monitoring/versions/2.1.3&state=active

There are a number of rules for state management:

...

ExampleDescription

https:{url}:{port}/policy/pap/v1/pdps/statistics

Get statistics for all PDP Groups and subgroups in the system
https:{url}:{port}/policy/pap/v1/pdps/groups/onap.pdpgroup.controlloop/statistics
Get statistics for all PDP Groups and subgroups that match the supplied name filter

https:{url}:{port}/policy/pap/v1/pdps/groups/onap.pdpgroup.monitoring/versions/2.1.3/statistics

Get statistics for all the PDP group with the specified name and version

https:{url}:{port}/policy/pap/v1/pdps/groups/onap.pdpgroup.monitoring/subgroups/xacml/statistics

Get statistics for the specified subgroup



...

ExampleDescription

https:{url}:{port}/policy/pap/v1/pdps/healthcheck PUT

Order a health check on all PDP Groups and subgroups in the system
https:{url}:{port}/policy/pap/v1/pdps/groups/onap.pdpgroup.controlloop/healthcheck PUT
Order a health check on all PDP Groups and subgroups that match the supplied name filter

https:{url}:{port}/policy/pap/v1/pdps/groups/onap.pdpgroup.monitoring/versions/2.1.3/healthcheck PUT

Order a health check on all the PDP group with the specified name and version

https:{url}:{port}/policy/pap/v1/pdps/groups/onap.pdpgroup.monitoring/subgroups/xacml/healthcheck PUT

Order a health check on the specified subgroup



3.4 Policy Decision API - Getting Policy Decisions

...

Code Block
languagejs
{
	"policies": {
		"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": {
				"tca_policy": {
					"domain": "measurementsForVfScaling",
					"metricsPerEventName": [
						{
							"eventName": "vLoadBalancer",
							"controlLoopSchemaType": "VNF",
							"policyScope": "type=configuration",
							"policyName": "onap.scaleout.tca",
							"policyVersion": "v0.0.1",
							"thresholds": [
								{
									"closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
									"closedLoopEventStatus": "ONSET",
									"version": "1.0.2",
									"fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
									"thresholdValue": 500,
									"direction": "LESS_OR_EQUAL",
									"severity": "MAJOR"
								},
								{
									"closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
									"closedLoopEventStatus": "ONSET",
									"version": "1.0.2",
									"fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
									"thresholdValue": 5000,
									"direction": "GREATER_OR_EQUAL",
									"severity": "CRITICAL"
								}
							]
						}
					]
				}
			}
		},
		"onap.restart.tca": {
			"type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
			"version": "1.0.0",
			"metadata": {
				"policy-id": "onap.restart.tca",
				"policy-version": 1
			},
			"properties": {
				"tca_policy": {
					"domain": "measurementsForVfScaling",
					"metricsPerEventName": [
						{
							"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"
								}
							]
						}
					]
				}
			}
		},
		"onap.vfirewall.tca": {
			"type": "onap.policy.monitoring.cdap.tca.hi.lo.app",
			"version": "1.0.0",
			"metadata": {
				"policy-id": "onap.vfirewall.tca",
				"policy-version": 1
			},
			"properties": {
				"tca_policy": {
					"domain": "measurementsForVfScaling",
					"metricsPerEventName": [
						{
							"eventName": "vLoadBalancer",
							"controlLoopSchemaType": "VNF",
							"policyScope": "resource=vLoadBalancer;type=configuration",
							"policyName": "onap.vfirewall.tca",
							"policyVersion": "v0.0.1",
							"thresholds": [
								{
									"closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
									"closedLoopEventStatus": "ONSET",
									"version": "1.0.2",
									"fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
									"thresholdValue": 500,
									"direction": "LESS_OR_EQUAL",
									"severity": "MAJOR"
								},
								{
									"closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
									"closedLoopEventStatus": "ONSET",
									"version": "1.0.2",
									"fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
									"thresholdValue": 5000,
									"direction": "GREATER_OR_EQUAL",
									"severity": "CRITICAL"
								}
							]
						}
					]
				}
			}
		}
	}
}

...