1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
7 Policy Design and Development
8 #############################
13 This document describes the design principles that should be used to write, deploy, and run policies of various types
14 using the Policy Framework. It explains the APIs that are available for Policy Framework users. It provides copious
15 examples to illustrate policy design and API usage.
20 The figure below shows the Artifacts (Blue) in the ONAP Policy Framework, the Activities (Yellow) that manipulate them,
21 and important components (Salmon) that interact with them. The Policy Framework is fully TOSCA compliant, and uses
22 TOSCA to model policies. Please see the :ref:`TOSCA Policy Primer <tosca-label>` page for an introduction to TOSCA
25 .. image:: images/APIsInPolicyFramework.svg
27 TOSCA defines the concept of a *PolicyType*, the definition of a type of policy that can be applied to a service. It
28 also defines the concept of a *Policy*, an instance of a *PolicyType*. In the Policy Framework, we handle and manage
29 these TOSCA definitions and tie them to real implementations of policies that can run on PDPs.
31 The diagram above outlines how this is achieved. Each TOSCA *PolicyType* must have a corresponding *PolicyTypeImpl* in
32 the Policy Framework. The TOSCA *PolicyType* definition can be used to create a TOSCA *Policy* definition, either
33 directly by the Policy Framework, by CLAMP, or by some other system. Once the *Policy* artifact exists, it can be used
34 together with the *PolicyTypeImpl* artifact to create a *PolicyImpl* artifact. A *PolicyImpl* artifact is an executable
35 policy implementation that can run on a PDP.
37 The TOSCA *PolicyType* artifact defines the external characteristics of the policy; defining its properties, the types
38 of entities it acts on, and its triggers. A *PolicyTypeImpl* artifact is an XACML, Drools, or APEX implementation of
39 that policy definition. *PolicyType* and *PolicyTypeImpl* artifacts may be preloaded, may be loaded manually, or may be
40 created using the Lifecycle API. Alternatively, *PolicyType* definitions may be loaded over the Lifecycle API for
41 preloaded *PolicyTypeImpl* artifacts. A TOSCA *PolicyType* artifact can be used by clients (such as CLAMP or CLI tools)
42 to create, parse, serialize, and/or deserialize an actual Policy.
44 The TOSCA *Policy* artifact is used internally by the Policy Framework, or is input by CLAMP or other systems. This
45 artifact specifies the values of the properties for the policy and specifies the specific entities the policy acts on.
46 Policy Design uses the TOSCA *Policy* artifact and the *PolicyTypeImpl* artifact to create an executable *PolicyImpl*
52 Policy Type Design manages TOSCA *PolicyType* artifacts and their *PolicyTypeImpl* implementations.
54 A TOSCA *PolicyType* may ultimately be defined by the modeling team but for now are defined by the Policy Framework
55 project. Various editors and GUIs are available for creating *PolicyTypeImpl* implementations. However, systematic
56 integration of *PolicyTypeImpl* implementation is outside the scope of the ONAP Dublin release.
58 The *PolicyType* definitions and implementations listed below are preloaded and are always available for use in the
61 ====================================== ===============================================================================
62 **Policy Type** **Description**
63 ====================================== ===============================================================================
64 onap.policies.Monitoring Overarching model that supports Policy driven DCAE microservice components used
66 onap.policies.controlloop.Operational Used to support actor/action operational policies for control loops
67 onap.policies.controlloop.Guard Control Loop guard policies for policing control loops
68 onap.policies.controlloop.Coordination Control Loop Coordination policies to assist in coordinating multiple control
70 ====================================== ===============================================================================
72 2.1 Policy Type: onap.policies.Monitoring
73 -----------------------------------------
75 This is a base Policy Type that supports Policy driven DCAE microservice components used in a Control Loops. The
76 implementation of this Policy Type is developed using the XACML PDP to support question/answer Policy Decisions during
77 runtime for the DCAE Policy Handler.
80 :caption: Base Policy Type definition for onap.policies.Monitoring
83 tosca_definitions_version: tosca_simple_yaml_1_0_0
86 - onap.policies.Monitoring:
87 derived_from: tosca.policies.Root
89 description: a base policy type for all policies that govern monitoring provision
91 The *PolicyTypeImpl* implementation of the *onap.policies.Montoring* Policy Type is generic to support definition of
92 TOSCA *PolicyType* artifacts in the Policy Framework using the Policy Type Design API. Therefore many TOSCA *PolicyType*
93 artifacts will use the same *PolicyTypeImpl* implementation with different property types and towards different targets.
94 This allows dynamically generated DCAE microservice component Policy Types to be created at Design Time.
96 DCAE microservice components can generate their own TOSCA *PolicyType* using TOSCA-Lab Control Loop guard policies in
97 SDC (Stretch Goal) or can do so manually. See `How to generate artefacts for SDC catalog using Tosca Lab Tool
98 <https://wiki.onap.org/display/DW/How+to+generate+artefacts+for+SDC+catalog+using+Tosca+Lab+Tool>`__
99 for details on TOSCA-LAB in SDC. For Dublin, the DCAE team is defining the manual steps required to build policy models
100 `Onboarding steps for DCAE MS through SDC/Policy/CLAMP (Dublin)
101 <https://wiki.onap.org/pages/viewpage.action?pageId=60883710>`__.
104 For Dublin, microservice Policy Types will be preloaded into the SDC platform and be available as a Normative. The
105 policy framework will preload support for those microservice Monitoring policy types.
108 :caption: Example PolicyType *onap.policies.monitoring.MyDCAEComponent* derived from *onap.policies.Monitoring*
111 tosca_definitions_version: tosca_simple_yaml_1_0_0
113 - onap.policies.Monitoring:
114 derived_from: tosca.policies.Root
116 description: a base policy type for all policies that govern monitoring provision
117 - onap.policies.monitoring.MyDCAEComponent:
118 derived_from: onap.policies.Monitoring
121 mydcaecomponent_policy:
123 description: The Policy Body I need
125 type: onap.datatypes.monitoring.mydatatype
128 - onap.datatypes.monitoring.MyDataType:
129 derived_from: tosca.datatypes.Root
133 description: A description of this property
139 For more examples of monitoring policy type definitions, please refer to the examples in the `ONAP policy-models gerrit
140 repository <https://github.com/onap/policy-models/tree/master/models-examples/src/main/resources/policytypes>`__.
142 2.2 Policy Type: onap.policies.controlloop.Operational
143 ------------------------------------------------------
145 This policy type is used to support actor/action operational policies for control loops. There are two types of
146 implementations for this policy type
148 1. Drools implementations that supports runtime Control Loop actions taken on components such as SO/APPC/VFC/SDNC/SDNR
149 2. Implementations using APEX to support Control Loops.
152 For Dublin, this policy type will ONLY be used for the Policy Framework to distinguish the policy type as operational.
155 :caption: Base Policy Type definition for onap.policies.controlloop.Operational
158 tosca_definitions_version: tosca_simple_yaml_1_0_0
160 - onap.policies.controlloop.Operational:
161 derived_from: tosca.policies.Root
163 description: Operational Policy for Control Loops
165 Applications should use the following Content-Type when creating onap.policies.controlloop.Operational policies:
168 Content-Type: "application/yaml"
170 2.2.1 Operational Policy Type Schema for Drools
171 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173 For Dublin Drools will still support the Casablanca YAML definition of an Operational Policy for Control Loops.
175 Please use the the `YAML Operational Policy format
176 <https://github.com/onap/policy-models/blob/master/models-interactions/model-yaml/README-v2.0.0.md>`__.
178 2.2.2 Operational Policy Type Schema for APEX
179 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181 The operational Policy Type schema for APEX extends the base operational Policy Type schema. This Policy Type allows
182 parameters specific to the APEX PDP to be specified as a TOSCA policy. See `this sample APEX policy type definition
183 <https://github.com/onap/integration-csit/blob/master/tests/policy/apex-pdp/data/onap.policies.controlloop.operational.Apex.json>`__.
185 2.3 Policy Type: onap.policies.controlloop.Guard
186 ------------------------------------------------
188 This policy type is the the type definition for Control Loop guard policies for frequency limiting, blacklisting and
189 min/max guards to help protect runtime Control Loop Actions from doing harm to the network. This policy type is
190 developed using the XACML PDP to support question/answer Policy Decisions during runtime for the Drools and APEX
191 onap.controlloop.Operational policy type implementations.
194 :caption: Base Policy Type definition for onap.policies.controlloop.Guard
197 tosca_definitions_version: tosca_simple_yaml_1_0_0
199 - onap.policies.controlloop.Guard:
200 derived_from: tosca.policies.Root
202 description: Guard Policy for Control Loops Operational Policies
204 As with the *onap.policies.Monitoring* policy type, the *PolicyTypeImpl* implementation of the
205 *onap.policies.controlloop.Guard* Policy Type is generic to support definition of TOSCA *PolicyType* artifacts in the
206 Policy Framework using the Policy Type Design API.
209 For Dublin, only the following derived Policy Type definitions below are preloaded in the Policy Framework. However,
210 the creation of policies will still support the payload from Casablanca.
212 Guard policy type definitions for *FrequencyLimiter*, *BlackList*, and *MinMax* are available in the `ONAP
213 policy-models gerrit repository
214 <https://github.com/onap/policy-models/tree/master/models-examples/src/main/resources/policytypes>`__.
216 3 PDP Deployment and Registration with PAP
217 ==========================================
219 The unit of execution and scaling in the Policy Framework is a *PolicyImpl* entity. A *PolicyImpl* entity runs on a PDP.
220 As is explained above, a *PolicyImpl* entity is a *PolicyTypeImpl* implementation parameterized with a TOSCA *Policy*.
222 .. image:: images/PolicyImplPDPSubGroup.svg
224 In order to achieve horizontal scalability, we group the PDPs running instances of a given *PolicyImpl* entity logically
225 together into a *PDPSubGroup*. The number of PDPs in a *PDPSubGroup* can then be scaled up and down using Kubernetes. In
226 other words, all PDPs in a subgroup run the same *PolicyImpl*, that is the same policy template implementation (in
227 XACML, Drools, or APEX) with the same parameters.
229 The figure above shows the layout of *PDPGroup* and *PDPSubGroup* entities. The figure shows examples of PDP groups for
230 Control Loop and Monitoring policies on the right.
232 The health of PDPs is monitored by the PAP in order to alert operations teams managing policy. The PAP manages the life
233 cycle of policies running on PDPs.
235 The table below shows the deployment methods in which *PolicyImpl* entities can be deployed to PDP Subgroups.
237 ========== =========================================== ============================== ==================================
238 **Method** **Description** **Advantages** **Disadvantages**
239 ========== =========================================== ============================== ==================================
240 Cold The *PolicyImpl* (*PolicyTypeImpl* and No run time configuration Very restrictive, no run time
241 TOSCA *Policy*) are predeployed on the PDP. required and run time configuration of PDPs is possible.
242 PDP is fully configured and ready to administration is simple.
243 execute when started.
245 PDPs register with the PAP when they
246 start, providing the *PolicyImpl* they
247 have been predeployed with.
249 Warm The *PolicyTypeImpl* entity is predeployed The configuration, parameters, Administration and management is
250 on the PDP. A TOSCA *Policy* may be loaded and PDP group of PDPs may be required. The configuration and
251 at startup. The PDP may be configured or changed at run time by loading life cycle of the TOSCA policies
252 reconfigured with a new or updated TOSCA or updating a TOSCA *Policy* can change at run time and must be
253 *Policy* at run time. into the PDP. administered and managed.
255 PDPs register with the PAP when they start, Support TOSCA *Policy* entity
256 providing the *PolicyImpl* they have been life cycle managgement is
257 predeployed with if any. The PAP may update supported, allowing features
258 the TOSCA *Policy* on a PDP at any time such as *PolicyImpl* Safe Mode
259 after registration. and *PolicyImpl* retirement.
261 Hot The *PolicyImpl* (*PolicyTypeImpl* and The policy logic, rules, Administration and management is
262 TOSCA *Policy*) are deployed at run time. configuration, parameters, and more complex. The *PolicyImpl*
263 The *PolicyImpl* (*PolicyTypeImpl* and PDP group of PDPs may be itself and its configuration and
264 TOSCA *Policy*) may be loaded at startup. changed at run time by loading life cycle as well as the life
265 The PDP may be configured or reconfigured or updating a TOSCA *Policy* cycle of the TOSCA policies can
266 with a new or updated *PolicyTypeImpl* and *PolicyTypeImpl* into the change at run time and must be
267 and/or TOSCA *Policy* at run time. PDP. administered and managed.
269 PDPs register with the PAP when they Lifecycle management of TOSCA
270 start, providing the *PolicyImpl* they have *Policy* entities and
271 been predeployed with if any. The PAP may *PolicyTypeImpl* entites is
272 update the TOSCA *Policy* and supported, allowing features
273 *PolicyTypeImpl* on a PDP at any time after such as *PolicyImpl* Safe Mode
274 registration and *PolicyImpl* retirement.
275 ========== =========================================== ============================== ==================================
277 4. Policy Framework Public APIs
278 ===============================
280 The Policy Framework provides the public APIs outline in the subsections below. For a full description of the APIs, see
281 their individual documentation linked in each subsection.
283 4.1 Policy Type Design API for TOSCA Policy Types
284 -------------------------------------------------
286 The full documentation for this API is available on the :ref:`Policy Life Cycle API <api-label>` page.
288 The purpose of this API is to support CRUD of TOSCA *PolicyType* entities. This API is provided by the
289 *PolicyDevelopment* component of the Policy Framework, see the :ref:`The ONAP Policy Framework Architecture
290 <architecture-label>` page.
292 The API allows applications to create, update, delete, and query *PolicyType* entities so that they become available for
293 use in ONAP by applications such as CLAMP. Some Policy Type entities are preloaded in the Policy Framework. The TOSCA
294 fields below are valid on API calls:
296 ============ ======= ======== ========== ===============================================================================
297 **Field** **GET** **POST** **DELETE** **Comment**
298 ============ ======= ======== ========== ===============================================================================
299 (name) M M M The definition of the reference to the Policy Type, GET allows ranges to be
301 version O M C GET allows ranges to be specified, must be specified if more than one version
302 of the Policy Type exists
303 description R O N/A Desciption of the Policy Type
304 derived_from R C N/A Must be specified when a Policy Type is derived from another Policy Type such
305 as in the case of derived Monitoring Policy Types
306 metadata R O N/A Metadata for the Policy Type
307 properties R M N/A This field holds the specification of the specific Policy Type in ONAP
308 targets R O N/A A list of node types and/or group types to which the Policy Type can be applied
309 triggers R O N/A Specification of policy triggers, not currently supported in ONAP
310 ============ ======= ======== ========== ===============================================================================
313 On this and subsequent tables, use the following legend: M-Mandatory, O-Optional, R-Read-only, C-Conditional.
314 Conditional means the field is mandatory when some other field is present.
317 Preloaded policy types may only be queried over this API, modification or deletion of preloaded policy type
318 implementations is disabled.
321 Policy types that are in use (referenced by defined Policies) may not be deleted.
324 The group types of targets in TOSCA are groups of TOSCA nodes, not PDP groups; the *target* concept in TOSCA is
325 equivalent to the Policy Enforcement Point (PEP) concept
327 4.2 Policy Design API
328 ---------------------
330 The full documentation for this API is available on the :ref:`Policy Life Cycle API <api-label>` page.
332 The purpose of this API is to support CRUD of TOSCA *Policy* entities from TOSCA compliant *PolicyType* definitions.
333 TOSCA *Policy* entities become the parameters for *PolicyTypeImpl* entities, producing *PolicyImpl* entities that can
334 run on PDPs. This API is provided by the *PolicyDevelopment* component of the Policy Framework, see the :ref:`The ONAP
335 Policy Framework Architecture <architecture-label>` page.
337 This API allows applications (such as CLAMP and Integration) to create, update, delete, and query *Policy* entities. The
338 TOSCA fields below are valid on API calls:
340 =========== ======= ======== ========== ================================================================================
341 **Field** **GET** **POST** **DELETE** **Comment**
342 =========== ======= ======== ========== ================================================================================
343 (name) M M M The definition of the reference to the Policy, GET allows ranges to be specified
344 type O M O The Policy Type of the policy, see section 3.1
347 properties R M N/A This field holds the specification of the specific Policy in ONAP
348 targets R O N/A A list of nodes and/or groups to which the Policy can be applied
349 =========== ======= ======== ========== ================================================================================
352 Policies that are deployed (used on deployed *PolicyImpl* entities) may not be deleted
355 This API is NOT used by DCAE for a decision on what policy the DCAE PolicyHandler should retrieve and enforce
358 The groups of targets in TOSCA are groups of TOSCA nodes, not PDP groups; the *target* concept in TOSCA is equivalent
359 to the Policy Enforcement Point (PEP) concept
361 4.3 Policy Administration API
362 -----------------------------
364 The full documentation for this API is available on the :ref:`Policy Administration Point (PAP) <pap-label>` page.
366 The purpose of this API is to support CRUD of PDP groups and subgroups and to support the deployment and life cycles of
367 *PolicyImpl* entities (TOSCA *Policy* and *PolicyTypeImpl* entities) on PDP sub groups and PDPs. This API is provided by
368 the *PolicyAdministration* component (PAP) of the Policy Framework, see the :ref:`The ONAP Policy Framework Architecture
369 <architecture-label>` page.
371 PDP groups and subgroups may be prefedined in the system. Predefined groups and subgroups can be modified or deleted
372 over this API. The policies running on predefined groups or subgroups as well as the desired instance counts and
373 properties can also be modified.
375 A PDP may be preconfigured with its PDP group, PDP subgroup, and policies. The PDP sends this information to the PAP
376 when it starts. If the PDP group, subgroup, or any policy is unknown to the PAP, the PAP locks the PDP in state PASSIVE.
378 The state of PDP groups is managed by the API. PDP groups can be in states PASSIVE, TEST, SAFE, or ACTIVE. For a full
379 description of PDP group states, the :ref:`The ONAP Policy Framework Architecture <architecture-label>` page.
381 The API supports retrieval of statistics for PDP groups, PDP subgroups, and individual PDPs. It also allows a PDP group
382 health check to be ordered on PDP groups and on individual PDPs.
384 The fields below are valid on API calls:
386 ============================ ======= ======== ========== ===============================================================
387 **Field** **GET** **POST** **DELETE** **Comment**
388 ============================ ======= ======== ========== ===============================================================
389 name M M M The name of the PDP group
390 version O M C The version of the PDP group
391 state R N/A N/A The administrative state of the PDP group: PASSIVE, SAFE, TEST,
393 description R O N/A The PDP group description
394 properties R O N/A Specific properties for a PDP group
395 pdp_subgroups R M N/A A list of PDP subgroups for a PDP group
396 ->pdp_type R M N/A The PDP type of this PDP subgroup, currently xacml, drools, or
398 ->supported_policy_types R N/A N/A A list of the policy types supported by the PDPs in this PDP
400 ->policies R M N/A The list of policies running on the PDPs in this PDP subgroup
401 ->->(name) R M N/A The name of a TOSCA policy running in this PDP subgroup
402 ->->policy_type R N/A N/A The TOSCA policy type of the policy
403 ->->policy_type_version R N/A N/A The version of the TOSCA policy type of the policy
404 ->->policy_type_impl R C N/A The policy type implementation (XACML, Drools Rules, or APEX
405 Model) that implements the policy
406 ->instance_count R N/A N/A The number of PDP instances running in a PDP subgroup
407 ->min_instance_count O N/A N/A The minumum number of PDP instances to run in a PDP subgroup
408 ->properties O N/A N/A Deployment configuration or other properties for the PDP
410 ->deployment_info R N/A N/A Information on the deployment for a PDP subgroup
411 ->instances R N/A N/A A list of PDP instances running in a PDP subgroup
412 ->->instance R N/A N/A The instance ID of a PDP running in a Kuberenetes Pod
413 ->->state R N/A N/A The administrative state of the PDP: PASSIVE, SAFE, TEST, or
415 ->->healthy R N/A N/A The result of the latest health check on the PDP:
416 HEALTHY/NOT_HEALTHY/TEST_IN_PROGRESS
417 ->->message O N/A N/A A status message for the PDP if any
418 ->->deployment_instance_info R N/A N/A Information on the node running the PDP
419 ============================ ======= ======== ========== ===============================================================
421 Note: In the Dublin release, the *policy_type_impl* of all policy types in a PDP subgroup must be the same.
423 4.4 Policy Decision API - Getting Policy Decisions
424 --------------------------------------------------
426 Policy decisions are required by ONAP components to support the policy-driven ONAP architecture. Policy Decisions are
427 implemented using the XACML PDP. The calling application must provide attributes in order for the XACML PDP to return a
430 Decision API queries are implemented with a POST operation with a JSON body that specifies the filter for the policies
433 *https:{url}:{port}/decision/v1/ POST*
435 The table below describes the fields in the JSON payload for the decision API Call.
437 ============= ======= ======== ==========================================================================
438 **Field** **R/O** **Type** **Description**
439 ============= ======= ======== ==========================================================================
440 ONAPName R String Name of the ONAP Project that is making the request.
441 ONAPComponent O String Name of the ONAP Project component that is making the request.
442 ONAPInstance O String Optional instance identification for that ONAP component.
443 action R String The action that the ONAP component is performing on a resource.
444 "configure" → DCAE uS onap.Monitoring policy Decisions to configure uS
448 ============= ======= ======== ==========================================================================
450 These sub metadata structures are used to scope the resource the ONAP component is performing an action upon. At least
451 one must be specified in order for Policy to return a decision. Multiple structures may be utilized to help define a
452 precise scope for a decision.
454 ================= ======= ======== ==================================================================
455 **Field** **R/O** **Type** **Description**
456 ================= ======= ======== ==================================================================
457 policy-type-name O String The policy type name. This may be a regular expression.
458 policy-id O String The policy id. This may be a regular expression or an exact value.
459 ================= ======= ======== ==================================================================
461 This example below shows the JSON body of a query with a single policy ID.
464 :caption: Decision API Call - Single Policy ID query
469 "ONAPComponent": "PolicyHandler",
470 "ONAPInstance": "622431a4-9dea-4eae-b443-3b2164639c64",
471 "action": "configure",
473 "policy-id": "onap.scaleout.tca"
478 :caption: Decision Response - Single Policy ID query
483 "onap.scaleout.tca": {
484 "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
487 "policy-id": "onap.scaleout.tca",
492 "domain": "measurementsForVfScaling",
493 "metricsPerEventName": [{
494 "eventName": "vLoadBalancer",
495 "controlLoopSchemaType": "VNF",
496 "policyScope": "type=configuration",
497 "policyName": "onap.scaleout.tca",
498 "policyVersion": "v0.0.1",
500 "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
501 "closedLoopEventStatus": "ONSET",
503 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]
504 .receivedBroadcastPacketsAccumulated",
505 "thresholdValue": 500,
506 "direction": "LESS_OR_EQUAL",
510 "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
511 "closedLoopEventStatus": "ONSET",
513 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]
514 .receivedBroadcastPacketsAccumulated",
515 "thresholdValue": 5000,
516 "direction": "GREATER_OR_EQUAL",
517 "severity": "CRITICAL"
526 This example below shows the JSON body of a query with multiple policy IDs.
529 :caption: Decision API Call - Multiple Policy IDs query
534 "ONAPComponent": "PolicyHandler",
535 "ONAPInstance": "622431a4-9dea-4eae-b443-3b2164639c64",
536 "action": "configure",
546 :caption: Decision Response - Multiple Policy IDs query
551 "onap.scaleout.tca": {
552 "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
555 "policy-id": "onap.scaleout.tca"
559 "domain": "measurementsForVfScaling",
560 "metricsPerEventName": [
562 "eventName": "vLoadBalancer",
563 "controlLoopSchemaType": "VNF",
564 "policyScope": "type=configuration",
565 "policyName": "onap.scaleout.tca",
566 "policyVersion": "v0.0.1",
569 "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
570 "closedLoopEventStatus": "ONSET",
572 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]
573 .receivedBroadcastPacketsAccumulated",
574 "thresholdValue": 500,
575 "direction": "LESS_OR_EQUAL",
579 "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
580 "closedLoopEventStatus": "ONSET",
582 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]
583 .receivedBroadcastPacketsAccumulated",
584 "thresholdValue": 5000,
585 "direction": "GREATER_OR_EQUAL",
586 "severity": "CRITICAL"
594 "onap.restart.tca": {
595 "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
598 "policy-id": "onap.restart.tca",
603 "domain": "measurementsForVfScaling",
604 "metricsPerEventName": [
606 "eventName": "Measurement_vGMUX",
607 "controlLoopSchemaType": "VNF",
608 "policyScope": "DCAE",
609 "policyName": "DCAE.Config_tca-hi-lo",
610 "policyVersion": "v0.0.1",
613 "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
615 "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*]
616 .arrayOfFields[0].value",
618 "direction": "EQUAL",
620 "closedLoopEventStatus": "ABATED"
623 "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
625 "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*]
626 .arrayOfFields[0].value",
628 "direction": "GREATER",
629 "severity": "CRITICAL",
630 "closedLoopEventStatus": "ONSET"
641 This example below shows the JSON body of a query to return all the deployed policies for a specific policy type.
644 :caption: Decision API Call - Policies for Policy Type query
649 "ONAPComponent": "PolicyHandler",
650 "ONAPInstance": "622431a4-9dea-4eae-b443-3b2164639c64",
651 "action": "configure",
653 "policy-type": "onap.policies.monitoring.cdap.tca.hi.lo.app"
658 :caption: Decision Response - Policies for Policy Type query
663 "onap.scaleout.tca": {
664 "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
667 "policy-id": "onap.scaleout.tca",
672 "domain": "measurementsForVfScaling",
673 "metricsPerEventName": [
675 "eventName": "vLoadBalancer",
676 "controlLoopSchemaType": "VNF",
677 "policyScope": "type=configuration",
678 "policyName": "onap.scaleout.tca",
679 "policyVersion": "v0.0.1",
682 "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
683 "closedLoopEventStatus": "ONSET",
685 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]
686 .receivedBroadcastPacketsAccumulated",
687 "thresholdValue": 500,
688 "direction": "LESS_OR_EQUAL",
692 "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
693 "closedLoopEventStatus": "ONSET",
695 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]
696 .receivedBroadcastPacketsAccumulated",
697 "thresholdValue": 5000,
698 "direction": "GREATER_OR_EQUAL",
699 "severity": "CRITICAL"
707 "onap.restart.tca": {
708 "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
711 "policy-id": "onap.restart.tca",
716 "domain": "measurementsForVfScaling",
717 "metricsPerEventName": [
719 "eventName": "Measurement_vGMUX",
720 "controlLoopSchemaType": "VNF",
721 "policyScope": "DCAE",
722 "policyName": "DCAE.Config_tca-hi-lo",
723 "policyVersion": "v0.0.1",
726 "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
728 "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0]
731 "direction": "EQUAL",
733 "closedLoopEventStatus": "ABATED"
736 "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
738 "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0]
741 "direction": "GREATER",
742 "severity": "CRITICAL",
743 "closedLoopEventStatus": "ONSET"
751 "onap.vfirewall.tca": {
752 "type": "onap.policy.monitoring.cdap.tca.hi.lo.app",
755 "policy-id": "onap.vfirewall.tca",
760 "domain": "measurementsForVfScaling",
761 "metricsPerEventName": [
763 "eventName": "vLoadBalancer",
764 "controlLoopSchemaType": "VNF",
765 "policyScope": "resource=vLoadBalancer;type=configuration",
766 "policyName": "onap.vfirewall.tca",
767 "policyVersion": "v0.0.1",
770 "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
771 "closedLoopEventStatus": "ONSET",
773 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]
774 .receivedBroadcastPacketsAccumulated",
775 "thresholdValue": 500,
776 "direction": "LESS_OR_EQUAL",
780 "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
781 "closedLoopEventStatus": "ONSET",
783 "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*]
784 .receivedBroadcastPacketsAccumulated",
785 "thresholdValue": 5000,
786 "direction": "GREATER_OR_EQUAL",
787 "severity": "CRITICAL"