-The full documentation for this API is available on the :ref:`Policy Administration Point (PAP) <pap-label>` page.
-
-The purpose of this API is to support CRUD of PDP groups and subgroups and to support the deployment and life cycles of
-*PolicyImpl* entities (TOSCA *Policy* and *PolicyTypeImpl* entities) on PDP sub groups and PDPs. This API is provided by
-the *PolicyAdministration* component (PAP) of the Policy Framework, see the :ref:`The ONAP Policy Framework Architecture
-<architecture-label>` page.
-
-PDP groups and subgroups may be prefedined in the system. Predefined groups and subgroups can be modified or deleted
-over this API. The policies running on predefined groups or subgroups as well as the desired instance counts and
-properties can also be modified.
-
-A PDP may be preconfigured with its PDP group, PDP subgroup, and policies. The PDP sends this information to the PAP
-when it starts. If the PDP group, subgroup, or any policy is unknown to the PAP, the PAP locks the PDP in state PASSIVE.
-
-The state of PDP groups is managed by the API. PDP groups can be in states PASSIVE, TEST, SAFE, or ACTIVE. For a full
-description of PDP group states, the :ref:`The ONAP Policy Framework Architecture <architecture-label>` page.
-
-The API supports retrieval of statistics for PDP groups, PDP subgroups, and individual PDPs. It also allows a PDP group
-health check to be ordered on PDP groups and on individual PDPs.
-
-The fields below are valid on API calls:
-
-============================ ======= ======== ========== ===============================================================
-**Field** **GET** **POST** **DELETE** **Comment**
-============================ ======= ======== ========== ===============================================================
-name M M M The name of the PDP group
-version O M C The version of the PDP group
-state R N/A N/A The administrative state of the PDP group: PASSIVE, SAFE, TEST,
- or ACTIVE
-description R O N/A The PDP group description
-properties R O N/A Specific properties for a PDP group
-pdp_subgroups R M N/A A list of PDP subgroups for a PDP group
-->pdp_type R M N/A The PDP type of this PDP subgroup, currently xacml, drools, or
- apex
-->supported_policy_types R N/A N/A A list of the policy types supported by the PDPs in this PDP
- subgroup. A trailing “.*” can be used to specify multiple
- policy types; for example, “onap.policies.monitoring.*”
- would match any policy type beginning with
- “onap.policies.monitoring.”
-->policies R M N/A The list of policies running on the PDPs in this PDP subgroup
-->->(name) R M N/A The name of a TOSCA policy running in this PDP subgroup
-->->policy_type R N/A N/A The TOSCA policy type of the policy
-->->policy_type_version R N/A N/A The version of the TOSCA policy type of the policy
-->->policy_type_impl R C N/A The policy type implementation (XACML, Drools Rules, or APEX
- Model) that implements the policy
-->instance_count R N/A N/A The number of PDP instances running in a PDP subgroup
-->min_instance_count O N/A N/A The minumum number of PDP instances to run in a PDP subgroup
-->properties O N/A N/A Deployment configuration or other properties for the PDP
- subgroup
-->deployment_info R N/A N/A Information on the deployment for a PDP subgroup
-->instances R N/A N/A A list of PDP instances running in a PDP subgroup
-->->instance R N/A N/A The instance ID of a PDP running in a Kuberenetes Pod
-->->state R N/A N/A The administrative state of the PDP: PASSIVE, SAFE, TEST, or
- ACTIVE
-->->healthy R N/A N/A The result of the latest health check on the PDP:
- HEALTHY/NOT_HEALTHY/TEST_IN_PROGRESS
-->->message O N/A N/A A status message for the PDP if any
-->->deployment_instance_info R N/A N/A Information on the node running the PDP
-============================ ======= ======== ========== ===============================================================
-
-Note: In the Dublin release, the *policy_type_impl* of all policy types in a PDP subgroup must be the same.
-
-4.4 Policy Decision API - Getting Policy Decisions
---------------------------------------------------
-
-Policy decisions are required by ONAP components to support the policy-driven ONAP architecture. Policy Decisions are
-implemented using the XACML PDP. The calling application must provide attributes in order for the XACML PDP to return a
-correct decision.
-
-Decision API queries are implemented with a POST operation with a JSON body that specifies the filter for the policies
-to be returned.
-
-*https:{url}:{port}/decision/v1/ POST*
-
-The table below describes the fields in the JSON payload for the decision API Call.
-
-============= ======= ======== ==========================================================================
-**Field** **R/O** **Type** **Description**
-============= ======= ======== ==========================================================================
-ONAPName R String Name of the ONAP Project that is making the request.
-ONAPComponent O String Name of the ONAP Project component that is making the request.
-ONAPInstance O String Optional instance identification for that ONAP component.
-action R String The action that the ONAP component is performing on a resource.
- "configure" → DCAE uS onap.Monitoring policy Decisions to configure uS
- "naming"
- "placement"
- "guard"
-============= ======= ======== ==========================================================================
-
-These sub metadata structures are used to scope the resource the ONAP component is performing an action upon. At least
-one must be specified in order for Policy to return a decision. Multiple structures may be utilized to help define a
-precise scope for a decision.
-
-4.4.1 Policy Decision API - DCAE configuration examples
--------------------------------------------------------
-
-These resource fields are examples on how DCAE implements its "configure" application to make Decision API calls.
-
-================= ======= ======== ==================================================================
-**Field** **R/O** **Type** **Description**
-================= ======= ======== ==================================================================
-policy-type-name O String The policy type name. This may be a regular expression.
-policy-id O String The policy id. This may be a regular expression or an exact value.
-================= ======= ======== ==================================================================
-
-This example below shows the JSON body of a query with a single policy ID.
-
-.. code-block:: yaml
- :caption: Decision API Call - Single Policy ID query
- :linenos:
-
- {
- "ONAPName": "DCAE",
- "ONAPComponent": "PolicyHandler",
- "ONAPInstance": "622431a4-9dea-4eae-b443-3b2164639c64",
- "action": "configure",
- "resource": {
- "policy-id": "onap.scaleout.tca"
- }
- }
-
-.. code-block:: yaml
- :caption: Decision Response - Single Policy ID query
- :linenos:
-
- {
- "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"
- }]
- }]
- }
- }
- }
- }
- }