Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 1 | .. This work is licensed under a |
| 2 | .. Creative Commons Attribution 4.0 International License. |
| 3 | .. http://creativecommons.org/licenses/by/4.0 |
| 4 | |
| 5 | .. _design-label: |
| 6 | |
| 7 | Policy Design and Development |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 8 | ############################# |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 9 | |
| 10 | .. contents:: |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 11 | :depth: 4 |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 12 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 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. |
liamfallon | c9e2790 | 2019-05-28 13:27:04 +0000 | [diff] [blame] | 16 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 17 | The figure below shows the Artifacts (Blue) in the ONAP Policy Framework, the Activities (Yellow) that manipulate them, |
| 18 | and important components (Salmon) that interact with them. The Policy Framework is fully TOSCA compliant, and uses |
| 19 | TOSCA to model policies. Please see the :ref:`TOSCA Policy Primer <tosca-label>` page for an introduction to TOSCA |
| 20 | policy concepts. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 21 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 22 | .. image:: images/APIsInPolicyFramework.svg |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 23 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 24 | TOSCA defines the concept of a *PolicyType*, the definition of a type of policy that can be applied to a service. It |
| 25 | also defines the concept of a *Policy*, an instance of a *PolicyType*. In the Policy Framework, we handle and manage |
| 26 | these TOSCA definitions and tie them to real implementations of policies that can run on PDPs. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 27 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 28 | The diagram above outlines how this is achieved. Each TOSCA *PolicyType* must have a corresponding *PolicyTypeImpl* in |
| 29 | the Policy Framework. The TOSCA *PolicyType* definition can be used to create a TOSCA *Policy* definition, either |
| 30 | directly by the Policy Framework, by CLAMP, or by some other system. Once the *Policy* artifact exists, it can be used |
| 31 | together with the *PolicyTypeImpl* artifact to create a *PolicyImpl* artifact. A *PolicyImpl* artifact is an executable |
| 32 | policy implementation that can run on a PDP. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 33 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 34 | The TOSCA *PolicyType* artifact defines the external characteristics of the policy; defining its properties, the types |
| 35 | of entities it acts on, and its triggers. A *PolicyTypeImpl* artifact is an XACML, Drools, or APEX implementation of |
| 36 | that policy definition. *PolicyType* and *PolicyTypeImpl* artifacts may be preloaded, may be loaded manually, or may be |
| 37 | created using the Lifecycle API. Alternatively, *PolicyType* definitions may be loaded over the Lifecycle API for |
| 38 | preloaded *PolicyTypeImpl* artifacts. A TOSCA *PolicyType* artifact can be used by clients (such as CLAMP or CLI tools) |
| 39 | to create, parse, serialize, and/or deserialize an actual Policy. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 40 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 41 | The TOSCA *Policy* artifact is used internally by the Policy Framework, or is input by CLAMP or other systems. This |
| 42 | artifact specifies the values of the properties for the policy and specifies the specific entities the policy acts on. |
| 43 | Policy Design uses the TOSCA *Policy* artifact and the *PolicyTypeImpl* artifact to create an executable *PolicyImpl* |
| 44 | artifact. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 45 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 46 | ONAP Policy Types |
| 47 | ================= |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 48 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 49 | Policy Type Design manages TOSCA *PolicyType* artifacts and their *PolicyTypeImpl* implementations. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 50 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 51 | A TOSCA *PolicyType* may ultimately be defined by the modeling team but for now are defined by the Policy Framework |
| 52 | project. Various editors and GUIs are available for creating *PolicyTypeImpl* implementations. However, systematic |
| 53 | integration of *PolicyTypeImpl* implementation is outside the scope of the ONAP Dublin release. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 54 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 55 | The *PolicyType* definitions and implementations listed below can be preloaded so that they are available for use in the |
| 56 | Policy Framework upon platform installation. For a full listing of available preloaded policy types, see the |
| 57 | :ref:`Policy API Preloaded Policy Type List <policy-preload-label>`. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 58 | |
Pamela Dragosh | 08cc842 | 2020-05-07 15:29:17 -0400 | [diff] [blame] | 59 | ============================================ =============================================================================== |
| 60 | **Base Policy Types** **Description** |
| 61 | ============================================ =============================================================================== |
| 62 | onap.policies.Monitoring Base model that supports Policy driven DCAE microservice components used |
| 63 | in Control Loops |
Pamela Dragosh | 08cc842 | 2020-05-07 15:29:17 -0400 | [diff] [blame] | 64 | onap.policies.controlloop.operational.Common Base Control Loop operational policy common definitions |
| 65 | onap.policies.controlloop.guard.Common Control Loop Guard Policy common definitions |
| 66 | onap.policies.Optimization Base OOF Optimization Policy Type definition |
| 67 | onap.policies.Naming Base SDNC Naming Policy Type definition |
| 68 | onap.policies.Native Base Native Policy Type for PDPs to inherit from in order to provide their own |
| 69 | native policy type. |
| 70 | ============================================ =============================================================================== |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 71 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 72 | .. note:: |
| 73 | The El Alto onap.policies.controlloop.Guard policy types were deprecated and removed in Frankfurt. |
| 74 | |
| 75 | 1 Base Policy Type: onap.policies.Monitoring |
| 76 | -------------------------------------------- |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 77 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 78 | This is a base Policy Type that supports Policy driven DCAE microservice components used in a Control Loops. The |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 79 | implementation of this Policy Type is done in the XACML PDP. The :ref:`Decision API <decision-api-label>` is used by the DCAE |
| 80 | Policy Handler to retrieve a decision on which policy to enforce during runtime. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 81 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 82 | .. code-block:: yaml |
| 83 | :caption: Base Policy Type definition for onap.policies.Monitoring |
| 84 | :linenos: |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 85 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 86 | tosca_definitions_version: tosca_simple_yaml_1_1_0 |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 87 | topology_template: |
| 88 | policy_types: |
| 89 | - onap.policies.Monitoring: |
| 90 | derived_from: tosca.policies.Root |
| 91 | version: 1.0.0 |
| 92 | description: a base policy type for all policies that govern monitoring provision |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 93 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 94 | The *PolicyTypeImpl* implementation of the *onap.policies.Montoring* Policy Type is generic to support definition of |
| 95 | TOSCA *PolicyType* artifacts in the Policy Framework using the Policy Type Design API. Therefore many TOSCA *PolicyType* |
| 96 | artifacts will use the same *PolicyTypeImpl* implementation with different property types and towards different targets. |
| 97 | This allows dynamically generated DCAE microservice component Policy Types to be created at Design Time. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 98 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 99 | Please be sure to name your Policy Type appropriately by prepending it with **onap.policies.monitoring.Custom**. |
| 100 | Notice the lowercase **m** for monitoring, which follows TOSCA conventions. And also notice the capitalized "C" for |
| 101 | your analytics policy type name. |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 102 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 103 | .. code-block:: yaml |
| 104 | :caption: Example PolicyType *onap.policies.monitoring.MyDCAEComponent* derived from *onap.policies.Monitoring* |
| 105 | :linenos: |
Pamela Dragosh | 5fc2fdb | 2019-05-17 09:42:27 -0400 | [diff] [blame] | 106 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 107 | tosca_definitions_version: tosca_simple_yaml_1_1_0 |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 108 | policy_types: |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 109 | - onap.policies.monitoring.Mycomponent: |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 110 | derived_from: onap.policies.Monitoring |
| 111 | version: 1.0.0 |
| 112 | properties: |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 113 | my_property_1: |
| 114 | type: string |
| 115 | description: A description of this property |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 116 | |
| 117 | For more examples of monitoring policy type definitions, please refer to the examples in the `ONAP policy-models gerrit |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 118 | repository <https://github.com/onap/policy-models/tree/master/models-examples/src/main/resources/policytypes>`__. Please |
| 119 | note that some of the examples do not adhere to TOSCA naming conventions due to backward compatibility. |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 120 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 121 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 122 | 2 Base Policy Type onap.policies.controlloop.operational.Common |
| 123 | --------------------------------------------------------------- |
| 124 | This is the new Operational Policy Type introduced in Frankfurt release to fully support TOSCA Policy Type. There are common |
| 125 | properties and datatypes that are independent of the PDP engine used to enforce this Policy Type. |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 126 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 127 | .. image:: images/Operational.svg |
| 128 | :alt: Operational Policy Type Inheritance |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 129 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 130 | 2.1 onap.policies.controlloop.operational.common.Drools |
| 131 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 132 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 133 | Drools PDP Control Loop Operational Policy definition extends the base common policy type by adding a property for **controllerName**. |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 134 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 135 | Please see the definition of the `Drools Operational Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.operational.common.Drools.yaml>`_ |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 136 | |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 137 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 138 | 2.2 onap.policies.controlloop.operational.common.Apex |
| 139 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 140 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 141 | Apex PDP Control Loop Operational Policy definition extends the base common policy type by adding additional properties. |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 142 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 143 | Please see the definition of the `Apex Operational Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.operational.common.Apex.yaml>`_ |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 144 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 145 | 3 Base Policy Type: onap.policies.controlloop.guard.Common |
| 146 | ---------------------------------------------------------- |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 147 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 148 | This base policy type is the the type definition for Control Loop guard policies for frequency limiting, blacklisting and |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 149 | min/max guards to help protect runtime Control Loop Actions from doing harm to the network. This policy type is |
| 150 | developed using the XACML PDP to support question/answer Policy Decisions during runtime for the Drools and APEX |
| 151 | onap.controlloop.Operational policy type implementations. |
| 152 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 153 | .. image:: images/Guard.svg |
| 154 | :alt: Guard Policy Type Inheritance |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 155 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 156 | Please see the definition of the `Common Guard Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.Common.yaml>`_ |
| 157 | |
| 158 | 3.1 Frequency Limiter Guard onap.policies.controlloop.guard.common.FrequencyLimiter |
| 159 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 160 | |
| 161 | The frequency limiter supports limiting the frequency of actions being taken by an Actor. |
| 162 | |
| 163 | Please see the definition of the `Guard Frequency Limiter Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml>`_ |
| 164 | |
| 165 | 3.2 Min/Max Guard onap.policies.controlloop.guard.common.MinMax |
| 166 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 167 | |
| 168 | The Min/Max Guard supports Min/Max number of entity for scaling operations. |
| 169 | |
| 170 | Please see the definition of the `Guard Min/Max Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.MinMax.yaml>`_ |
| 171 | |
| 172 | 3.3 Blacklist Guard onap.policies.controlloop.guard.common.Blacklist |
| 173 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 174 | |
| 175 | The Blacklist Guard Supports blacklisting control loop actions from being performed on specific entity id's. |
| 176 | |
| 177 | Please see the definition of the `Guard Blacklist Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml>`_ |
| 178 | |
Pamela Dragosh | cc6265e | 2020-08-21 10:53:44 -0400 | [diff] [blame] | 179 | 3.4 Filter Guard onap.policies.controlloop.guard.common.Filter |
| 180 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 181 | |
| 182 | The Filter Guard Supports filtering control loop actions from being performed on specific entity id's. |
| 183 | |
| 184 | Please see the definition of the `Guard Filter Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.Filter.yaml>`_ |
| 185 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 186 | 4 Optimization onap.policies.Optimization |
| 187 | ----------------------------------------- |
| 188 | |
| 189 | The Optimization Base Policy Type supports the OOF optimization policies. The Base policy Type has common properties shared |
| 190 | by all its derived policy types. |
| 191 | |
| 192 | .. image:: images/Optimization.svg |
| 193 | :alt: Optimization Policy Type Inheritance |
| 194 | |
| 195 | Please see the definition of the `Base Optimization Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.Optimization.yaml>`_. |
| 196 | |
| 197 | These Policy Types are unique in that some properties have an additional metadata property **matchable** set to **true** |
| 198 | which indicates that this property can be used to support more fine-grained Policy Decisions. For more information, |
| 199 | see the :ref:`XACML Optimization application implementation <xacml-optimization-label>`. |
| 200 | |
| 201 | 4.1 Optimization Service Policy Type onap.policies.optimization.Service |
| 202 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 203 | |
| 204 | This policy type further extends the base onap.policies.Optimization type by defining additional properties specific to |
| 205 | a service. For more information: |
| 206 | |
| 207 | `Service Optimization Base Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.Service.yaml>`_ |
| 208 | |
| 209 | Several additional policy types inherit from the Service Optimization Policy Type. For more information, :ref:`XACML Optimization |
| 210 | application implementation <xacml-optimization-label>`. |
| 211 | |
| 212 | 4.2 Optimization Resource Policy Type onap.policies.optimization.Resource |
| 213 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 214 | |
| 215 | This policy type further extends the base onap.policies.Optimization type by defining additional properties specific to |
| 216 | a resource. For more information: |
| 217 | |
| 218 | `Resource Optimization Base Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.Resource.yaml>`_ |
| 219 | |
| 220 | Several additional policy types inherit from the Resource Optimization Policy Type. For more information, :ref:`XACML Optimization |
| 221 | application implementation <xacml-optimization-label>`. |
| 222 | |
| 223 | 5 Naming onap.policies.Naming |
| 224 | ----------------------------- |
| 225 | |
| 226 | Naming policies are used in SDNC to enforce which naming policy should be used during instantiation. |
| 227 | |
| 228 | Policies of this type are composed using the `Naming Policy Type Model <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.Naming.yaml>`_. |
| 229 | |
| 230 | 6 Native Policy Types onap.policies.Native |
| 231 | ------------------------------------------ |
| 232 | |
| 233 | This is the Base Policy Type used by PDP engines to support their native language policies. PDP engines inherit from |
| 234 | this base policy type to implement support for their own custom policy type: |
| 235 | |
| 236 | .. code-block:: yaml |
| 237 | |
| 238 | tosca_definitions_version: tosca_simple_yaml_1_1_0 |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 239 | policy_types: |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 240 | onap.policies.Native: |
| 241 | derived_from: tosca.policies.Root |
| 242 | description: a base policy type for all native PDP policies |
| 243 | version: 1.0.0 |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 244 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 245 | 6.1 Policy Type: onap.policies.native.drools.Controller |
| 246 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
jhh | 89ba097 | 2020-04-13 12:51:32 -0500 | [diff] [blame] | 247 | |
| 248 | This policy type supports creation of native PDP-D controllers via policy. A controller is an abstraction on |
| 249 | the PDP-D that groups communication channels, message mapping rules, and |
| 250 | any other arbitrary configuration data to realize an application. |
| 251 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 252 | Policies of this type are composed using the |
jhh | 89ba097 | 2020-04-13 12:51:32 -0500 | [diff] [blame] | 253 | `onap.policies.native.drools.Controller policy type specification |
| 254 | <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.native.Drools.yaml>`__ specification. |
| 255 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 256 | 6.2 Policy Type: onap.policies.native.drools.Artifact |
| 257 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
jhh | 89ba097 | 2020-04-13 12:51:32 -0500 | [diff] [blame] | 258 | |
| 259 | This policy type supports the dynamic association of a native PDP-D controller with rules and dependent |
| 260 | java libraries. This policy type is used in conjuction with the onap.policies.native.drools.Controller |
| 261 | type to create or upgrade a drools application on a live PDP-D. |
| 262 | |
| 263 | Policies of this type are composed against the |
| 264 | `onap.policies.native.drools.Controller policy type specification |
| 265 | <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.native.Drools.yaml>`__ specification. |
| 266 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 267 | 6.3 Policy Type: onap.policies.native.Xacml |
| 268 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 269 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 270 | This policy type supports XACML OASIS 3.0 XML Policies. The policies are URL encoded in order to be easily transported via Lifecycle |
| 271 | API json and yaml Content-Types. When deployed to the XACML PDP (PDP-X), they will be managed by the **native** application. The PDP-X |
| 272 | will route XACML Request/Response RESTful API calls to the **native** application who manages those decisions. |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 273 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 274 | `XACML Native Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.native.Xacml.yaml>`_ |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 275 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 276 | 6.4 Policy Type: onap.policies.native.Apex |
| 277 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 278 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 279 | This policy type supports Apex native policy types. |
liamfallon | 4d1d983 | 2019-05-30 20:53:05 +0000 | [diff] [blame] | 280 | |
Pamela Dragosh | f65c8ff | 2020-04-29 08:23:12 -0400 | [diff] [blame] | 281 | `Apex Native Policy Type <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.native.Apex.yaml>`_ |