diff options
Diffstat (limited to 'docs')
73 files changed, 7783 insertions, 994 deletions
diff --git a/docs/apex/APEX-DecisionMakerExample.rst b/docs/apex/APEX-DecisionMakerExample.rst new file mode 100644 index 00000000..9bd6a564 --- /dev/null +++ b/docs/apex/APEX-DecisionMakerExample.rst @@ -0,0 +1,107 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +.. _apex-DecisionMakerExample: + +APEX Examples Decision Maker +**************************** + + .. container:: sectionbody + + Click on the link to find the contents of each file to generate the Decision Maker Example. + + .. container:: ulist + + - |apexConfigRESTClient_link| + - |apexConfigRESTServer_link| + - |answerInitiationEvent_link| + - |makeDecision_Client_link| + - |makeDecision_Server_link| + - |makeDecisionExtraMode_Client_link| + - |makeDecisionExtraMode_Server_link| + + - APEX Model (Policies) + + - |answerInitTask_link| + - |ditheringAnswerTask_link| + - |makeDecisionStateTSL_link| + - |optimisticAnswerTask_link| + - |pessimisticAnswerTask_link| + - |randomAnswerTask_link| + - |roundRobinAnswerTask_link| + + + .. container:: + :name: footer-text + + 2.3.0-SNAPSHOT + Last updated 2020-04-08 16:04:24 IST + +.. |File > New to create a new Policy Model| image:: images/mfp/MyFirstPolicy_P1_newPolicyModel1.png +.. |Create a new Policy Model| image:: images/mfp/MyFirstPolicy_P1_newPolicyModel2.png +.. |ONAP| image:: ../../../images/logos.png + :class: builtBy + :target: http://www.onap.org/ +.. |apexConfigRESTClient_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/examples/config/DecisionMaker/ApexConfigRESTClient.json" target="_blank">APEX Configuration: Rest Client</a> +.. |apexConfigRESTServer_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/examples/config/DecisionMaker/ApexConfigRESTServer.json" target="_blank">APEX Configuration: Rest Server</a> + +.. |answerInitiationEvent_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/examples/config/DecisionMaker/AnswerInitiationEvent.json" target="_blank">Initiation Event</a> + +.. |makeDecision_Client_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/examples/html/DecisionMaker/MakeDecision_Client.html" target="_blank">HTML Client</a> + +.. |makeDecision_Server_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/examples/html/DecisionMaker/MakeDecision_Server.html" target="_blank">HTML Server</a> + +.. |makeDecisionExtraMode_Client_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/examples/html/DecisionMaker/MakeDecisionExtraMode_Client.html" target="_blank">HTML Client: Extra Mode</a> + +.. |makeDecisionExtraMode_Server_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/examples/html/DecisionMaker/MakeDecisionExtraMode_Server.html" target="_blank">HTML Server: Extra Mode</a> + +.. |apexConfigRESTServer_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/examples/config/DecisionMaker/ApexConfigRESTServer.json" target="_blank">APEX Configuration: Rest Server</a> + +.. |answerInitTask_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/logic/AnswerInitTask.js" target="_blank">Task Logic: Answer Init</a> + +.. |ditheringAnswerTask_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/logic/DitheringAnswerTask.js" target="_blank">Task Logic: Dithering Answer</a> + +.. |makeDecisionStateTSL_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/logic/MakeDecisionStateTSL.js" target="_blank">Task Selection Logic: Make Decision State</a> + +.. |optimisticAnswerTask_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/logic/OptimisticAnswerTask.js" target="_blank">Task Logic: Optimistic Answer</a> + +.. |pessimisticAnswerTask_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/logic/PessimisticAnswerTask.js" target="_blank">Task Logic: Pessimistic Answer</a> + +.. |randomAnswerTask_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/logic/RandomAnswerTask.js" target="_blank">Task Logic: Random Answer</a> + +.. |roundRobinAnswerTask_link| raw:: html + + <a href="https://github.com/onap/policy-apex-pdp/blob/master/examples/examples-decisionmaker/src/main/resources/logic/RoundRobinAnswerTask.js" target="_blank">Task Logic: RoundRobin Answer</a> + + + + + diff --git a/docs/apex/APEX-MyFirstPolicyExample.rst b/docs/apex/APEX-MyFirstPolicyExample.rst new file mode 100644 index 00000000..52991add --- /dev/null +++ b/docs/apex/APEX-MyFirstPolicyExample.rst @@ -0,0 +1,2268 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +.. _apex-myFirstExample: + +HowTo: My First Policy +********************** + +.. contents:: + :depth: 3 + +Introduction +^^^^^^^^^^^^ + + .. container:: sectionbody + + .. container:: paragraph + + Consider a scenario where a supermarket chain called + *HyperM* controls how it sells items in a policy-based + manner. Each time an item is processed by *HyperM*'s + point-of-sale (PoS) system an event is generated and + published about that item of stock being sold. This + event can then be used to update stock levels, etc.. + + .. container:: paragraph + + *HyperM* want to extend this approach to allow some + checks to be performed before the sale can be + completed. This can be achieved by requesting a + policy-controlled decision as each item is processed + by for sale by each PoS system. The decision process + is integrated with *HyperM*'s other IT systems that + manage stock control, sourcing and purchasing, + personnel systems, etc. + + .. container:: paragraph + + In this document we will show how APEX and APEX + Policies can be used to achieve this, starting with a + simple policy, building up to more complicated policy + that demonstrates the features of APEX. + +Data Models +^^^^^^^^^^^ + + .. container:: sectionbody + + .. container:: sect2 + + .. rubric:: Sales Decision Event + :name: sales_decision_event + + .. container:: paragraph + + Each time a PoS system processes a sales item an + event with the following format is emitted: + + .. table:: Table 1. Sale Input Event + + +----------------------+----------------------+-----------------------+ + | Event | Fields | Description | + +======================+======================+=======================+ + | SALE_INPUT | time, sale_ID, | Event indicating a | + | | amount, item_ID, | sale of an item is | + | | quantity, | occurring | + | | assistant_ID, | | + | | branch_ID, notes, … | | + +----------------------+----------------------+-----------------------+ + + .. container:: paragraph + + In each ``SALE_INPUT`` event the ``sale_ID`` field + is a unique ID generated by the PoS system. A + timestamp for the event is stored in the ``time`` + field. The ``amount`` field refers to the value of + the item(s) to be sold (in cents). The ``item_ID`` + field is a unique identifier for each item type, + and can be used to retrieve more information about + the item from *HyperM*'s stock control system. The + ``quantity`` field refers to the quantity of the + item to be sold. The ``assistant_ID`` field is a + unique identifier for the PoS operator, and can be + used to retrieve more information about the + operator from the *HyperM*'s personnel system. + Since *HyperM* has many branches the ``branch_ID`` + identifies the shop. The ``notes`` field contains + arbitrary notes about the sale. + + .. container:: sect2 + + .. rubric:: Sales Decision Event + :name: sales_decision_event + + .. container:: paragraph + + After a ``SALE_INPUT`` event is emitted by the PoS + system *HyperM*'s policy-based controlled sales + checking system emits a Sale Authorization Event + indicating whether the sale is authorized or + denied. The PoS system can then listen for this + event before continuing with the sale. + + .. table:: Table 2. Sale Authorisation Event + + +----------------------+----------------------+-----------------------+ + | Event | Fields | Description | + +======================+======================+=======================+ + | SALE_AUTH | sale_ID, time, | Event indicating a | + | | authorized, amount, | sale of an item is | + | | item_ID, quantity, | authorized or denied | + | | assistant_ID, | | + | | branch_ID, notes, | | + | | message… | | + +----------------------+----------------------+-----------------------+ + + .. container:: paragraph + + In each ``SALE_AUTH`` event the ``sale_ID`` field + is copied from the ``SALE_INPUT`` event that + trigger the decision request. The ``SALE_AUTH`` + event is also timestamped using the ``time`` field, + and a field called ``authorised`` is set to + ``true`` or ``false`` depending on whether the sale + is authorized or denied. The ``message`` field + carries an optional message about why a sale was + not authorized. The other fields from the + ``SALE_INPUT`` event are also included for + completeness. + + .. container:: sect2 + + .. rubric:: Stock Control: Items + :name: stock_control_items + + .. container:: paragraph + + *HyperM* maintains information about each item for + sale in a database table called ``ITEMS``. + + .. table:: Table 3. Items Database + + +----------------------+----------------------+-----------------------+ + | Table | Fields | Description | + +======================+======================+=======================+ + | ITEMS | item_ID, | Database table | + | | description, | describing each item | + | | cost_price, barcode, | for sale | + | | supplier_ID, | | + | | category, … | | + +----------------------+----------------------+-----------------------+ + + .. container:: paragraph + + The database table ``ITEMS`` has a row for each + items that *HyperM* sells. Each item is identified + by an ``item_ID`` value. The ``description`` field + stores a description of the item. The cost price of + the item is given in ``cost_price``. The barcode of + the item is encoded in ``barcode``, while the item + supplier is identified by ``supplier_ID``. Items + may also be classified into categories using the + ``category`` field. Useful categories might + include: ``soft drinks``, ``alcoholic drinks``, + ``cigarettes``, ``knives``, ``confectionery``, + ``bakery``, ``fruit&vegetables``, ``meat``, etc.. + + .. container:: sect2 + + .. rubric:: Personnel System: Assistants + :name: personnel_system_assistants + + .. table:: Table 4. Assistants Database + + +----------------------+----------------------+-----------------------+ + | Table | Fields | Description | + +======================+======================+=======================+ + | ASSISTANTS | assistant_ID, | Database table | + | | surname, firstname, | describing each | + | | middlename, age, | *HyperM* sales | + | | grade, phone_number, | assistant | + | | … | | + +----------------------+----------------------+-----------------------+ + + .. container:: paragraph + + The database table ``ASSISTANTS`` has a row for + each sales assistant employed by *HyperM*. Each + assistant is identified by an ``assistant_ID`` + value, with their name given in the ``firstname``, + ``middlename`` and ``surname`` fields. The + assistant’s age in years is given in ``age``, while + their phone number is contained in the + ``phone_number`` field. The assistant’s grade is + encoded in ``grade``. Useful values for ``grade`` + might include: ``trainee``, ``operator``, + ``supervisor``, etc.. + + .. container:: sect2 + + .. rubric:: Locations: Branches + :name: locations_branches + + .. table:: Table 5. Branches Database + + +----------------------+----------------------+-----------------------+ + | Table | Fields | Description | + +======================+======================+=======================+ + | BRANCHES | branch_ID, | Database table | + | | branch_Name, | describing each | + | | category, street, | *HyperM* branch | + | | city, country, | | + | | postcode, … | | + +----------------------+----------------------+-----------------------+ + + .. container:: paragraph + + *HyperM* operates a number of branches. Each branch + is described in the ``BRANCHES`` database table. + Each branch is identified by a ``branch_ID``, with + a branch name given in ``branch_Name``. The address + for the branch is encoded in ``street``, ``city``, + ``country`` and ``postcode``. The branch category + is given in the ``category`` field. Useful values + for ``category`` might include: ``Small``, + ``Large``, ``Super``, ``Hyper``, etc.. + + +Policy Step 1 +^^^^^^^^^^^^^ + + .. container:: sectionbody + + .. container:: sect1 + + .. rubric:: Scenario + :name: scenario + + .. container:: paragraph + + For the first version of our policy, let’s start + with something simple. Let us assume that there + exists some restriction that alcohol products + cannot be sold before 11:30am. In this section we + will go through the necessary steps to define a + policy that can enforce this for *HyperM*. + + .. container:: ulist + + - Alcohol cannot be sold before 11:30am... container:: + +New Policy Model +---------------- + + .. container:: sectionbody + + .. container:: sect1 + + .. rubric:: Create the an new empty Policy Model ``MyFirstPolicyModel`` + :name: create_the_an_new_empty_policy_model_code_myfirstpolicymodel_code + + .. container:: paragraph + + Since an organisation like *HyperM* may have many + policies covering many different domains, policies should + be grouped into policy sets. In order to edit or deploy a + policy, or policy set, the definition of the policy(ies) + and all required events, tasks, states, etc., are grouped + together into a 'Policy Model'. An organization might + define many Policy Models, each containing a different + set of policies. + + .. container:: paragraph + + So the first step is to create a new empty Policy Model + called ``MyFirstPolicyModel``. Using the APEX Policy + Editor, click on the 'File' menus and select 'New'. Then + define our new policy model called + ``MyFirstPolicyModel``. Use the 'Generate UUID' button to + create a new unique ID for the policy model, and fill in + a description for the policy model. Press the ``Submit`` + button to save your changes. + + .. container:: imageblock + + .. container:: content + + |File > New to create a new Policy Model| + + .. container:: imageblock + + .. container:: content + + |Create a new Policy Model| + +Events +------ + + .. container:: sectionbody + + .. container:: sect1 + + .. rubric:: Create the input event ``SALE_INPUT`` and the + output event ``SALE_AUTH`` + :name: create_the_input_event_code_sale_input_code_and_the_output_event_code_sale_auth_code + + .. container:: paragraph + + Using the APEX Policy Editor, click on the 'Events' tab. + In the 'Events' pane, right click and select 'New': + + .. container:: imageblock + + .. container:: content + + |Right click to create a new event| + + .. container:: paragraph + + Create a new event type called ``SALE_INPUT``. Use the + 'Generate UUID' button to create a new unique ID for the + event type, and fill in a description for the event. Add + a namespace, e.g. ``com.hyperm``. We can add hard-coded + strings for the ``Source`` and ``Target``, e.g. ``POS`` + and ``APEX``. At this stage we will not add any parameter + fields, we will leave this until later. Use the + ``Submit`` button to create the event. + + .. container:: imageblock + + .. container:: content + + |Fill in the necessary information for the + 'SALE_INPUT' event and click 'Submit'| + + .. container:: paragraph + + Repeat the same steps for a new event type called + ``SALE_AUTH``. Just use ``APEX`` as source and ``POS`` as + target, since this is the output event coming from APEX + going to the sales point. + + .. container:: paragraph + + Before we can add parameter fields to an event we must + first define APEX Context Item Schemas that can be used + by those fields. + + .. container:: paragraph + + To create new item schemas, click on the 'Context Item + Schemas' tab. In that 'Context Item Schemas' pane, right + click and select 'Create new ContextSchema'. + + .. container:: imageblock + + .. container:: content + + |Right click to create a new Item Schema| + + .. container:: paragraph + + Create item schemas with the following characteristics, + each with its own unique UUID: + + .. table:: Table 1. Item Schemas + + +-----------------+-----------------+-----------------+-----------------+ + | Name | Schema Flavour | Schema | Description | + | | | Definition | | + +=================+=================+=================+=================+ + | timestamp_type | Java | java.lang.Long | A type for | + | | | | ``time`` values | + +-----------------+-----------------+-----------------+-----------------+ + | sale_ID_type | Java | java.lang.Long | A type for | + | | | | ``sale_ID`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + | price_type | Java | java.lang.Long | A type for | + | | | | ``amo | + | | | | unt``/``price`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + | item_ID_type | Java | java.lang.Long | A type for | + | | | | ``item_ID`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + | as | Java | java.lang.Long | A type for | + | sistant_ID_type | | | ` | + | | | | `assistant_ID`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + | quantity_type | Java | ja | A type for | + | | | va.lang.Integer | ``quantity`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + | branch_ID_type | Java | java.lang.Long | A type for | + | | | | ``branch_ID`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + | notes_type | Java | j | A type for | + | | | ava.lang.String | ``notes`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + | authorised_type | Java | ja | A type for | + | | | va.lang.Boolean | ``authorised`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + | message_type | Java | j | A type for | + | | | ava.lang.String | ``message`` | + | | | | values | + +-----------------+-----------------+-----------------+-----------------+ + + .. container:: imageblock + + .. container:: content + + |Create a new Item Schema| + + .. container:: paragraph + + The item schemas can now be seen on the 'Context Item + Schemas' tab, and can be updated at any time by + right-clicking on the item schemas on the 'Context Item + Schemas' tab. Now we can go back to the event definitions + for ``SALE_INPUT`` and ``SALE_AUTH`` and add some + parameter fields. + + .. container:: admonitionblock tip + + .. TIP:: + + .. container:: paragraph + + APEX natively supports schema definitions in ``Java`` and ``Avro``. + ``Java`` schema definitions are simply the name of a Java Class. There are some restrictions: + + .. container:: ulist + + - the class must be instantiatable, i.e. not an Java interface or abstract class + + - primitive types are not supported, i.e. use ``java.lang.Integer`` instead of ``int``, etc. + + - it must be possible to find the class, i.e. the class must be contained in the Java classpath. + + .. container:: paragraph + + ``Avro`` schema definitions can be any valid `Avro <https://avro.apac + he.org/docs/current/spec.html>`__ schema. For events using fields defined with + Avro schemas, any incoming event containing that field must contain a value that conforms to the Avro schema. + + .. container:: paragraph + + Click on the 'Events' tab, then right click the + ``SALE_INPUT`` row and select 'Edit Event + :literal:`SALE_INPUT’. To add a new event parameter use the 'Add Event Parameter' button at the bottom of the screen. For the `SALE_INPUT` + event add the following event parameters: + + .. table:: Table 2. Event Parameter Fields for the ``SALE_INPUT`` Event + + +----------------------+----------------------+-----------------------+ + | Parameter Name | Parameter Type | Optional | + +======================+======================+=======================+ + | time | timestamp_type | no | + +----------------------+----------------------+-----------------------+ + | sale_ID | sale_ID_type | no | + +----------------------+----------------------+-----------------------+ + | amount | price_type | no | + +----------------------+----------------------+-----------------------+ + | item_ID | item_ID_type | no | + +----------------------+----------------------+-----------------------+ + | quantity | quantity_type | no | + +----------------------+----------------------+-----------------------+ + | assistant_ID | assistant_ID_type | no | + +----------------------+----------------------+-----------------------+ + | branch_ID | branch_ID_type | no | + +----------------------+----------------------+-----------------------+ + | notes | notes_type | *yes* | + +----------------------+----------------------+-----------------------+ + + .. container:: paragraph + + Remember to click the 'Submit' button at the bottom of + the event definition pane. + + .. container:: admonitionblock tip + + .. TIP:: + + .. container:: paragraph + + Parameter fields can be *optional* in events. If a parameter is not marked as + *optional* then by default it is *mandatory*, so it must appear in any input event + passed to APEX. If an *optional* field is not set for an output event then value + will be set to ``null``. + + .. container:: imageblock + + .. container:: content + + |Add new event parameters to an event| + + .. container:: paragraph + + Select the ``SALE_AUTH`` event and add the following + event parameters: + + .. table:: Table 3. Event Parameter Fields for the ``SALE_AUTH`` Event + + +----------------------+----------------------+-----------------------+ + | Parameter Name | Parameter Type | no | + +======================+======================+=======================+ + | sale_ID | sale_ID_type | no | + +----------------------+----------------------+-----------------------+ + | time | timestamp_type | no | + +----------------------+----------------------+-----------------------+ + | authorised | authorised_type | no | + +----------------------+----------------------+-----------------------+ + | message | message_type | *yes* | + +----------------------+----------------------+-----------------------+ + | amount | price_type | no | + +----------------------+----------------------+-----------------------+ + | item_ID | item_ID_type | no | + +----------------------+----------------------+-----------------------+ + | assistant_ID | assistant_ID_type | no | + +----------------------+----------------------+-----------------------+ + | quantity | quantity_type | no | + +----------------------+----------------------+-----------------------+ + | branch_ID | branch_ID_type | no | + +----------------------+----------------------+-----------------------+ + | notes | notes_type | *yes* | + +----------------------+----------------------+-----------------------+ + + .. container:: paragraph + + Remember to click the 'Submit' button at the bottom of + the event definition pane. + + .. container:: paragraph + + The events for our policy are now defined. + +New Policy +---------- + + .. container:: sectionbody + + .. container:: sect1 + + .. rubric:: Create a new Policy and add the *"No Booze + before 11:30"* check + :name: create_a_new_policy_and_add_the_em_no_booze_before_11_30_em_check + + .. container:: paragraph + + APEX policies are defined using a state-machine model. + Each policy comprises one or more *states* that can be + individually executed. Where there is more than one + *state* the states are chained together to form a + `Directed Acyclic Graph + (DAG) <https://en.wikipedia.org/wiki/Directed_acyclic_graph>`__ + of states. A *state* is triggered by passing it a single + input (or 'trigger') event and once executed each state + then emits an output event. For each *state* the logic + for the *state* is embedded in one or more *tasks*. Each + *task* contains specific *task logic* that is executed by + the APEX execution environment each time the *task* is + invoked. Where there is more than one *task* in a *state* + then the *state* also defines some *task selection logic* + to select an appropriate task each time the *state* is + executed. + + .. container:: paragraph + + Therefore, to create a new policy we must first define + one or more tasks. + + .. container:: paragraph + + To create a new Task click on the 'Tasks' tab. In the + 'Tasks' pane, right click and select 'Create new Task'. + Create a new Task called ``MorningBoozeCheck``. Use the + 'Generate UUID' button to create a new unique ID for the + task, and fill in a description for the task. + + .. container:: imageblock + + .. container:: content + + |Right click to create a new task| + + .. container:: paragraph + + Tasks are configured with a set of *input fields* and a + set of *output fields*. To add new input/output fields + for a task use the 'Add Task Input Field' and 'Add Task + Output Field' button. The list of input and out fields to + add for the ``MorningBoozeCheck`` task are given below. + The input fields are drawn from the parameters in the + state’s input event, and the task’s output fields are + used to populate the state’s output event. The task’s + input and output fields must be a subset of the event + parameters defined for the input and output events for + any state that uses that task. (You may have noticed that + the input and output fields for the ``MorningBoozeCheck`` + task have the exact same names and reuse the item schemas + that we used for the parameters in the ``SALE_INPUT`` and + ``SALE_AUTH`` events respectively). + + .. table:: Table 1. Input fields for ``MorningBoozeCheck`` task + + +-----------------------------------+-----------------------------------+ + | Parameter Name | Parameter Type | + +===================================+===================================+ + | time | timestamp_type | + +-----------------------------------+-----------------------------------+ + | sale_ID | sale_ID_type | + +-----------------------------------+-----------------------------------+ + | amount | price_type | + +-----------------------------------+-----------------------------------+ + | item_ID | item_ID_type | + +-----------------------------------+-----------------------------------+ + | quantity | quantity_type | + +-----------------------------------+-----------------------------------+ + | assistant_ID | assistant_ID_type | + +-----------------------------------+-----------------------------------+ + | branch_ID | branch_ID_type | + +-----------------------------------+-----------------------------------+ + | notes | notes_type | + +-----------------------------------+-----------------------------------+ + + .. table:: Table 2. Output fields for ``MorningBoozeCheck`` task + + +-----------------------------------+-----------------------------------+ + | Parameter Name | Parameter Type | + +===================================+===================================+ + | sale_ID | sale_ID_type | + +-----------------------------------+-----------------------------------+ + | time | timestamp_type | + +-----------------------------------+-----------------------------------+ + | authorised | authorised_type | + +-----------------------------------+-----------------------------------+ + | message | message_type | + +-----------------------------------+-----------------------------------+ + | amount | price_type | + +-----------------------------------+-----------------------------------+ + | item_ID | item_ID_type | + +-----------------------------------+-----------------------------------+ + | assistant_ID | assistant_ID_type | + +-----------------------------------+-----------------------------------+ + | quantity | quantity_type | + +-----------------------------------+-----------------------------------+ + | branch_ID | branch_ID_type | + +-----------------------------------+-----------------------------------+ + | notes | notes_type | + +-----------------------------------+-----------------------------------+ + + .. container:: imageblock + + .. container:: content + + |Add input and out fields for the task| + + .. container:: paragraph + + Each task must include some 'Task Logic' that implements + the behaviour for the task. Task logic can be defined in + a number of different ways using a choice of languages. + For this task we will author the logic using the + Java-like scripting language called + ```MVEL`` <https://en.wikipedia.org/wiki/MVEL>`__. + + .. container:: paragraph + + For simplicity use the following code for the task logic. + Paste the script text into the 'Task Logic' box, and use + "MVEL" as the 'Task Logic Type / Flavour'. + + .. container:: paragraph + + This logic assumes that all items with ``item_ID`` + between 1000 and 2000 contain alcohol, which is not very + realistic, but we will see a better approach for this + later. It also uses the standard ``Java`` time utilities + to check if the current time is between ``00:00:00 GMT`` + and ``11:30:00 GMT``. For a detailed guide to how to + write your own logic in + ```JavaScript`` <https://en.wikipedia.org/wiki/JavaScript>`__, + ```MVEL`` <https://en.wikipedia.org/wiki/MVEL>`__ or one + of the other supported languages please refer to APEX + Programmers Guide. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + import java.util.Date; + import java.util.Calendar; + import java.util.TimeZone; + import java.text.SimpleDateFormat; + + logger.info("Task Execution: '"+subject.id+"'. Input Fields: '"+inFields+"'"); + + outFields.put("amount" , inFields.get("amount")); + outFields.put("assistant_ID", inFields.get("assistant_ID")); + outFields.put("notes" , inFields.get("notes")); + outFields.put("quantity" , inFields.get("quantity")); + outFields.put("branch_ID" , inFields.get("branch_ID")); + outFields.put("item_ID" , inFields.get("item_ID")); + outFields.put("time" , inFields.get("time")); + outFields.put("sale_ID" , inFields.get("sale_ID")); + + item_id = inFields.get("item_ID"); + + //The events used later to test this task use GMT timezone! + gmt = TimeZone.getTimeZone("GMT"); + timenow = Calendar.getInstance(gmt); + df = new SimpleDateFormat("HH:mm:ss z"); + df.setTimeZone(gmt); + timenow.setTimeInMillis(inFields.get("time")); + + midnight = timenow.clone(); + midnight.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),0,0,0); + eleven30 = timenow.clone(); + eleven30.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),11,30,0); + + itemisalcohol = false; + if(item_id != null && item_id >=1000 && item_id < 2000) + itemisalcohol = true; + + if( itemisalcohol + && timenow.after(midnight) && timenow.before(eleven30)){ + outFields.put("authorised", false); + outFields.put("message", "Sale not authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())+ + ". Alcohol can not be sold between "+df.format(midnight.getTime())+ + " and "+df.format(eleven30.getTime())); + return true; + } + else{ + outFields.put("authorised", true); + outFields.put("message", "Sale authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())); + return true; + } + + /* + This task checks if a sale request is for an item that is an alcoholic drink. + If the local time is between 00:00:00 GMT and 11:30:00 GMT then the sale is not + authorised. Otherwise the sale is authorised. + In this implementation we assume that items with item_ID value between 1000 and + 2000 are all alcoholic drinks :-) + */ + + .. container:: imageblock + + .. container:: content + + |Add task logic the task| + + .. container:: paragraph + + An alternative version of the same logic is available in + JavaScript. Just use "JAVASCRIPT" as the 'Task Logic Type + / Flavour' instead. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + + // Load compatibility script for imports etc + load("nashorn:mozilla_compat.js"); + importPackage(java.text); + importClass(java.text.SimpleDateFormat); + + executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'"); + + executor.outFields.put("amount" , executor.inFields.get("amount")); + executor.outFields.put("assistant_ID", executor.inFields.get("assistant_ID")); + executor.outFields.put("notes" , executor.inFields.get("notes")); + executor.outFields.put("quantity" , executor.inFields.get("quantity")); + executor.outFields.put("branch_ID" , executor.inFields.get("branch_ID")); + executor.outFields.put("item_ID" , executor.inFields.get("item_ID")); + executor.outFields.put("time" , executor.inFields.get("time")); + executor.outFields.put("sale_ID" , executor.inFields.get("sale_ID")); + + item_id = executor.inFields.get("item_ID"); + + //All times in this script are in GMT/UTC since the policy and events assume time is in GMT. + var timenow_gmt = new Date(Number(executor.inFields.get("time"))); + + var midnight_gmt = new Date(Number(executor.inFields.get("time"))); + midnight_gmt.setUTCHours(0,0,0,0); + + var eleven30_gmt = new Date(Number(executor.inFields.get("time"))); + eleven30_gmt.setUTCHours(11,30,0,0); + + var timeformatter = new java.text.SimpleDateFormat("HH:mm:ss z"); + + var itemisalcohol = false; + if(item_id != null && item_id >=1000 && item_id < 2000) + itemisalcohol = true; + + if( itemisalcohol + && timenow_gmt.getTime() >= midnight_gmt.getTime() + && timenow_gmt.getTime() < eleven30_gmt.getTime()) { + + executor.outFields.put("authorised", false); + executor.outFields.put("message", "Sale not authorised by policy task " + + executor.subject.taskName+ " for time " + timeformatter.format(timenow_gmt.getTime()) + + ". Alcohol can not be sold between " + timeformatter.format(midnight_gmt.getTime()) + + " and " + timeformatter.format(eleven30_gmt.getTime())); + } + else{ + executor.outFields.put("authorised", true); + executor.outFields.put("message", "Sale authorised by policy task " + + executor.subject.taskName + " for time "+timeformatter.format(timenow_gmt.getTime())); + } + + /* + This task checks if a sale request is for an item that is an alcoholic drink. + If the local time is between 00:00:00 GMT and 11:30:00 GMT then the sale is not + authorised. Otherwise the sale is authorised. + In this implementation we assume that items with item_ID value between 1000 and + 2000 are all alcoholic drinks :-) + */ + + .. container:: paragraph + + The task definition is now complete so click the 'Submit' + button to save the task. The task can now be seen on the + 'Tasks' tab, and can be updated at any time by + right-clicking on the task on the 'Task' tab. Now that we + have created our task, we can can create a policy that + uses that task. + + .. container:: paragraph + + To create a new Policy click on the 'Policies' tab. In + the 'Policies' pane, right click and select 'Create new + Policy': + + .. container:: paragraph + + Create a new Policy called ``MyFirstPolicy``. Use the + 'Generate UUID' button to create a new unique ID for the + policy, and fill in a description for the policy. Use + 'FREEFORM' as the 'Policy Flavour'. + + .. container:: paragraph + + Each policy must have at least one state. Since this is + 'freeform' policy we can add as many states as we wish. + Let’s start with one state. Add a new state called + ``BoozeAuthDecide`` to this ``MyFirstPolicy`` policy + using the 'Add new State' button after filling in the + name of our new state. + + .. container:: imageblock + + .. container:: content + + |Create a new policy| + + .. container:: paragraph + + Each state must uses one input event type. For this new + state select the ``SALE_INPUT`` event as the input event. + + .. container:: paragraph + + Each policy must define a 'First State' and a 'Policy + Trigger Event'. The 'Policy Trigger Event' is the input + event for the policy as a whole. This event is then + passed to the first state in the chain of states in the + policy, therefore the 'Policy Trigger Event' will be the + input event for the first state. Each policy can only + have one 'First State'. For our ``MyFirstPolicy`` policy, + select ``BoozeAuthDecide`` as the 'First State'. This + will automatically select ``SALE_INPUT`` as the 'Policy + Trigger Event' for our policy. + + .. container:: imageblock + + .. container:: content + + |Create a state| + + .. container:: paragraph + + In this case we will create a reference the pre-existing + ``MorningBoozeCheck`` task that we defined above using + the 'Add New Task' button. Select the + ``MorningBoozeCheck`` task, and use the name of the task + as the 'Local Name' for the task. + + .. container:: paragraph + + in the case where a state references more than one task, + a 'Default Task' must be selected for the state and some + logic ('Task Selection Logic') must be specified to + select the appropriate task at execution time. Since our + new state ``BoozeAuthDecide`` only has one task the + default task is automatically selected and no 'Task + Selection Logic' is required. + + .. container:: admonitionblock note + + .. NOTE:: + + .. container:: paragraph + In a 'Policy' 'State' a 'State Output Mapping' has 3 roles: 1) Select which 'State' + should be executed next, 2) Select the type of the state’s 'Outgoing Event', and + 3) Populate the state’s 'Outgoing Event'. This is how states are chained together + to form a (`Directed Acyclic Graph (DAG) <https://en.wikipedia.org/wiki/Directed_acyclic_graph>`__) + of states. The final state(s) of a policy are those that do not select any 'next' + state. Since a 'State' can only accept a single type of event, the type of the + event emitted by a previous 'State' must match the incoming event type of the next + 'State'. This is also how the last state(s) in a policy can emit events of + different types. The 'State Output Mapping' is also responsible for taking the + fields that are output by the task executed in the state and populating the + state’s output populating the state’s output event before it is emitted. + + Each 'Task' referenced in 'State' must have a defined 'Output Mapping' to take the output of the task, select an 'Outgoing Event' type for the state, populate the state's outgoing event, and then select the next state to be executed (if any). + + There are 2 basic types of output mappings: + + .. container:: olist arabic + + #. **Direct Output Mappings** have a single value for 'Next State' and a single value for 'State Output Event'. The outgoing event for the state is automatically created, any outgoing event parameters that were present in the incoming event are copied into the outgoing event, then any task output fields that have the same name and type as parameters in the outgoing event are automatically copied into the outgoing event. + #. **Logic-Based State Output Mappings / Finalizers** have some logic defined that dynamically selects and creates the 'State Outgoing Event', manages the population of the outgoing event parameters (perhaps changing or adding to the outputs from the task), and then dynamically selects the next state to be executed (if any). + + .. container:: paragraph + + Each task reference must also have an associated 'Output + State Mapping' so we need an 'Output State Mapping' for + the ``BoozeAuthDecide`` state to use when the + ``MorningBoozeCheck`` task is executed. The simplest type + of output mapping is a 'Direct Output Mapping'. + + .. container:: paragraph + + Create a new 'Direct Output Mapping' for the state called + ``MorningBoozeCheck_Output_Direct`` using the 'Add New + Direct State Output Mapping' button. Select ``SALE_AUTH`` + as the output event and select ``None`` for the next + state value. We can then select this output mapping for + use when the the ``MorningBoozeCheck`` task is executed. + Since there is only state, and only one task for that + state, this output mapping ensures that the + ``BoozeAuthDecide`` state is the only state executed and + the state (and the policy) can only emit events of type + ``SALE_AUTH``. (You may remember that the output fields + for the ``MorningBoozeCheck`` task have the exact same + names and reuse the item schemas that we used for the + parameters in ``SALE_AUTH`` event. The + ``MorningBoozeCheck_Output_Direct`` direct output mapping + can now automatically copy the values from the + ``MorningBoozeCheck`` task directly into outgoing + ``SALE_AUTH`` events.) + + .. container:: imageblock + + .. container:: content + + |Add a Task and Output Mapping| + + .. container:: paragraph + + Click the 'Submit' button to complete the definition of + our ``MyFirstPolicy`` policy. The policy + ``MyFirstPolicy`` can now be seen in the list of policies + on the 'Policies' tab, and can be updated at any time by + right-clicking on the policy on the 'Policies' tab. + + .. container:: paragraph + + The ``MyFirstPolicyModel``, including our + ``MyFirstPolicy`` policy can now be checked for errors. + Click on the 'Model' menu and select 'Validate'. The + model should validate without any 'Warning' or 'Error' + messages. If you see any 'Error' or 'Warning' messages, + carefully read the message as a hint to find where you + might have made a mistake when defining some aspect of + your policy model. + + .. container:: imageblock + + .. container:: content + + |Validate the policy model for error using the 'Model' + > 'Validate' menu item| + + .. container:: paragraph + + Congratulations, you have now completed your first APEX + policy. The policy model containing our new policy can + now be exported from the editor and saved. Click on the + 'File' menu and select 'Download' to save the policy + model in JSON format. The exported policy model is then + available in the directory you selected, for instance + ``$APEX_HOME/examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.json``. + The exported policy can now be loaded into the APEX + Policy Engine, or can be re-loaded and edited by the APEX + Policy Editor. + + .. container:: imageblock + + .. container:: content + + |Download the completed policy model using the 'File' + > 'Download' menu item| + +Test The Policy +--------------- + + .. container:: sectionbody + + .. container:: sect1 + + .. rubric:: Test Policy Step 1 + :name: test_policy_step_1 + + .. container:: paragraph + + To start a new APEX Engine you can use the following + configuration. In a full APEX installation you can find + this configuration in + ``$APEX_HOME/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigStdin2StdoutJsonEvent.json``. + This configuration expects incoming events to be in + ``JSON`` format and to be passed into the APEX Engine + from ``stdin``, and result events will be printed in + ``JSON`` format to ``stdout``. This configuration loads + the policy model stored in the file + 'MyFirstPolicyModel_0.0.1.json' as exported from the APEX + Editor. Note, you may need to edit this file to provide + the full path to wherever you stored the exported policy + model file. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "engineServiceParameters" : { + "name" : "MyFirstPolicyApexEngine", + "version" : "0.0.1", + "id" : 101, + "instanceCount" : 4, + "deploymentPort" : 12345, + "policyModelFileName" : "examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.json", + "engineParameters" : { + "executorParameters" : { + "MVEL" : { + "parameterClassName" : "org.onap.policy.apex.plugins.executor.mvel.MVELExecutorParameters" + }, + "JAVASCRIPT" : { + "parameterClassName" : "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters" : { + "carrierTechnology" : "FILE", + "parameters" : { + "standardIO" : true + } + }, + "eventProtocolParameters" : { + "eventProtocol" : "JSON" + } + } + }, + "eventInputParameters": { + "FirstConsumer": { + "carrierTechnologyParameters" : { + "carrierTechnology" : "FILE", + "parameters" : { + "standardIO" : true + } + }, + "eventProtocolParameters" : { + "eventProtocol" : "JSON" + } + } + } + } + + .. container:: paragraph + + To test the policy try paste the following events into + the console as the APEX engine executes: + + .. list-table:: Title + :widths: 25 40 35 + :header-rows: 1 + + * - Input Event (JSON) + - Output Event (JSON) + - comment + * - .. literalinclude:: events/1/EventIn_NonBoozeItem_101309GMT.json + :language: JSON + - .. literalinclude:: events/1/EventOut_NonBoozeItem_101309GMT.json + :language: JSON + - .. container:: paragraph + + Request to buy a non-alcoholic item (item_ID=5123) at 10:13:09 on Tuesday, 10 January 2017. + Sale is authorized. + * - .. literalinclude:: events/1/EventIn_BoozeItem_084106GMT.json + :language: JSON + - .. literalinclude:: events/1/EventOut_BoozeItem_084106GMT.json + :language: JSON + - .. container:: paragraph + + Request to buy alcohol item (`item_ID=1249`) at _08:41:06_ on _Monday, 02 January 2017_. + Sale is not authorized. + * - .. literalinclude:: events/1/EventIn_BoozeItem_201713GMT.json + :language: JSON + - .. literalinclude:: events/1/EventOut_BoozeItem_201713GMT.json + :language: JSON + - .. container:: paragraph + + Request to buy alcohol (`item_ID=1943`) at _20:17:13_ on _Tuesday, 20 December 2016_. + Sale is authorized. + + +CLI Editor File +--------------- + + .. container:: sectionbody + + .. container:: sect1 + + .. rubric:: Policy 1 in CLI Editor + :name: policy_1_in_cli_editor + + .. container:: paragraph + + An equivalent version of the ``MyFirstPolicyModel`` + policy model can again be generated using the APEX CLI + editor. A sample APEX CLI script is shown below: + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + #------------------------------------------------------------------------------- + # ============LICENSE_START======================================================= + # Copyright (C) 2016-2018 Ericsson. All rights reserved. + # ================================================================================ + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ============LICENSE_END========================================================= + #------------------------------------------------------------------------------- + + model create name=MyFirstPolicyModel version=0.0.1 uuid=540226fb-55ee-4f0e-a444-983a0494818e description="This is my first Apex Policy Model." + + schema create name=assistant_ID_type version=0.0.1 uuid=36df4c71-9616-4206-8b53-976a5cd4bd87 description="A type for 'assistant_ID' values" flavour=Java schema=java.lang.Long + + schema create name=authorised_type version=0.0.1 uuid=d48b619e-d00d-4008-b884-02d76ea4350b description="A type for 'authorised' values" flavour=Java schema=java.lang.Boolean + + schema create name=branch_ID_type version=0.0.1 uuid=6468845f-4122-4128-8e49-0f52c26078b5 description="A type for 'branch_ID' values" flavour=Java schema=java.lang.Long + + schema create name=item_ID_type version=0.0.1 uuid=4f227ff1-aee0-453a-b6b6-9a4b2e0da932 description="A type for 'item_ID' values" flavour=Java schema=java.lang.Long + + schema create name=message_type version=0.0.1 uuid=ad1431bb-3155-4e73-b5a3-b89bee498749 description="A type for 'message' values" flavour=Java schema=java.lang.String + + schema create name=notes_type version=0.0.1 uuid=eecfde90-896c-4343-8f9c-2603ced94e2d description="A type for 'notes' values" flavour=Java schema=java.lang.String + + schema create name=price_type version=0.0.1 uuid=52c2fc45-fd8c-463c-bd6f-d91b0554aea7 description="A type for 'amount'/'price' values" flavour=Java schema=java.lang.Long + + schema create name=quantity_type version=0.0.1 uuid=ac3d9842-80af-4a98-951c-bd79a431c613 description="A type for 'quantity' values" flavour=Java schema=java.lang.Integer + + schema create name=sale_ID_type version=0.0.1 uuid=cca47d74-7754-4a61-b163-ca31f66b157b description="A type for 'sale_ID' values" flavour=Java schema=java.lang.Long + + schema create name=timestamp_type version=0.0.1 uuid=fd594e88-411d-4a94-b2be-697b3a0d7adf description="A type for 'time' values" flavour=Java schema=java.lang.Long + + task create name=MorningBoozeCheck version=0.0.1 uuid=3351b0f4-cf06-4fa2-8823-edf67bd30223 description=LS + This task checks if the sales request is for an item that contains alcohol. + If the local time is between 00:00:00 and 11:30:00 then the sale is not authorised. Otherwise the sale is authorised. + In this implementation we assume that all items with item_ID values between 1000 and 2000 contain alcohol :-) + LE + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=amount schemaName=price_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=quantity schemaName=quantity_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=time schemaName=timestamp_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=amount schemaName=price_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=quantity schemaName=quantity_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=authorised schemaName=authorised_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=time schemaName=timestamp_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=message schemaName=message_type schemaVersion=0.0.1 optional=true + task logic create name=MorningBoozeCheck version=0.0.1 logicFlavour=MVEL logic=LS + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + import java.util.Date; + import java.util.Calendar; + import java.util.TimeZone; + import java.text.SimpleDateFormat; + + logger.info("Task Execution: '"+subject.id+"'. Input Fields: '"+inFields+"'"); + + outFields.put("amount" , inFields.get("amount")); + outFields.put("assistant_ID", inFields.get("assistant_ID")); + outFields.put("notes" , inFields.get("notes")); + outFields.put("quantity" , inFields.get("quantity")); + outFields.put("branch_ID" , inFields.get("branch_ID")); + outFields.put("item_ID" , inFields.get("item_ID")); + outFields.put("time" , inFields.get("time")); + outFields.put("sale_ID" , inFields.get("sale_ID")); + + item_id = inFields.get("item_ID"); + + //The events used later to test this task use GMT timezone! + gmt = TimeZone.getTimeZone("GMT"); + timenow = Calendar.getInstance(gmt); + df = new SimpleDateFormat("HH:mm:ss z"); + df.setTimeZone(gmt); + timenow.setTimeInMillis(inFields.get("time")); + + midnight = timenow.clone(); + midnight.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),0,0,0); + eleven30 = timenow.clone(); + eleven30.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),11,30,0); + + itemisalcohol = false; + if(item_id != null && item_id >=1000 && item_id < 2000) + itemisalcohol = true; + + if( itemisalcohol + && timenow.after(midnight) && timenow.before(eleven30)){ + outFields.put("authorised", false); + outFields.put("message", "Sale not authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())+ + ". Alcohol can not be sold between "+df.format(midnight.getTime())+ + " and "+df.format(eleven30.getTime())); + return true; + } + else{ + outFields.put("authorised", true); + outFields.put("message", "Sale authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())); + return true; + } + + /* + This task checks if a sale request is for an item that is an alcoholic drink. + If the local time is between 00:00:00 GMT and 11:30:00 GMT then the sale is not + authorised. Otherwise the sale is authorised. + In this implementation we assume that items with item_ID value between 1000 and + 2000 are all alcoholic drinks :-) + */ + LE + + event create name=SALE_AUTH version=0.0.1 uuid=c4500941-3f98-4080-a9cc-5b9753ed050b description="An event emitted by the Policy to indicate whether the sale of an item has been authorised" nameSpace=com.hyperm source="APEX" target="POS" + event parameter create name=SALE_AUTH version=0.0.1 parName=amount schemaName=price_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=authorised schemaName=authorised_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=message schemaName=message_type schemaVersion=0.0.1 optional=true + event parameter create name=SALE_AUTH version=0.0.1 parName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + event parameter create name=SALE_AUTH version=0.0.1 parName=quantity schemaName=quantity_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=time schemaName=timestamp_type schemaVersion=0.0.1 + + event create name=SALE_INPUT version=0.0.1 uuid=4f04aa98-e917-4f4a-882a-c75ba5a99374 description="An event raised by the PoS system each time an item is scanned for purchase" nameSpace=com.hyperm source="POS" target="APEX" + event parameter create name=SALE_INPUT version=0.0.1 parName=amount schemaName=price_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + event parameter create name=SALE_INPUT version=0.0.1 parName=quantity schemaName=quantity_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=time schemaName=timestamp_type schemaVersion=0.0.1 + + + policy create name=MyFirstPolicy version=0.0.1 uuid=6c5e410f-489a-46ff-964e-982ce6e8b6d0 description="This is my first Apex policy. It checks if a sale should be authorised or not." template=FREEFORM firstState=BoozeAuthDecide + policy state create name=MyFirstPolicy version=0.0.1 stateName=BoozeAuthDecide triggerName=SALE_INPUT triggerVersion=0.0.1 defaultTaskName=MorningBoozeCheck defaultTaskVersion=0.0.1 + policy state output create name=MyFirstPolicy version=0.0.1 stateName=BoozeAuthDecide outputName=MorningBoozeCheck_Output_Direct eventName=SALE_AUTH eventVersion=0.0.1 nextState=NULL + policy state taskref create name=MyFirstPolicy version=0.0.1 stateName=BoozeAuthDecide taskLocalName=MorningBoozeCheck taskName=MorningBoozeCheck taskVersion=0.0.1 outputType=DIRECT outputName=MorningBoozeCheck_Output_Direct + +Policy Step 2 +^^^^^^^^^^^^^ + + .. container:: sectionbody + + .. container:: sect1 + + .. rubric:: Scenario + :name: scenario + + .. container:: paragraph + + *HyperM* have just opened a new branch in a + different country, but that country has different + rules about when alcohol can be sold! In this + section we will go through the necessary steps to + extend our policy to enforce this for *HyperM*. + + .. container:: ulist + + - In some branches alcohol cannot be sold before + 1pm, and not at all on Sundays. + + .. container:: paragraph + + Although there are a number of ways to accomplish + this the easiest approach for us is to define + another task and then select which task is + appropriate at runtime depending on the branch + identifier in the incoming event. + +Extend Policy Model +------------------- + + .. container:: sectionbody + + .. container:: sect2 + + .. rubric:: Extend the Policy with the new Scenario + :name: extend_the_policy_with_the_new_scenario + + .. container:: paragraph + + To create a new Task click on the 'Tasks' tab. In the + 'Tasks' pane, right click and select 'Create new Task': + + .. container:: paragraph + + Create a new Task called ``MorningBoozeCheckAlt1``. Use + the 'Generate UUID' button to create a new unique ID for + the task, and fill in a description for the task. Select + the same input and output fields that we used earlier + when we defined the ``MorningBoozeCheck`` task earlier. + + .. table:: Table 1. Input fields for + ``MorningBoozeCheckAlt1`` task + + +-----------------------------------+-----------------------------------+ + | Parameter Name | Parameter Type | + +===================================+===================================+ + | time | timestamp_type | + +-----------------------------------+-----------------------------------+ + | sale_ID | sale_ID_type | + +-----------------------------------+-----------------------------------+ + | amount | price_type | + +-----------------------------------+-----------------------------------+ + | item_ID | item_ID_type | + +-----------------------------------+-----------------------------------+ + | quantity | quantity_type | + +-----------------------------------+-----------------------------------+ + | assistant_ID | assistant_ID_type | + +-----------------------------------+-----------------------------------+ + | branch_ID | branch_ID_type | + +-----------------------------------+-----------------------------------+ + | notes | notes_type | + +-----------------------------------+-----------------------------------+ + + .. table:: Table 2. Output fields for + ``MorningBoozeCheckAlt1`` task + + +-----------------------------------+-----------------------------------+ + | Parameter Name | Parameter Type | + +===================================+===================================+ + | sale_ID | sale_ID_type | + +-----------------------------------+-----------------------------------+ + | time | timestamp_type | + +-----------------------------------+-----------------------------------+ + | authorised | authorised_type | + +-----------------------------------+-----------------------------------+ + | message | message_type | + +-----------------------------------+-----------------------------------+ + | amount | price_type | + +-----------------------------------+-----------------------------------+ + | item_ID | item_ID_type | + +-----------------------------------+-----------------------------------+ + | assistant_ID | assistant_ID_type | + +-----------------------------------+-----------------------------------+ + | quantity | quantity_type | + +-----------------------------------+-----------------------------------+ + | branch_ID | branch_ID_type | + +-----------------------------------+-----------------------------------+ + | notes | notes_type | + +-----------------------------------+-----------------------------------+ + + .. container:: paragraph + + This task also requires some 'Task Logic' to implement + the new behaviour for this task. + + .. container:: paragraph + + For simplicity use the following code for the task logic. + It again assumes that all items with ``item_ID`` between + 1000 and 2000 contain alcohol. We again use the standard + ``Java`` time utilities to check if the current time is + between ``00:00:00 CET`` and ``13:00:00 CET`` or if it is + ``Sunday``. + + .. container:: paragraph + + For this task we will again author the logic using the + ```MVEL`` <https://en.wikipedia.org/wiki/MVEL>`__ + scripting language. Sample task logic code (specified in + ```MVEL`` <https://en.wikipedia.org/wiki/MVEL>`__) is + given below. For a detailed guide to how to write your + own logic in + ```JavaScript`` <https://en.wikipedia.org/wiki/JavaScript>`__, + ```MVEL`` <https://en.wikipedia.org/wiki/MVEL>`__ or one + of the other supported languages please refer to APEX + Programmers Guide. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + import java.util.Date; + import java.util.Calendar; + import java.util.TimeZone; + import java.text.SimpleDateFormat; + + logger.info("Task Execution: '"+subject.id+"'. Input Event: '"+inFields+"'"); + + outFields.put("amount" , inFields.get("amount")); + outFields.put("assistant_ID", inFields.get("assistant_ID")); + outFields.put("notes" , inFields.get("notes")); + outFields.put("quantity" , inFields.get("quantity")); + outFields.put("branch_ID" , inFields.get("branch_ID")); + outFields.put("item_ID" , inFields.get("item_ID")); + outFields.put("time" , inFields.get("time")); + outFields.put("sale_ID" , inFields.get("sale_ID")); + + item_id = inFields.get("item_ID"); + + //The events used later to test this task use CET timezone! + cet = TimeZone.getTimeZone("CET"); + timenow = Calendar.getInstance(cet); + df = new SimpleDateFormat("HH:mm:ss z"); + df.setTimeZone(cet); + timenow.setTimeInMillis(inFields.get("time")); + + midnight = timenow.clone(); + midnight.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),0,0,0); + onepm = timenow.clone(); + onepm.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),13,0,0); + + itemisalcohol = false; + if(item_id != null && item_id >=1000 && item_id < 2000) + itemisalcohol = true; + + if( itemisalcohol && + ( (timenow.after(midnight) && timenow.before(onepm)) + || + (timenow.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) + )){ + outFields.put("authorised", false); + outFields.put("message", "Sale not authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())+ + ". Alcohol can not be sold between "+df.format(midnight.getTime())+ + " and "+df.format(onepm.getTime()) +" or on Sunday"); + return true; + } + else{ + outFields.put("authorised", true); + outFields.put("message", "Sale authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())); + return true; + } + + /* + This task checks if a sale request is for an item that is an alcoholic drink. + If the local time is between 00:00:00 CET and 13:00:00 CET then the sale is not authorised. + Also alcohol sales are not allowed on Sundays. Otherwise the sale is authorised. + In this implementation we assume that items with item_ID between 1000 and 2000 are all alcoholic drinks :-) + */ + + .. container:: imageblock + + .. container:: content + + |Create a new alternative task + \`MorningBoozeCheckAlt1\`| + + .. container:: paragraph + + The task definition is now complete so click the 'Submit' + button to save the task. Now that we have created our + task, we can can add this task to the single pre-existing + state (``BoozeAuthDecide``) in our policy. + + .. container:: paragraph + + To edit the ``BoozeAuthDecide`` state in our policy click + on the 'Policies' tab. In the 'Policies' pane, right + click on our ``MyFirstPolicy`` policy and select 'Edit'. + Navigate to the ``BoozeAuthDecide`` state in the 'states' + section at the bottom of the policy definition pane. + + .. container:: imageblock + + .. container:: content + + |Right click to edit a policy| + + .. container:: paragraph + + To add our new task ``MorningBoozeCheckAlt1``, scroll + down to the ``BoozeAuthDecide`` state in the 'States' + section. In the 'State Tasks' section for + ``BoozeAuthDecide`` use the 'Add new task' button. Select + our new ``MorningBoozeCheckAlt1`` task, and use the name + of the task as the 'Local Name' for the task. The + ``MorningBoozeCheckAlt1`` task can reuse the same + ``MorningBoozeCheck_Output_Direct`` 'Direct State Output + Mapping' that we used for the ``MorningBoozeCheck`` task. + (Recall that the role of the 'State Output Mapping' is to + select the output event for the state, and select the + next state to be executed. These both remain the same as + before.) + + .. container:: paragraph + + Since our state has more than one task we must define + some logic to determine which task should be used each + time the state is executed. This *task selection logic* + is defined in the state definition. For our + ``BoozeAuthDecide`` state we want the choice of which + task to use to be based on the ``branch_ID`` from which + the ``SALE_INPUT`` event originated. For simplicity sake + let us assume that branches with ``branch_ID`` between + ``0`` and ``999`` should use the ``MorningBoozeCheck`` + task, and the branches with with ``branch_ID`` between + ``1000`` and ``1999`` should use the + ``MorningBoozeCheckAlt1`` task. + + .. container:: paragraph + + This time, for variety, we will author the task selection + logic using the + ```JavaScript`` <https://en.wikipedia.org/wiki/JavaScript>`__ + scripting language. Sample task selection logic code + (specified in + ```JavaScript`` <https://en.wikipedia.org/wiki/JavaScript>`__) + is given below. Paste the script text into the 'Task + Selection Logic' box, and use "JAVASCRIPT" as the 'Task + Selection Logic Type / Flavour'. It is necessary to mark + one of the tasks as the 'Default Task' so that the task + selection logic always has a fallback default option in + cases where a particular task cannot be selected. In this + case the ``MorningBoozeCheck`` task can be the default + task. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + + executor.logger.info("Task Selection Execution: '"+executor.subject.id+ + "'. Input Event: '"+executor.inFields+"'"); + + branchid = executor.inFields.get("branch_ID"); + taskorig = executor.subject.getTaskKey("MorningBoozeCheck"); + taskalt = executor.subject.getTaskKey("MorningBoozeCheckAlt1"); + taskdef = executor.subject.getDefaultTaskKey(); + + if(branchid >=0 && branchid <1000){ + taskorig.copyTo(executor.selectedTask); + } + else if (branchid >=1000 && branchid <2000){ + taskalt.copyTo(executor.selectedTask); + } + else{ + taskdef.copyTo(executor.selectedTask); + } + + /* + This task selection logic selects task "MorningBoozeCheck" for branches with + 0<=branch_ID<1000 and selects task "MorningBoozeCheckAlt1" for branches with + 1000<=branch_ID<2000. Otherwise the default task is selected. + In this case the default task is also "MorningBoozeCheck" + */ + + .. container:: imageblock + + .. container:: content + + |State definition with 2 Tasks and Task Selection + Logic| + + .. container:: paragraph + + When complete don’t forget to click the 'Submit' button + at the bottom of 'Policies' pane for our + ``MyFirstPolicy`` policy after updating the + ``BoozeAuthDecide`` state. + + .. container:: paragraph + + Congratulations, you have now completed the second step + towards your first APEX policy. The policy model + containing our new policy can again be validated and + exported from the editor and saved as shown in Step 1. + + .. container:: paragraph + + The exported policy model is then available in the + directory you selected, as + `MyFirstPolicyModel_0.0.1.json <files/mfp-files/2/MyFirstPolicyModel_0.0.1.json>`__. + The exported policy can now be loaded into the APEX + Policy Engine, or can be re-loaded and edited by the APEX + Policy Editor. + +Test The Policy +--------------- + + .. container:: sectionbody + + .. container:: sect2 + + .. rubric:: Test Policy Step 2 + :name: test_policy_step_2 + + .. container:: paragraph + + To start a new APEX Engine you can use the following + configuration. In a full APEX installation you can find + this configuration in + ``$APEX_HOME/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigStdin2StdoutJsonEvent.json``. + Note, this has changed from the configuration file in + Step 1 to enable the ``JAVASCRIPT`` executor for our new + 'Task Selection Logic'. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "engineServiceParameters" : { + "name" : "MyFirstPolicyApexEngine", + "version" : "0.0.1", + "id" : 102, + "instanceCount" : 4, + "deploymentPort" : 12345, + "policyModelFileName" : "examples/models/MyFirstPolicy/2/MyFirstPolicyModel_0.0.1.json", + "engineParameters" : { + "executorParameters" : { + "MVEL" : { + "parameterClassName" : "org.onap.policy.apex.plugins.executor.mvel.MVELExecutorParameters" + }, + "JAVASCRIPT" : { + "parameterClassName" : "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters" : { + "carrierTechnology" : "FILE", + "parameters" : { + "standardIO" : true + } + }, + "eventProtocolParameters" : { + "eventProtocol" : "JSON" + } + } + }, + "eventInputParameters": { + "FirstConsumer": { + "carrierTechnologyParameters" : { + "carrierTechnology" : "FILE", + "parameters" : { + "standardIO" : true + } + }, + "eventProtocolParameters" : { + "eventProtocol" : "JSON" + } + } + } + } + + .. container:: paragraph + + To test the policy try paste the following events into + the console as the APEX engine executes. Note, all tests + from Step 1 will still work perfectly since none of those + events originate from a branch with ``branch_ID`` between + ``1000`` and ``2000``. The 'Task Selection Logic' will + therefore pick the ``MorningBoozeCheck`` task as + expected, and will therefore give the same results. + + .. list-table:: Table 1. Inputs and Outputs when testing *My First Policy* + :widths: 25 40 35 + :header-rows: 1 + + * - Input Event (JSON) + - Output Event (JSON) + - comment + * - .. literalinclude:: events/1/EventIn_BoozeItem_084106GMT.json + :language: JSON + - .. literalinclude:: events/1/EventOut_BoozeItem_084106GMT.json + :language: JSON + - .. container:: paragraph + + Request to buy alcohol item (`item_ID=1249`) at _08:41:06 GMT_ on _Monday, 02 January 2017_. + Sale is not authorized. Uses the `MorningBoozeCheck` task. + + * - .. literalinclude:: events/2/EventIn_BoozeItem_101433CET_thurs.json + :language: JSON + - .. literalinclude:: events/2/EventOut_BoozeItem_101433CET_thurs.json + :language: JSON + - .. container:: paragraph + + Request to buy alcohol (`item_ID=1047`) at _10:14:33_ on _Thursday, 22 December 2016_. + Sale is not authorized. Uses the `MorningBoozeCheckAlt1` task. + + * - .. literalinclude:: events/2/EventIn_BoozeItem_171937CET_sun.json + :language: JSON + - .. literalinclude:: events/2/EventOut_BoozeItem_171937CET_sun.json + :language: JSON + - .. container:: paragraph + + Request to buy alcohol (`item_ID=1443`) at _17:19:37_ on _Sunday, 18 December 2016_. + Sale is not authorized. Uses the `MorningBoozeCheckAlt1` task. + + * - .. literalinclude:: events/2/EventIn_NonBoozeItem_111309CET_mon.json + :language: JSON + - .. literalinclude:: events/2/EventOut_NonBoozeItem_111309CET_mon.json + :language: JSON + - .. container:: paragraph + + Request to buy non-alcoholic item (`item_ID=5321`) at _11:13:09_ on _Monday, 2 January 2017_. + Sale is authorized. Uses the `MorningBoozeCheckAlt1` task. + +CLI Editor File +--------------- + + .. container:: sectionbody + + .. container:: sect2 + + .. rubric:: Policy 2 in CLI Editor + :name: policy_2_in_cli_editor + + .. container:: paragraph + + An equivalent version of the ``MyFirstPolicyModel`` + policy model can again be generated using the APEX CLI + editor. A sample APEX CLI script is shown below: + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + #------------------------------------------------------------------------------- + # ============LICENSE_START======================================================= + # Copyright (C) 2016-2018 Ericsson. All rights reserved. + # ================================================================================ + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ============LICENSE_END========================================================= + #------------------------------------------------------------------------------- + + model create name=MyFirstPolicyModel version=0.0.1 uuid=540226fb-55ee-4f0e-a444-983a0494818e description="This is my first Apex Policy Model." + + schema create name=assistant_ID_type version=0.0.1 uuid=36df4c71-9616-4206-8b53-976a5cd4bd87 description="A type for 'assistant_ID' values" flavour=Java schema=java.lang.Long + + schema create name=authorised_type version=0.0.1 uuid=d48b619e-d00d-4008-b884-02d76ea4350b description="A type for 'authorised' values" flavour=Java schema=java.lang.Boolean + + schema create name=branch_ID_type version=0.0.1 uuid=6468845f-4122-4128-8e49-0f52c26078b5 description="A type for 'branch_ID' values" flavour=Java schema=java.lang.Long + + schema create name=item_ID_type version=0.0.1 uuid=4f227ff1-aee0-453a-b6b6-9a4b2e0da932 description="A type for 'item_ID' values" flavour=Java schema=java.lang.Long + + schema create name=message_type version=0.0.1 uuid=ad1431bb-3155-4e73-b5a3-b89bee498749 description="A type for 'message' values" flavour=Java schema=java.lang.String + + schema create name=notes_type version=0.0.1 uuid=eecfde90-896c-4343-8f9c-2603ced94e2d description="A type for 'notes' values" flavour=Java schema=java.lang.String + + schema create name=price_type version=0.0.1 uuid=52c2fc45-fd8c-463c-bd6f-d91b0554aea7 description="A type for 'amount'/'price' values" flavour=Java schema=java.lang.Long + + schema create name=quantity_type version=0.0.1 uuid=ac3d9842-80af-4a98-951c-bd79a431c613 description="A type for 'quantity' values" flavour=Java schema=java.lang.Integer + + schema create name=sale_ID_type version=0.0.1 uuid=cca47d74-7754-4a61-b163-ca31f66b157b description="A type for 'sale_ID' values" flavour=Java schema=java.lang.Long + + schema create name=timestamp_type version=0.0.1 uuid=fd594e88-411d-4a94-b2be-697b3a0d7adf description="A type for 'time' values" flavour=Java schema=java.lang.Long + + task create name=MorningBoozeCheck version=0.0.1 uuid=3351b0f4-cf06-4fa2-8823-edf67bd30223 description=LS + This task checks if the sales request is for an item that contains alcohol. + If the local time is between 00:00:00 and 11:30:00 then the sale is not authorised. Otherwise the sale is authorised. + In this implementation we assume that all items with item_ID values between 1000 and 2000 contain alcohol :-) + LE + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=amount schemaName=price_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=quantity schemaName=quantity_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheck version=0.0.1 fieldName=time schemaName=timestamp_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=amount schemaName=price_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=quantity schemaName=quantity_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=authorised schemaName=authorised_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=time schemaName=timestamp_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheck version=0.0.1 fieldName=message schemaName=message_type schemaVersion=0.0.1 optional=true + task logic create name=MorningBoozeCheck version=0.0.1 logicFlavour=MVEL logic=LS + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + import java.util.Date; + import java.util.Calendar; + import java.util.TimeZone; + import java.text.SimpleDateFormat; + + logger.info("Task Execution: '"+subject.id+"'. Input Fields: '"+inFields+"'"); + + outFields.put("amount" , inFields.get("amount")); + outFields.put("assistant_ID", inFields.get("assistant_ID")); + outFields.put("notes" , inFields.get("notes")); + outFields.put("quantity" , inFields.get("quantity")); + outFields.put("branch_ID" , inFields.get("branch_ID")); + outFields.put("item_ID" , inFields.get("item_ID")); + outFields.put("time" , inFields.get("time")); + outFields.put("sale_ID" , inFields.get("sale_ID")); + + item_id = inFields.get("item_ID"); + + //The events used later to test this task use GMT timezone! + gmt = TimeZone.getTimeZone("GMT"); + timenow = Calendar.getInstance(gmt); + df = new SimpleDateFormat("HH:mm:ss z"); + df.setTimeZone(gmt); + timenow.setTimeInMillis(inFields.get("time")); + + midnight = timenow.clone(); + midnight.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),0,0,0); + eleven30 = timenow.clone(); + eleven30.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),11,30,0); + + itemisalcohol = false; + if(item_id != null && item_id >=1000 && item_id < 2000) + itemisalcohol = true; + + if( itemisalcohol + && timenow.after(midnight) && timenow.before(eleven30)){ + outFields.put("authorised", false); + outFields.put("message", "Sale not authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())+ + ". Alcohol can not be sold between "+df.format(midnight.getTime())+ + " and "+df.format(eleven30.getTime())); + return true; + } + else{ + outFields.put("authorised", true); + outFields.put("message", "Sale authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())); + return true; + } + + /* + This task checks if a sale request is for an item that is an alcoholic drink. + If the local time is between 00:00:00 GMT and 11:30:00 GMT then the sale is not + authorised. Otherwise the sale is authorised. + In this implementation we assume that items with item_ID value between 1000 and + 2000 are all alcoholic drinks :-) + */ + LE + + task create name=MorningBoozeCheckAlt1 version=0.0.1 uuid=bc6d90c9-c902-4686-afd3-925b30e39990 description=LS + This task checks if a sale request is for an item that is an alcoholic drink. + If the local time is between 00:00:00 CET and 13:00:00 CET then the sale is not authorised. + Also alcohol sales are not allowed on Sundays. Otherwise the sale is authorised. + In this implementation we assume that items with item_ID between 1000 and 2000 are all alcoholic drinks + LE + task inputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=amount schemaName=price_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + task inputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=quantity schemaName=quantity_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + task inputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=time schemaName=timestamp_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=amount schemaName=price_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=quantity schemaName=quantity_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=authorised schemaName=authorised_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=time schemaName=timestamp_type schemaVersion=0.0.1 + task outputfield create name=MorningBoozeCheckAlt1 version=0.0.1 fieldName=message schemaName=message_type schemaVersion=0.0.1 optional=true + task logic create name=MorningBoozeCheckAlt1 version=0.0.1 logicFlavour=MVEL logic=LS + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + import java.util.Date; + import java.util.Calendar; + import java.util.TimeZone; + import java.text.SimpleDateFormat; + + logger.info("Task Execution: '"+subject.id+"'. Input Event: '"+inFields+"'"); + + outFields.put("amount" , inFields.get("amount")); + outFields.put("assistant_ID", inFields.get("assistant_ID")); + outFields.put("notes" , inFields.get("notes")); + outFields.put("quantity" , inFields.get("quantity")); + outFields.put("branch_ID" , inFields.get("branch_ID")); + outFields.put("item_ID" , inFields.get("item_ID")); + outFields.put("time" , inFields.get("time")); + outFields.put("sale_ID" , inFields.get("sale_ID")); + + item_id = inFields.get("item_ID"); + + //The events used later to test this task use CET timezone! + cet = TimeZone.getTimeZone("CET"); + timenow = Calendar.getInstance(cet); + df = new SimpleDateFormat("HH:mm:ss z"); + df.setTimeZone(cet); + timenow.setTimeInMillis(inFields.get("time")); + + midnight = timenow.clone(); + midnight.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),0,0,0); + onepm = timenow.clone(); + onepm.set( + timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH), + timenow.get(Calendar.DATE),13,0,0); + + itemisalcohol = false; + if(item_id != null && item_id >=1000 && item_id < 2000) + itemisalcohol = true; + + if( itemisalcohol && + ( (timenow.after(midnight) && timenow.before(onepm)) + || + (timenow.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) + )){ + outFields.put("authorised", false); + outFields.put("message", "Sale not authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())+ + ". Alcohol can not be sold between "+df.format(midnight.getTime())+ + " and "+df.format(onepm.getTime()) +" or on Sunday"); + return true; + } + else{ + outFields.put("authorised", true); + outFields.put("message", "Sale authorised by policy task "+subject.taskName+ + " for time "+df.format(timenow.getTime())); + return true; + } + + /* + This task checks if a sale request is for an item that is an alcoholic drink. + If the local time is between 00:00:00 CET and 13:00:00 CET then the sale is not authorised. + Also alcohol sales are not allowed on Sundays. Otherwise the sale is authorised. + In this implementation we assume that items with item_ID between 1000 and 2000 are all alcoholic drinks :-) + */ + LE + + event create name=SALE_AUTH version=0.0.1 uuid=c4500941-3f98-4080-a9cc-5b9753ed050b description="An event emitted by the Policy to indicate whether the sale of an item has been authorised" nameSpace=com.hyperm source="APEX" target="POS" + event parameter create name=SALE_AUTH version=0.0.1 parName=amount schemaName=price_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=authorised schemaName=authorised_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=message schemaName=message_type schemaVersion=0.0.1 optional=true + event parameter create name=SALE_AUTH version=0.0.1 parName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + event parameter create name=SALE_AUTH version=0.0.1 parName=quantity schemaName=quantity_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_AUTH version=0.0.1 parName=time schemaName=timestamp_type schemaVersion=0.0.1 + + event create name=SALE_INPUT version=0.0.1 uuid=4f04aa98-e917-4f4a-882a-c75ba5a99374 description="An event raised by the PoS system each time an item is scanned for purchase" nameSpace=com.hyperm source="POS" target="APEX" + event parameter create name=SALE_INPUT version=0.0.1 parName=amount schemaName=price_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=assistant_ID schemaName=assistant_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=branch_ID schemaName=branch_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=item_ID schemaName=item_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=notes schemaName=notes_type schemaVersion=0.0.1 optional=true + event parameter create name=SALE_INPUT version=0.0.1 parName=quantity schemaName=quantity_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=sale_ID schemaName=sale_ID_type schemaVersion=0.0.1 + event parameter create name=SALE_INPUT version=0.0.1 parName=time schemaName=timestamp_type schemaVersion=0.0.1 + + + policy create name=MyFirstPolicy version=0.0.1 uuid=6c5e410f-489a-46ff-964e-982ce6e8b6d0 description="This is my first Apex policy. It checks if a sale should be authorised or not." template=FREEFORM firstState=BoozeAuthDecide + policy state create name=MyFirstPolicy version=0.0.1 stateName=BoozeAuthDecide triggerName=SALE_INPUT triggerVersion=0.0.1 defaultTaskName=MorningBoozeCheck defaultTaskVersion=0.0.1 + policy state output create name=MyFirstPolicy version=0.0.1 stateName=BoozeAuthDecide outputName=MorningBoozeCheck_Output_Direct eventName=SALE_AUTH eventVersion=0.0.1 nextState=NULL + policy state taskref create name=MyFirstPolicy version=0.0.1 stateName=BoozeAuthDecide taskLocalName=MorningBoozeCheckAlt1 taskName=MorningBoozeCheckAlt1 taskVersion=0.0.1 outputType=DIRECT outputName=MorningBoozeCheck_Output_Direct + policy state taskref create name=MyFirstPolicy version=0.0.1 stateName=BoozeAuthDecide taskLocalName=MorningBoozeCheck taskName=MorningBoozeCheck taskVersion=0.0.1 outputType=DIRECT outputName=MorningBoozeCheck_Output_Direct + policy state selecttasklogic create name=MyFirstPolicy version=0.0.1 stateName=BoozeAuthDecide logicFlavour=JAVASCRIPT logic=LS + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + + executor.logger.info("Task Selection Execution: '"+executor.subject.id+"'. Input Event: '"+executor.inFields+"'"); + + branchid = executor.inFields.get("branch_ID"); + taskorig = executor.subject.getTaskKey("MorningBoozeCheck"); + taskalt = executor.subject.getTaskKey("MorningBoozeCheckAlt1"); + taskdef = executor.subject.getDefaultTaskKey(); + + if(branchid >=0 && branchid <1000){ + taskorig.copyTo(executor.selectedTask); + } + else if (branchid >=1000 && branchid <2000){ + taskalt.copyTo(executor.selectedTask); + } + else{ + taskdef.copyTo(executor.selectedTask); + } + + /* + This task selection logic selects task "MorningBoozeCheck" for branches with 0<=branch_ID<1000 and selects task "MorningBoozeCheckAlt1" for branches with 1000<=branch_ID<2000. Otherwise the default task is selected. In this case the default task is also "MorningBoozeCheck" + */ + LE + + + .. container:: + :name: footer-text + + 2.3.0-SNAPSHOT + Last updated 2020-04-03 16:04:24 IST + +.. |File > New to create a new Policy Model| image:: images/mfp/MyFirstPolicy_P1_newPolicyModel1.png +.. |Create a new Policy Model| image:: images/mfp/MyFirstPolicy_P1_newPolicyModel2.png +.. |ONAP| image:: ../../../images/logos.png + :class: builtBy + :target: http://www.onap.org/ +.. |Right click to create a new event| image:: images/mfp/MyFirstPolicy_P1_newEvent1.png +.. |Fill in the necessary information for the 'SALE_INPUT' event and click 'Submit'| image:: images/mfp/MyFirstPolicy_P1_newEvent2.png +.. |Right click to create a new Item Schema| image:: images/mfp/MyFirstPolicy_P1_newItemSchema1.png +.. |Create a new Item Schema| image:: images/mfp/MyFirstPolicy_P1_newItemSchema2.png +.. |Add new event parameters to an event| image:: images/mfp/MyFirstPolicy_P1_newEvent3.png +.. |Right click to create a new task| image:: images/mfp/MyFirstPolicy_P1_newTask1.png +.. |Add input and out fields for the task| image:: images/mfp/MyFirstPolicy_P1_newTask2.png +.. |Add task logic the task| image:: images/mfp/MyFirstPolicy_P1_newTask3.png +.. |Create a new policy| image:: images/mfp/MyFirstPolicy_P1_newPolicy1.png +.. |Create a state| image:: images/mfp/MyFirstPolicy_P1_newState1.png +.. |Add a Task and Output Mapping| image:: images/mfp/MyFirstPolicy_P1_newState2.png +.. |Validate the policy model for error using the 'Model' > 'Validate' menu item| image:: images/mfp/MyFirstPolicy_P1_validatePolicyModel.png +.. |Download the completed policy model using the 'File' > 'Download' menu item| image:: images/mfp/MyFirstPolicy_P1_exportPolicyModel1.png +.. |Create a new alternative task \`MorningBoozeCheckAlt1\`| image:: images/mfp/MyFirstPolicy_P2_newTask1.png +.. |Right click to edit a policy| image:: images/mfp/MyFirstPolicy_P2_editPolicy1.png +.. |State definition with 2 Tasks and Task Selection Logic| image:: images/mfp/MyFirstPolicy_P2_editState1.png + + diff --git a/docs/apex/APEX-OnapPf-Guide.rst b/docs/apex/APEX-OnapPf-Guide.rst index 5e75f325..0fe38025 100644 --- a/docs/apex/APEX-OnapPf-Guide.rst +++ b/docs/apex/APEX-OnapPf-Guide.rst @@ -264,51 +264,38 @@ Build a Docker Image :number-lines: # - # Docker file to build an image that runs APEX on Java 8 in alpine + # Docker file to build an image that runs APEX on Java 11 or better in alpine # - FROM onap/policy-base-alpine:1.4.0 + FROM onap/policy-jre-alpine:2.0.1 LABEL maintainer="Policy Team" - ARG BUILD_VERSION=${BUILD_VERSION} ARG POLICY_LOGS=/var/log/onap/policy/apex-pdp - - ENV BUILD_VERSION ${BUILD_VERSION} - ENV POLICY_HOME=/opt/app/policy - ENV POLICY_APEX_PDP_HOME=${POLICY_HOME}/apex-pdp - ENV POLICY_LOGS=${POLICY_LOGS} + ENV POLICY_HOME=/opt/app/policy/apex-pdp + ENV POLICY_LOGS=$POLICY_LOGS RUN apk add --no-cache \ - vim \ - iproute2 \ - iputils - - # Create apex user and group - RUN addgroup -S apexuser && adduser -S apexuser -G apexuser - - - # Add Apex-specific directories and set ownership as the Apex admin user - RUN mkdir -p ${POLICY_APEX_PDP_HOME} \ - && mkdir -p ${POLICY_LOGS} \ - && chown -R apexuser:apexuser ${POLICY_LOGS} - - # Unpack the tarball - RUN mkdir /packages - COPY apex-pdp-package-full.tar.gz /packages - RUN tar xvfz /packages/apex-pdp-package-full.tar.gz --directory ${POLICY_APEX_PDP_HOME} \ - && rm /packages/apex-pdp-package-full.tar.gz - - # Ensure everything has the correct permissions - RUN find /opt/app -type d -perm 755 \ + vim \ + iproute2 \ + iputils \ + && addgroup -S apexuser && adduser -S apexuser -G apexuser \ + && mkdir -p $POLICY_HOME \ + && mkdir -p $POLICY_LOGS \ + && chown -R apexuser:apexuser $POLICY_LOGS \ + && mkdir /packages + + COPY /maven/apex-pdp-package-full.tar.gz /packages + RUN tar xvfz /packages/apex-pdp-package-full.tar.gz --directory $POLICY_HOME \ + && rm /packages/apex-pdp-package-full.tar.gz \ + && find /opt/app -type d -perm 755 \ && find /opt/app -type f -perm 644 \ - && chmod a+x ${POLICY_APEX_PDP_HOME}/bin/* - - # Copy examples to Apex user area - RUN cp -pr ${POLICY_APEX_PDP_HOME}/examples /home/apexuser \ - && chown -R apexuser:apexuser /home/apexuser/* + && chmod 755 $POLICY_HOME/bin/* \ + && cp -pr $POLICY_HOME/examples /home/apexuser \ + && chown -R apexuser:apexuser /home/apexuser/* $POLICY_HOME \ + && chmod 644 $POLICY_HOME/etc/* USER apexuser - ENV PATH ${POLICY_APEX_PDP_HOME}/bin:$PATH + ENV PATH $POLICY_HOME/bin:$PATH WORKDIR /home/apexuser @@ -350,19 +337,20 @@ Format of the configuration file (OnapPfConfig.json) explained "pdpStatusParameters":{ "timeIntervalMs": 120000, (3) "pdpType":"apex", (4) + "pdpGroup":"defaultGroup", (5) "description":"Pdp Heartbeat", - "supportedPolicyTypes":[{"name":"onap.policies.controlloop.operational.Apex","version":"1.0.0"}] (5) + "supportedPolicyTypes":[{"name":"onap.policies.controlloop.operational.Apex","version":"1.0.0"}] (6) }, "topicParameterGroup": { - "topicSources" : [{ (6) - "topic" : "POLICY-PDP-PAP", (7) - "servers" : [ "message-router" ], (8) - "topicCommInfrastructure" : "dmaap" (9) + "topicSources" : [{ (7) + "topic" : "POLICY-PDP-PAP", (8) + "servers" : [ "message-router" ], (9) + "topicCommInfrastructure" : "dmaap" (10) }], - "topicSinks" : [{ (10) - "topic" : "POLICY-PDP-PAP", (11) - "servers" : [ "message-router" ], (12) - "topicCommInfrastructure" : "dmaap" (13) + "topicSinks" : [{ (11) + "topic" : "POLICY-PDP-PAP", (12) + "servers" : [ "message-router" ], (13) + "topicCommInfrastructure" : "dmaap" (14) }] } } @@ -383,35 +371,37 @@ Format of the configuration file (OnapPfConfig.json) explained +-----------------------------------+-------------------------------------------------+ | **4** | Type of the pdp. | +-----------------------------------+-------------------------------------------------+ - | **5** | List of policy types supported by | + | **5** | The group to which the pdp belong to. | + +-----------------------------------+-------------------------------------------------+ + | **6** | List of policy types supported by | | | the PDP. A trailing “.*” can be used to | | | specify multiple policy types; for example, | | | “onap.policies.controlloop.operational.apex.*” | | | would match any policy type beginning with | | | “onap.policies.controlloop.operational.apex.” | +-----------------------------------+-------------------------------------------------+ - | **6** | List of topics' details from | + | **7** | List of topics' details from | | | which messages are received. | +-----------------------------------+-------------------------------------------------+ - | **7** | Topic name of the source to which | + | **8** | Topic name of the source to which | | | PDP-A listens to for messages | | | from PAP. | +-----------------------------------+-------------------------------------------------+ - | **8** | List of servers for the source | + | **9** | List of servers for the source | | | topic. | +-----------------------------------+-------------------------------------------------+ - | **9** | The source topic infrastructure. | + | **10** | The source topic infrastructure. | | | For e.g. dmaap, noop, ueb | +-----------------------------------+-------------------------------------------------+ - | **10** | List of topics' details to which | + | **11** | List of topics' details to which | | | messages are sent. | +-----------------------------------+-------------------------------------------------+ - | **11** | Topic name of the sink to which | + | **12** | Topic name of the sink to which | | | PDP-A sends messages. | +-----------------------------------+-------------------------------------------------+ - | **12** | List of servers for the sink | + | **13** | List of servers for the sink | | | topic. | +-----------------------------------+-------------------------------------------------+ - | **13** | The sink topic infrastructure. | + | **14** | The sink topic infrastructure. | | | For e.g. dmaap, noop, ueb | +-----------------------------------+-------------------------------------------------+ diff --git a/docs/apex/APEX-PCVS-Example.rst b/docs/apex/APEX-PCVS-Example.rst new file mode 100644 index 00000000..fc420303 --- /dev/null +++ b/docs/apex/APEX-PCVS-Example.rst @@ -0,0 +1,2954 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +.. _apex-PCVSExample: + +Policy-controlled Video Streaming (pcvs) with APEX +************************************************** + +.. contents:: + :depth: 3 + +Introduction +^^^^^^^^^^^^ + + .. container:: sectionbody + + .. container:: paragraph + + This module contains several demos for + Policy-controlled Video Streaming (PCVS). Each demo + defines a policy using AVRO and Javascript (or other + scripting languages for the policy logic). To run the + demo, a vanilla Ubuntu server with some extra software + packages is required: + + .. container:: ulist + + - Mininet as network simulator + + - Floodlight as SDN controller + + - Kafka as messaging system + + - Zookeeper for Kafka configuration + + - APEX for policy control + +Install Ubuntu Server and SW +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + .. container:: sect1 + + .. rubric:: Install Demo + :name: install_demo + + .. container:: sectionbody + + .. container:: paragraph + + Requirements: + + .. container:: ulist + + - Ubuntu server: 1.4 GB + + - Ubuntu with Xubuntu Desktop, git, Firefox: 2.3 GB + + - Ubuntu with all, system updated: 3 GB + + - With ZK, Kafka, VLC, Mininet, Floodlight, Python: + 4.4 GB + + - APEX Build (M2 and built): M2 ~ 2 GB, APEX ~3.5 GB + + - APEX install (not build locally): ~ 300 MB + + .. container:: paragraph + + On a Ubuntu OS (install a stable or LTS server first) + + .. container:: listingblock + + .. container:: content + + :: + + # pre for Ubuntu, tools and X + sudo apt-get -y install --no-install-recommends software-properties-common + sudo apt-get -y install --no-install-recommends build-essential + sudo apt-get -y install --no-install-recommends git + sudo aptitude -y install --no-install-recommends xubuntu-desktop + sudo apt-get -y install --no-install-recommends firefox + + + # install Java + sudo add-apt-repository ppa:webupd8team/java + sudo apt-get update + sudo apt-get -y install --no-install-recommends oracle-java8-installer + java -version + + + # reboot system, run system update, then continue + + # if VBox additions are needed, install and reboot + sudo (cd /usr/local/share; wget https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_5.2.7-120528.iso) + sudo mount /usr/local/share/VBoxGuestAdditions_5.2.7-120528.iso /media/cdrom + sudo (cd /media/cdrom;VBoxLinuxAdditions.run) + + + # update apt-get DB + sudo apt-get update + + # if APEX is build from source, install maven and rpm + sudo apt-get install maven rpm + + # install ZooKeeper + sudo apt-get install zookeeperd + + # install Kafka + (cd /tmp;wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/kafka/1.0.0/kafka_2.12-1.0.0.tgz --show-progress) + sudo mkdir /opt/Kafka + sudo tar -xvf /tmp/kafka_2.12-1.0.0.tgz -C /opt/Kafka/ + + # install mininet + cd /usr/local/src + sudo git clone https://github.com/mininet/mininet.git + (cd mininet;util/install.sh -a) + + # install floodlight, requires ant + sudo apt-get install ant + cd /usr/local/src + sudo wget --no-check-certificate https://github.com/floodlight/floodlight/archive/master.zip + sudo unzip master.zip + cd floodlight-master + sudo ant + sudo mkdir /var/lib/floodlight + sudo chmod 777 /var/lib/floodlight + + # install python pip + sudo apt-get install python-pip + + # install kafka-python (need newer version from github) + cd /usr/local/src + sudo git clone https://github.com/dpkp/kafka-python + sudo pip install ./kafka-python + + # install vlc + sudo apt-get install vlc + + .. container:: paragraph + + Install APEX either from source or from a distribution + package. See the APEX documentation for details. We + assume that APEX is installed in + ``/opt/ericsson/apex/apex`` + + .. container:: paragraph + + Copy the LinkMonitor file to Kafka-Python + + .. container:: listingblock + + .. container:: content + + :: + + sudo cp /opt/ericsson/apex/apex/examples/scripts/pcvs/vpnsla/LinkMonitor.py /usr/local/src/kafka-python + + .. container:: paragraph + + Change the Logback configuration in APEX to logic + logging + + .. container:: listingblock + + .. container:: content + + :: + + (cd /opt/ericsson/apex/apex/etc; sudo cp logback-logic.xml logback.xml) + + .. container:: sect1 + + .. rubric:: Get the Demo Video + :name: get_the_demo_video + + .. container:: sectionbody + + .. container:: ulist + + - For all download options of the movie please visit + http://bbb3d.renderfarming.net/download.html + + - For lower-res downloads and mirrors see + https://peach.blender.org/download + + .. container:: listingblock + + .. container:: content + + :: + + sudo mkdir /usr/local/src/videos + + .. container:: paragraph + + Standard 720p (recommended) + + .. container:: listingblock + + .. container:: content + + :: + + (cd /usr/local/src/videos; sudo curl -o big_buck_bunny_480p_surround.avi http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi) + + .. container:: paragraph + + Full HD video + + .. container:: listingblock + + .. container:: content + + :: + + (cd videos; sudo curl -o bbb_sunflower_1080p_60fps_normal.mp4 http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4) + + + +VPN SLA Demo +^^^^^^^^^^^^^ + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + This demo uses a network with several central office + and core switches, over which two VPNs are run. A + customer ``A`` has two location ``A1`` and ``A2`` and + a VPN between them. A customer ``B`` has two location + ``B1`` and ``B2`` and a VPN between them. + + .. container:: imageblock + + .. container:: content + + |VPN SLA Architecture| + + .. container:: paragraph + + The architecture above shows the scenario. The + components are realized in this demo as follows: + + .. container:: ulist + + - *CEP / Analytics* - a simple Python script taking + events from Kafka and sending them to APEX + + - *APEX / Policy* - the APEX engine running the VPA + SLA policy + + - *Controller* - A vanilla Floodlight controller + taking events from the Link Monitor and configuring + Mininet + + - *Network* - A network created using Mininet + + .. container:: paragraph + + The demo requires to start some software (detailed + below). To show actual video streams, we use ``VLC``. + If you do not want to show video streams, but only the + policy, skip the ``VLC`` section. + + .. container:: paragraph + + All shown scripts are available in a full APEX + installation in + ``$APEX_HOME/examples/scripts/pcvs/vpnsla``. + + .. container:: sect2 + + .. rubric:: Start all Software + :name: start_all_software + + .. container:: paragraph + + Create environment variables in a file, say + ``env.sh``. In each new Xterm + + .. container:: ulist + + - Source these environment settings, e.g. + ``. ./env.sh`` + + - Run the commands below as root (``sudo`` per + command or ``sudo -i`` for interactive mode as + shown below) + + .. container:: listingblock + + .. container:: content + + :: + + #!/usr/bin/env bash + + export src_dir=/usr/local/src + export APEX_HOME=/opt/ericsson/apex/apex + export APEX_USER=apexuser + + .. container:: paragraph + + In a new Xterm, start Floodlight + + .. container:: listingblock + + .. container:: content + + :: + + sudo -i + . ./env.sh + cd $src_dir/floodlight-master && java -jar target/floodlight.jar + + .. container:: paragraph + + In a new Xterm start Mininet + + .. container:: listingblock + + .. container:: content + + :: + + sudo -i + . ./env.sh + mn -c && python $APEX_HOME/examples/scripts/pcvs/vpnsla/MininetTopology.py + + .. container:: paragraph + + In a new Xterm, start Kafka + + .. container:: listingblock + + .. container:: content + + :: + + sudo -i + . ./env.sh + /opt/Kafka/kafka_2.12-1.0.0/bin/kafka-server-start.sh /opt/Kafka/kafka_2.12-1.0.0/config/server.properties + + .. container:: paragraph + + In a new Xerm start APEX with the Kafka + configuration for this demo + + .. container:: listingblock + + .. container:: content + + :: + + cd $APEX_HOME + ./bin/apexApps.sh engine -c examples/config/pcvs/vpnsla/kafka2kafka.json + + .. container:: paragraph + + In a new Xterm start the Link Monitor. The Link + Monitor has a 30 second sleep to slow down the + demonstration. So the first action of it comes 30 + seconds after start. Every new action in 30 second + intervals. + + .. container:: listingblock + + .. container:: content + + :: + + sudo -i + . ./env.sh + cd $src_dir + xterm -hold -e 'python3 $src_dir/kafka-python/LinkMonitor.py' & + + .. container:: paragraph + + Now all software should be started and the demo is + running. The Link Monitor will send link up events, + picked up by APEX which triggers the policy. Since + there is no problem, the policy will do nothing. + + .. container:: sect2 + + .. rubric:: Create 2 Video Streams with VLC + :name: create_2_video_streams_with_vlc + + .. container:: paragraph + + In the Mininet console, type ``xterm A1 A2`` and + ``xterm B1 B2`` to open terminals on these nodes. + + .. container:: paragraph + + ``A2`` and ``B2`` are the receiving nodes. In these + terminals, run ``vlc-wrapper``. In each opened VLC + window do + + .. container:: ulist + + - Click Media → Open Network Stream + + - Give the URL as ``rtp://@:5004`` + + .. container:: paragraph + + ``A1`` and ``B1`` are the sending nodes (sending + the video stream) In these terminals, run + ``vlc-wrapper``. In each opened VLC window do + + .. container:: ulist + + - Click Media → Stream + + - Add the video (from ``/usr/local/src/videos``) + + - Click ``Stream`` + + - Click ``Next`` + + - Change the destination + ``RTP / MPEG Transport Stream`` and click + ``Add`` + + - Change the address and type to ``10.0.0.2`` in + ``A1`` and to ``10.0.0.4`` in ``B1`` + + - Turn off ``Active Transcoding`` (this is + important to minimize CPU load) + + - Click ``Next`` + + - Click ``Stream`` + + .. container:: paragraph + + The video should be streaming across the network + from ``A1`` to ``A2`` and from ``B1`` to ``B2``. If + the video streams a slow or interrupted the CPU + load is too high. In these cases either try a + better machine or use a different (lower quality) + video stream. + + .. container:: sect2 + + .. rubric:: Take out L09 and let the Policy do it’s + Magic + :name: take_out_l09_and_let_the_policy_do_it_s_magic + + .. container:: paragraph + + Now it is time to take out the link ``L09``. This + will be picked up by the Link Monitor, which sends + a new event (L09 DOWN) to the policy. The policy + then will calculate which customer should be + impeded (throttled). This will continue, until SLAs + are violated, then a priority calculation will kick + in (Customer ``A`` is prioritized in the setup). + + .. container:: paragraph + + To initiate this, simply type ``link s5 s6 down`` + in the Mininet console followed by ``exit``. + + .. container:: paragraph + + If you have the video streams running, you will see + one or the other struggeling, depending on the + policy decision. + + .. container:: sect2 + + .. rubric:: Reset the Demo + :name: reset_the_demo + + .. container:: paragraph + + If you want to reset the demo, simple stop (in this + order) the following process + + .. container:: ulist + + - Link Monitor + + - APEX + + - Mininet + + - Floodlight + + .. container:: paragraph + + Then restart them in this order + + .. container:: ulist + + - Floodlight + + - Mininet + + - APEX + + - Link Monitor + + .. container:: sect2 + + .. rubric:: Monitor the Demo + :name: monitor_the_demo + + .. container:: paragraph + + Floodlight and APEX provide REST interfaces for + monitoring. + + .. container:: ulist + + - Floodlight: see `Floodlight + Docs <https://floodlight.atlassian.net/wiki/spaces/floodlightcontroller/pages/40403023/Web+GUI>`__ + for details on how to access the monitoring. In + a standard installation as we use here, pointing + browser to the URL + ``http://localhost:8080/ui/pages/index.html`` + should work on the same host + + - APEX please see the APEX documentation for + `Monitoring + Client <https://ericsson.github.io/apex-docs/user-manual/engine-apps/um-engapps-eng-monitoring.html>`__ + or `Full + Client <https://ericsson.github.io/apex-docs/user-manual/engine-apps/um-engapps-full-client.html>`__ + for details on how to monitor APEX. + + +VPN SLA Policy +^^^^^^^^^^^^^^ + + .. container:: sectionbody + + .. container:: paragraph + + The VPN SLA policy is designed as a MEDA policy. The + first state (M = Match) takes the trigger event (a + link up or down) and checks if this is a change to the + known topology. The second state (E = Establish) takes + all available information (trigger event, local + context) and defines what situation we have. The third + state (D = Decide) takes the situation and selects + which algorithm is best to process it. This state can + select between ``none`` (nothing to do), ``solved`` (a + problem is solved now), ``sla`` (compare the current + customer SLA situation and select one to impede), and + ``priority`` (impede non-priority customers). The + fourth and final state (A = Act) selects the right + action for the taken decision and creates the response + event sent to the orchestrator. + + .. container:: paragraph + + We have added three more policies to set the local + context: one for adding nodes, one for adding edges + (links), and one for adding customers. These policies + do not realize any action, they are only here for + updating the local context. This mechanism is the + fasted way to update local context, and it is + independent of any context plugin. + + .. container:: paragraph + + The policy uses data defined in Avro, so we have a + number of Avro schema definitions. + +Context Schemas +--------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The context schemas are for the local context. We + model edges and nodes for the topology, customers, and + problems with all information on detected problems. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "type" : "record", + "name" : "TopologyEdges", + "fields" : [ + {"name": "name", "type": "string", "doc": "Name of the Edge, typically a link name"}, + {"name": "start", "type": "string", "doc": "Edge endpoint: start - a node name"}, + {"name": "end", "type": "string", "doc": "Edge endpoint: end - a node name"}, + {"name": "active", "type": "boolean", "doc": "Flag for active/inactive edges, inactive means a link is down"} + ] + } + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "type" : "record", + "name" : "TopologyNodes", + "fields" : [ + {"name" : "name", "type" : "string", "doc": "The name of the node"}, + {"name" : "mnname", "type" : "string", "doc": "The name of the node in Mininet"} + ] + } + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "type" : "record", + "name" : "Customer", + "fields" : [ + {"name" : "customerName", "type" : "string"}, + {"name" : "dtSLA" , "type" : "int"}, + {"name" : "dtYTD" , "type" : "int"}, + {"name" : "priority" , "type" : "boolean"}, + {"name" : "satisfaction", "type" : "int"}, + { + "name": "links", + "doc": "Links used by this customer", + "type": {"type" : "array", "items" : "string"} + } + ] + } + + +Trigger Schemas +--------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The trigger event provides a status as ``UP`` or + ``DOWN``. To avoid tests for these strings in the + logic, we defined an Avro schema for an enumeration. + This does not impact the trigger system (it can still + send the strings), but makes the task logic simpler. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "type": "enum", + "name": "Status", + "symbols" : [ + "UP", + "DOWN" + ] + } + +Context Logic Nodes +-------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The node context logic simply takes the trigger event + (for context) and creates a new node in the local + context topology. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var ifNodeName = executor.inFields["nodeName"]; + var ifMininetName = executor.inFields["mininetName"]; + + var albumTopoNodes = executor.getContextAlbum("albumTopoNodes"); + + logger.trace("-- got infields, testing existing node"); + + var ctxtNode = albumTopoNodes.get(ifNodeName); + if (ctxtNode != null) { + albumTopoNodes.remove(ifNodeName); + logger.trace("-- removed node: <" + ifNodeName + ">"); + } + + logger.trace("-- creating node: <" + ifNodeName + ">"); + ctxtNode = "{name:" + ifNodeName + ", mnname:" + ifMininetName + "}"; + albumTopoNodes.put(ifNodeName, ctxtNode); + + if (logger.isTraceEnabled()) { + logger.trace(" >> *** Nodes ***"); + if (albumTopoNodes != null) { + for (var i = 0; i < albumTopoNodes.values().size(); i++) { + logger.trace(" >> >> " + albumTopoNodes.values().get(i).get("name") + " : " + + albumTopoNodes.values().get(i).get("mnname")); + } + } else { + logger.trace(" >> >> node album is null"); + } + } + + executor.outFields["report"] = "node ctxt :: added node " + ifNodeName; + + logger.info("vpnsla: ctxt added node " + ifNodeName); + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + logger.trace("finished: " + executor.subject.id); + logger.debug("."); + +Context Logic Edges +-------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The edge context logic simply takes the trigger event + (for context) and creates a new edge in the local + context topology. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var ifEdgeName = executor.inFields["edgeName"]; + var ifEdgeStatus = executor.inFields["status"]; + + var albumTopoEdges = executor.getContextAlbum("albumTopoEdges"); + + logger.trace("-- got infields, testing existing edge"); + + var ctxtEdge = albumTopoEdges.get(ifEdgeName); + if (ctxtEdge != null) { + albumTopoEdges.remove(ifEdgeName); + logger.trace("-- removed edge: <" + ifEdgeName + ">"); + } + + logger.trace("-- creating edge: <" + ifEdgeName + ">"); + ctxtEdge = "{name:" + ifEdgeName + ", start:" + executor.inFields["start"] + ", end:" + executor.inFields["end"] + + ", active:" + ifEdgeStatus + "}"; + albumTopoEdges.put(ifEdgeName, ctxtEdge); + + if (logger.isTraceEnabled()) { + logger.trace(" >> *** Edges ***"); + if (albumTopoEdges != null) { + for (var i = 0; i < albumTopoEdges.values().size(); i++) { + logger.trace(" >> >> " + albumTopoEdges.values().get(i).get("name") + " \t " + + albumTopoEdges.values().get(i).get("start") + " --> " + albumTopoEdges.values().get(i).get("end") + + " \t " + albumTopoEdges.values().get(i).get("active")); + } + } else { + logger.trace(" >> >> edge album is null"); + } + } + + executor.outFields["report"] = "edge ctxt :: added edge " + ifEdgeName; + + logger.info("vpnsla: ctxt added edge " + ifEdgeName); + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + logger.trace("finished: " + executor.subject.id); + logger.debug("."); + +Context Logic Customer +---------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The customer context logic simply takes the trigger + event (for context) and creates a new customer in the + local context topology. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var ifCustomerName = executor.inFields["customerName"]; + var ifLinks = executor.inFields["links"]; + + logger.trace("-- got infields, testing existing customer"); + var ctxtCustomer = executor.getContextAlbum("albumCustomerMap").get(ifCustomerName); + if (ctxtCustomer != null) { + executor.getContextAlbum("albumCustomerMap").remove(ifCustomerName); + logger.trace("-- removed customer: <" + ifCustomerName + ">"); + } + + logger.trace("-- creating customer: <" + ifCustomerName + ">"); + var links = new Array(); + for (var i = 0; i < ifLinks.split(" ").length; i++) { + var link = executor.getContextAlbum("albumTopoEdges").get(ifLinks.split(" ")[i]); + if (link != null) { + logger.trace("-- link: <" + ifLinks.split(" ")[i] + ">"); + links.push(ifLinks.split(" ")[i]); + } else { + logger.trace("-- unknown link: <" + ifLinks.split(" ")[i] + "> for customer <" + ifCustomerName + ">"); + } + } + logger.trace("-- links: <" + links + ">"); + ctxtCustomer = "{customerName:" + ifCustomerName + ", dtSLA:" + executor.inFields["dtSLA"] + ", dtYTD:" + + executor.inFields["dtYTD"] + ", priority:" + executor.inFields["priority"] + ", satisfaction:" + + executor.inFields["satisfaction"] + ", links:[" + links + "]}"; + + executor.getContextAlbum("albumCustomerMap").put(ifCustomerName, ctxtCustomer); + + if (logger.isTraceEnabled()) { + logger.trace(" >> *** Customers ***"); + if (executor.getContextAlbum("albumCustomerMap") != null) { + for (var i = 0; i < executor.getContextAlbum("albumCustomerMap").values().size(); i++) { + logger.trace(" >> >> " + executor.getContextAlbum("albumCustomerMap").values().get(i).get("customerName") + + " : " + "dtSLA=" + executor.getContextAlbum("albumCustomerMap").values().get(i).get("dtSLA") + + " : " + "dtYTD=" + executor.getContextAlbum("albumCustomerMap").values().get(i).get("dtYTD") + + " : " + "links=" + executor.getContextAlbum("albumCustomerMap").values().get(i).get("links") + + " : " + "priority=" + + executor.getContextAlbum("albumCustomerMap").values().get(i).get("priority") + " : " + + "satisfaction=" + + executor.getContextAlbum("albumCustomerMap").values().get(i).get("satisfaction")); + } + } else { + logger.trace(" >> >> customer album is null"); + } + } + + executor.outFields["report"] = "customer ctxt :: added customer: " + ifCustomerName; + + logger.info("vpnsla: ctxt added customer " + ifCustomerName); + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + logger.trace("finished: " + executor.subject.id); + logger.debug("."); + +Logic: Match +------------ + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + This is the logic for the match state. It is kept very + simple. Beside taking the trigger event, it also + creates a timestamp. This timestamp is later used for + SLA and downtime calculations as well as for some + performance information of the policy. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + + var now = new Date().getTime(); + executor.outFields["matchStart"] = now; + + importClass(org.slf4j.LoggerFactory); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME); + + var ifEdgeName = executor.inFields["edgeName"]; + var ifLinkStatus = executor.inFields["status"]; + + var albumTopoEdges = executor.getContextAlbum("albumTopoEdges"); + + logger.trace("-- got infields, checking albumTopoEdges changes"); + + var active = false; + switch (ifLinkStatus.toString()) { + case "UP": + active = true; + break; + case "DOWN": + active = false; + break; + default: + active = false; + logger.error("-- trigger sent unknown link status <" + ifLinkStatus + "> for link <" + ifEdgeName + ">"); + rootLogger.error(executor.subject.id + " " + "-- trigger sent unknown link status <" + ifLinkStatus + + "> for link <" + ifEdgeName + ">"); + } + + var link = albumTopoEdges.get(ifEdgeName); + if (link == null) { + logger.trace("-- link <" + ifEdgeName + "> not in albumTopoEdges"); + } else { + logger.trace("-- found link <" + link + "> in albumTopoEdges"); + logger.trace("-- active <" + active + "> : link.active <" + link.get("active") + ">"); + if (active != link.get("active")) { + link.put("active", active); + logger.trace("-- link <" + ifEdgeName + "> status changed to <active:" + link.get("active") + ">"); + executor.outFields["hasChanged"] = true; + } else { + logger.trace("-- link <" + ifEdgeName + "> status not changed <active:" + link.get("active") + ">"); + executor.outFields["hasChanged"] = false; + } + } + + executor.outFields["edgeName"] = ifEdgeName; + executor.outFields["status"] = ifLinkStatus; + + logger.info("vpnsla: detected " + ifEdgeName + " as " + ifLinkStatus); + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + logger.trace("finished: " + executor.subject.id); + logger.debug(".m"); + + +Logic: Policy Establish State +----------------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + This is the logic for the establish state. It is the + most complicated logic, since establishing a situation + for a decision is the most important part of any + policy. First, the policy describes what we find (the + switch block), in terms of 8 normal situations and 1 + extreme error case. + + .. container:: paragraph + + If required, it creates local context information for + the problem (if it is new) or updates it (if the + problem still exists). It also calculates customer SLA + downtime and checks for any SLA violations. Finally, + it creates a situation object. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + importClass(org.slf4j.LoggerFactory); + + importClass(java.util.ArrayList); + + importClass(org.apache.avro.generic.GenericData.Array); + importClass(org.apache.avro.generic.GenericRecord); + importClass(org.apache.avro.Schema); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME); + + var ifEdgeName = executor.inFields["edgeName"]; + var ifEdgeStatus = executor.inFields["status"].toString(); + var ifhasChanged = executor.inFields["hasChanged"]; + var ifMatchStart = executor.inFields["matchStart"]; + + var albumCustomerMap = executor.getContextAlbum("albumCustomerMap"); + var albumProblemMap = executor.getContextAlbum("albumProblemMap"); + + var linkProblem = albumProblemMap.get(ifEdgeName); + + // create outfiled for situation + var situation = executor.subject.getOutFieldSchemaHelper("situation").createNewInstance(); + situation.put("violatedSLAs", new ArrayList()); + + // create a string as states+hasChanged+linkProblem and switch over it + var switchTest = ifEdgeStatus + ":" + ifhasChanged + ":" + (linkProblem == null ? "no" : "yes"); + switch (switchTest) { + case "UP:false:no": + logger.trace("-- edge <" + ifEdgeName + "> UP:false:no => everything ok"); + logger.info("vpnsla: everything ok"); + situation.put("problemID", "NONE"); + break; + case "UP:false:yes": + logger.trace("-- edge <" + ifEdgeName + "> UP:false:yes ==> did we miss earlier up?, removing problem"); + albumProblemMap.remove(ifEdgeName); + linkProblem = null; + situation.put("problemID", "NONE"); + break; + case "UP:true:no": + logger.trace("-- edge <" + ifEdgeName + "> UP:true:no ==> did we miss the earlier down?, creating new problem"); + situation.put("problemID", ifEdgeName); + break; + case "UP:true:yes": + logger.trace("-- edge <" + ifEdgeName + "> UP:true:yes ==> detected solution, link up again"); + logger.info("vpnsla: problem solved"); + linkProblem.put("endTime", ifMatchStart); + linkProblem.put("status", "SOLVED"); + situation.put("problemID", "NONE"); + break; + case "DOWN:false:no": + logger.trace("-- edge <" + ifEdgeName + "> DOWN:false:no ==> did we miss an earlier down?, creating new problem"); + situation.put("problemID", ifEdgeName); + break; + case "DOWN:false:yes": + logger.trace("-- edge <" + ifEdgeName + "> DOWN:false:yes ==> problem STILL exists"); + logger.info("vpnsla: problem still exists"); + linkProblem.put("status", "STILL"); + situation.put("problemID", ifEdgeName); + break; + case "DOWN:true:no": + logger.trace("-- edge <" + ifEdgeName + "> DOWN:true:no ==> found NEW problem"); + logger.info("vpnsla: this is a new problem"); + situation.put("problemID", ifEdgeName); + break; + case "DOWN:true:yes": + logger.trace("-- edge <" + ifEdgeName + + "> DOWN:true:yes ==> did we miss to remove an earlier problem?, remove and create new problem"); + linkProblem = null; + situation.put("problemID", ifEdgeName); + break; + + default: + logger.error("-- input wrong for edge" + ifEdgeName + ": edge status <" + ifEdgeStatus + + "> unknown or null on hasChanged <" + ifhasChanged + ">"); + rootLogger.error("-- input wrong for edge" + ifEdgeName + ": edge status <" + ifEdgeStatus + + "> unknown or null on hasChanged <" + ifhasChanged + ">"); + } + + // create new problem if situation requires it + if (situation.get("problemID").equals(ifEdgeName) && linkProblem == null) { + logger.trace("-- edge <" + ifEdgeName + "> creating new problem"); + linkProblem = albumProblemMap.getSchemaHelper().createNewInstance(); + linkProblem.put("edge", ifEdgeName); + linkProblem.put("startTime", ifMatchStart); + linkProblem.put("lastUpdate", ifMatchStart); + linkProblem.put("endTime", 0); + linkProblem.put("status", "NEW"); + linkProblem.put("edgeUsedBy", new ArrayList()); + linkProblem.put("impededLast", new ArrayList()); + + for (var i = 0; i < albumCustomerMap.values().size(); i++) { + var customer = albumCustomerMap.values().get(i); + var customerLinks = albumCustomerMap.values().get(i).get("links"); + for (var k = 0; k < customerLinks.size(); k++) { + if (customerLinks.get(k) == ifEdgeName) { + linkProblem.get("edgeUsedBy").add(customer.get("customerName")); + } + } + } + albumProblemMap.put(ifEdgeName, linkProblem); + logger.trace("-- edge <" + ifEdgeName + "> problem created as <" + linkProblem + ">"); + } + + // set dtYTD if situation requires it + if (linkProblem != null && (linkProblem.get("status") == "STILL" || linkProblem.get("status") == "SOLVED")) { + var linkDownTimeinSecs = (ifMatchStart - linkProblem.get("lastUpdate")) / 1000; + logger.trace("-- edge <" + ifEdgeName + "> down time: " + linkDownTimeinSecs + " s"); + for (var k = 0; k < linkProblem.get("impededLast").size(); k++) { + for (var i = 0; i < albumCustomerMap.values().size(); i++) { + var customer = albumCustomerMap.values().get(i); + if (customer.get("customerName").equals(linkProblem.get("impededLast").get(k))) { + logger.info("-- vpnsla: customer " + customer.get("customerName") + " YDT downtime increased from " + + customer.get("dtYTD") + " to " + (customer.get("dtYTD") + linkDownTimeinSecs)); + customer.put("dtYTD", (customer.get("dtYTD") + linkDownTimeinSecs)) + } + } + } + // set lastUpdate to this policy execution for next execution calculation + linkProblem.put("lastUpdate", ifMatchStart); + } + + // check SLA violations if situation requires it + if (linkProblem != null && linkProblem.get("status") != "SOLVED") { + logger.info(">e> customer\tDT SLA\tDT YTD\tviolation"); + for (var i = 0; i < albumCustomerMap.values().size(); i++) { + var customer = albumCustomerMap.values().get(i); + if (customer.get("dtYTD") > customer.get("dtSLA")) { + situation.get("violatedSLAs").add(customer.get("customerName")); + logger.info(">e> " + customer.get("customerName") + "\t\t" + customer.get("dtSLA") + "s\t" + + customer.get("dtYTD") + "s\t" + "!!"); + } else { + logger.info(">e> " + customer.get("customerName") + "\t\t" + customer.get("dtSLA") + "s\t" + + customer.get("dtYTD") + "s"); + } + } + } + + executor.outFields["situation"] = situation; + + logger.trace("-- out fields <" + executor.outFields + ">"); + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + logger.trace("finished: " + executor.subject.id); + logger.debug(".e"); + +Logic: Policy Decide State +-------------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The decide state can select between different + algorithms depending on the situation. So it needs a + Task Selection Logic (TSL). This TSL select a task in + the current policy execution (i.e. potentially a + different one per execution). + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + importClass(org.slf4j.LoggerFactory); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id + " - TSL"); + + var rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME); + + var ifSituation = executor.inFields["situation"]; + + var albumProblemMap = executor.getContextAlbum("albumProblemMap"); + + var returnValueType = Java.type("java.lang.Boolean"); + if (ifSituation.get("problemID") == "NONE") { + logger.trace("-- situation has no problem, selecting <VpnSlaPolicyDecideNoneTask>"); + executor.subject.getTaskKey("VpnSlaPolicyDecideNoneTask").copyTo(executor.selectedTask); + var returnValue = new returnValueType(true); + } else if (albumProblemMap.get(ifSituation.get("problemID")).get("status") == "SOLVED") { + logger.trace("-- situation is solved, selecting <VpnSlaPolicyDecideSolvedTask>"); + executor.subject.getTaskKey("VpnSlaPolicyDecideSolvedTask").copyTo(executor.selectedTask); + var returnValue = new returnValueType(true); + } else if (ifSituation.get("violatedSLAs") != null && ifSituation.get("violatedSLAs").size() > 0) { + logger.trace("-- situation is problem with violations, selecting <VpnSlaPolicyDecidePriorityTask>"); + executor.subject.getTaskKey("VpnSlaPolicyDecidePriorityTask").copyTo(executor.selectedTask); + var returnValue = new returnValueType(true); + } else if (ifSituation.get("violatedSLAs") != null && ifSituation.get("violatedSLAs").size() == 0) { + logger.trace("-- situation is problem without violations, selecting <VpnSlaPolicyDecideSlaTask>"); + executor.subject.getTaskKey("VpnSlaPolicyDecideSlaTask").copyTo(executor.selectedTask); + var returnValue = new returnValueType(true); + } else { + logger.error("-- detected unknown decision for situation <" + ifSituation.get("problemID") + ">"); + rootLogger.error(executor.subject.id + " " + "-- detected unknown decision for situation <" + + ifSituation.get("problemID") + ">"); + var returnValue = new returnValueType(false); + } + + logger.trace("finished: " + executor.subject.id); + logger.debug(".d-tsl"); + + .. container:: paragraph + + The actual task logic are then ``none``, ``solved``, + ``sla``, and ``priority``. + +Logic: Decide None +------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + importClass(org.slf4j.LoggerFactory); + + importClass(java.util.ArrayList); + + importClass(org.apache.avro.generic.GenericData.Array); + importClass(org.apache.avro.generic.GenericRecord); + importClass(org.apache.avro.Schema); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME); + + var ifSituation = executor.inFields["situation"]; + + // create outfiled for decision + var decision = executor.subject.getOutFieldSchemaHelper("decision").createNewInstance(); + decision.put("description", "None, everything is ok"); + decision.put("decision", "NONE"); + decision.put("customers", new ArrayList()); + + var returnValueType = Java.type("java.lang.Boolean"); + if (ifSituation.get("problemID") == "NONE") { + logger.trace("-- no problem, everything ok"); + var returnValue = new returnValueType(true); + } else { + logger.trace("-- wrong problemID <" + problemID + "> for NONE task, we should not be here"); + rootLogger.error(executor.subject.id + " " + "-- wrong problemID <" + problemID + + "> for NONE task, we should not be here"); + var returnValue = new returnValueType(false); + } + + executor.outFields["decision"] = decision; + + logger.trace("finished: " + executor.subject.id); + logger.debug(".d-non"); + +Logic: Decide Solved +--------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + importClass(org.slf4j.LoggerFactory); + + importClass(java.util.ArrayList); + + importClass(org.apache.avro.generic.GenericData.Array); + importClass(org.apache.avro.generic.GenericRecord); + importClass(org.apache.avro.Schema); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME); + + var ifSituation = executor.inFields["situation"]; + + var albumProblemMap = executor.getContextAlbum("albumProblemMap"); + + // create outfiled for decision + var decision = executor.subject.getOutFieldSchemaHelper("decision").createNewInstance(); + decision.put("description", "None, everything is ok"); + decision.put("decision", "REBUILD"); + decision.put("customers", new ArrayList()); + decision.put("problemID", ifSituation.get("problemID")); + + var returnValueType = Java.type("java.lang.Boolean"); + if (albumProblemMap.get(ifSituation.get("problemID")).get("status") == "SOLVED") { + logger.trace("-- problem solved"); + var returnValue = new returnValueType(true); + } else { + logger.trace("-- wrong problemID <" + problemID + "> for SOLVED task, we should not be here"); + rootLogger.error(executor.subject.id + " " + "-- wrong problemID <" + problemID + + "> for SOLVED task, we should not be here"); + var returnValue = new returnValueType(false); + } + + executor.outFields["decision"] = decision; + + logger.info("vpnsla: sla solved, problem solved"); + + logger.trace("finished: " + executor.subject.id); + logger.debug(".d-non"); + +Logic: Decide SLA +------------------ + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + importClass(org.slf4j.LoggerFactory); + + importClass(java.util.ArrayList); + + importClass(org.apache.avro.generic.GenericData.Array); + importClass(org.apache.avro.generic.GenericRecord); + importClass(org.apache.avro.Schema); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME); + + var ifSituation = executor.inFields["situation"]; + + var albumCustomerMap = executor.getContextAlbum("albumCustomerMap"); + var albumProblemMap = executor.getContextAlbum("albumProblemMap"); + + // create outfiled for decision + var decision = executor.subject.getOutFieldSchemaHelper("decision").createNewInstance(); + decision.put("description", "Impede given customers selected based on maximum SLA delta"); + decision.put("decision", "IMPEDE"); + decision.put("problemID", ifSituation.get("problemID")); + decision.put("customers", new ArrayList()); + + var problem = albumProblemMap.get(ifSituation.get("problemID")); + var returnValueType = Java.type("java.lang.Boolean"); + if (problem != null && ifSituation.get("violatedSLAs").size() == 0) { + logger.trace("-- impede by maximum SLA"); + var customer = ""; + var customerSla = 0; + for (var i = 0; i < problem.get("edgeUsedBy").size(); i++) { + customerCtxt = albumCustomerMap.get(problem.get("edgeUsedBy").get(i).toString()); + if (customerSla == 0) { + customerSla = customerCtxt.get("dtSLA") - customerCtxt.get("dtYTD"); + } + if ((customerCtxt.get("dtSLA") - customerCtxt.get("dtYTD")) >= customerSla) { + customer = customerCtxt.get("customerName"); + customerSla = (customerCtxt.get("dtSLA") - customerCtxt.get("dtYTD")); + } + } + decision.get("customers").add(customer); + var returnValue = new returnValueType(true); + } else { + logger.trace("-- wrong problemID <" + ifSituation.get("problemID") + "> for SLA task, we should not be here"); + rootLogger.error(executor.subject.id + " " + "-- wrong problemID <" + ifSituation.get("problemID") + + "> for SLA task, we should not be here"); + var returnValue = new returnValueType(false); + } + + // set impededLast to decision[customers] + problem.get("impededLast").clear(); + problem.get("impededLast").addAll(decision.get("customers")); + + executor.outFields["decision"] = decision; + logger.trace("-- decision: " + decision); + + logger.info("vpnsla: sla balance, impeding customers " + decision.get("customers")); + + logger.trace("finished: " + executor.subject.id); + logger.debug(".d-sla"); + +Logic: Decide Priority +---------------------- + + .. container:: sect2 + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + importClass(org.slf4j.LoggerFactory); + + importClass(java.util.ArrayList); + + importClass(org.apache.avro.generic.GenericData.Array); + importClass(org.apache.avro.generic.GenericRecord); + importClass(org.apache.avro.Schema); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME); + + var ifSituation = executor.inFields["situation"]; + + var albumCustomerMap = executor.getContextAlbum("albumCustomerMap"); + var albumProblemMap = executor.getContextAlbum("albumProblemMap"); + + // create outfiled for decision + var decision = executor.subject.getOutFieldSchemaHelper("decision").createNewInstance(); + decision.put("description", "None, everything is ok"); + decision.put("decision", "IMPEDE"); + decision.put("problemID", ifSituation.get("problemID")); + decision.put("customers", new ArrayList()); + + var problem = albumProblemMap.get(ifSituation.get("problemID")); + var returnValueType = Java.type("java.lang.Boolean"); + if (problem != null && ifSituation.get("violatedSLAs").size() > 0) { + logger.trace("-- impede by priority"); + for (var i = 0; i < problem.get("edgeUsedBy").size(); i++) { + customerCtxt = albumCustomerMap.get(problem.get("edgeUsedBy").get(i).toString()); + if (customerCtxt.get("priority") == false) { + decision.get("customers").add(customerCtxt.get("customerName")); + } + } + var returnValue = new returnValueType(true); + } else { + logger.trace("-- wrong problemID <" + ifSituation.get("problemID") + "> for PRIORITY task, we should not be here"); + rootLogger.error(executor.subject.id + " " + "-- wrong problemID <" + ifSituation.get("problemID") + + "> for PRIORITY task, we should not be here"); + var returnValue = new returnValueType(false); + } + + // set impededLast to decision[customers] + problem.get("impededLast").clear(); + problem.get("impededLast").addAll(decision.get("customers")); + + executor.outFields["decision"] = decision; + logger.trace("-- decision: " + decision); + + logger.info("vpnsla: priority, impeding customers " + decision.get("customers")); + + logger.trace("finished: " + executor.subject.id); + logger.debug(".d-pri"); + +Logic: Policy Act State +------------------------ + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + This is the logic for the act state. It is simply + selecting an action, and creating the repsonse event + for the orchestrator (the output of the policy). + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + load("nashorn:mozilla_compat.js"); + + var logger = executor.logger; + logger.trace("start: " + executor.subject.id); + logger.trace("-- infields: " + executor.inFields); + + var ifDecision = executor.inFields["decision"]; + var ifMatchStart = executor.inFields["matchStart"]; + + var albumCustomerMap = executor.getContextAlbum("albumCustomerMap"); + var albumProblemMap = executor.getContextAlbum("albumProblemMap"); + + switch (ifDecision.get("decision").toString()) { + case "NONE": + executor.outFields["edgeName"] = ""; + executor.outFields["action"] = ""; + break; + case "IMPEDE": + for (var i = 0; i < ifDecision.get("customers").size(); i++) { + customer = albumCustomerMap.get(ifDecision.get("customers").get(i).toString()); + executor.outFields["edgeName"] = customer.get("links").get(0); + executor.outFields["action"] = "firewall"; + } + break; + case "REBUILD": + // finally solved, remove problem + albumProblemMap.remove(ifDecision.get("problemID")); + executor.outFields["edgeName"] = "L10"; // this is ###static### + executor.outFields["action"] = "rebuild"; // this is ###static### + break; + default: + + } + + var returnValueType = Java.type("java.lang.Boolean"); + var returnValue = new returnValueType(true); + + if (executor.outFields["action"] != "") { + logger.info("vpnsla: action is to " + executor.outFields["action"] + " " + executor.outFields["edgeName"]); + } else { + logger.info("vpnsla: no action required"); + } + + logger.trace("-- outfields: " + executor.outFields); + logger.trace("finished: " + executor.subject.id); + logger.debug(".a"); + + var now = new Date().getTime(); + logger.info("VPN SLA finished in " + (now - ifMatchStart) + " ms"); + +CLI Spec +-------- + + .. container:: sect1 + + .. rubric:: Complete Policy Definition + :name: complete_policy_definition + + .. container:: sectionbody + + .. container:: paragraph + + The complete policy definition is realized using the + APEX CLI Editor. The script below shows the actual + policy specification. All logic and schemas are + included (as macro file). + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + #------------------------------------------------------------------------------- + # ============LICENSE_START======================================================= + # Copyright (C) 2016-2018 Ericsson. All rights reserved. + # ================================================================================ + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ============LICENSE_END========================================================= + #------------------------------------------------------------------------------- + + # ============LICENSE_START======================================================= + # Copyright (C) 2016-2018 Ericsson. All rights reserved. + # ================================================================================ + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ============LICENSE_END========================================================= + + model create name=PCVS-VpnSla version=1.0.0 description="Policies-Controlled Video Streaming, VPN SLA Policy Model" + + + + schema create name=reportDecl version=1.0.0 description="Report of activities of a policy/task" flavour=Java schema=java.lang.String + event create name=ReportOut version=1.0.0 description="Report of a policy (issued by a task)" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="APEX" target="CtxtManagement" + event parameter create name=ReportOut version=1.0.0 parName=report schemaName=reportDecl schemaVersion=1.0.0 + + schema create name=timestampDecl version=1.0.0 description="Timestamp" flavour=Java schema=java.lang.Long + + + + schema create name=ctxtEdgeNameDecl version=1.0.0 description="Topology Edges: edge (link) name" flavour=Java schema=java.lang.String + schema create name=ctxtEdgeStartDecl version=1.0.0 description="Topology Edges: edge endpoint (start)" flavour=Java schema=java.lang.String + schema create name=ctxtEdgeEndDecl version=1.0.0 description="Topology Edges: edge endpoint (end)" flavour=Java schema=java.lang.String + schema create name=ctxtEdgeStatusDecl version=1.0.0 description="Topology Edges: edge status as up (true) or down (false)" flavour=Java schema=java.lang.Boolean + + schema create name=ctxtTopologyEdgesDecl version=1.0.0 description="Topology Edges Context Map" flavour=Avro schema=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/topology-edges.avsc" + LE + album create name=albumTopoEdges scope=global writable=true schemaName=ctxtTopologyEdgesDecl + + + task create name=EdgeContextTask version=1.0.0 description="This task adds event context to edge context" + task inputfield create name=EdgeContextTask version=1.0.0 fieldName=edgeName schemaName=ctxtEdgeNameDecl schemaVersion=1.0.0 + task inputfield create name=EdgeContextTask version=1.0.0 fieldName=start schemaName=ctxtEdgeStartDecl schemaVersion=1.0.0 + task inputfield create name=EdgeContextTask version=1.0.0 fieldName=end schemaName=ctxtEdgeEndDecl schemaVersion=1.0.0 + task inputfield create name=EdgeContextTask version=1.0.0 fieldName=status schemaName=ctxtEdgeStatusDecl schemaVersion=1.0.0 + task outputfield create name=EdgeContextTask version=1.0.0 fieldName=report schemaName=reportDecl schemaVersion=1.0.0 + task contextref create name=EdgeContextTask albumName=albumTopoEdges + task logic create name=EdgeContextTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/ctxt-edges.js" + LE + + event create name=EdgeContextEventIn version=1.0.0 description="Event to add an Edge to engine Context" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="CtxtManagement" target="APEX" + event parameter create name=EdgeContextEventIn version=1.0.0 parName=edgeName schemaName=ctxtEdgeNameDecl schemaVersion=1.0.0 + event parameter create name=EdgeContextEventIn version=1.0.0 parName=start schemaName=ctxtEdgeStartDecl schemaVersion=1.0.0 + event parameter create name=EdgeContextEventIn version=1.0.0 parName=end schemaName=ctxtEdgeEndDecl schemaVersion=1.0.0 + event parameter create name=EdgeContextEventIn version=1.0.0 parName=status schemaName=ctxtEdgeStatusDecl schemaVersion=1.0.0 + + policy create name=EdgeContextPolicy version=1.0.0 description="Policy that adds an edge to context" template=FREEFORM firstState=EdgeContextState + policy state create name=EdgeContextPolicy version=1.0.0 stateName=EdgeContextState triggerName=EdgeContextEventIn triggerVersion=1.0.0 defaultTaskName=EdgeContextTask defaultTaskVersion=1.0.0 + policy state output create name=EdgeContextPolicy version=1.0.0 stateName=EdgeContextState outputName=EdgeContextState_Output_Direct eventName=ReportOut eventVersion=1.0.0 nextState=NULL + policy state taskref create name=EdgeContextPolicy version=1.0.0 stateName=EdgeContextState taskLocalName=doContext taskName=EdgeContextTask taskVersion=1.0.0 outputType=DIRECT outputName=EdgeContextState_Output_Direct + + + + schema create name=ctxtNodeNameDecl version=1.0.0 description="Topology Nodes: node name" flavour=Java schema=java.lang.String + schema create name=ctxtNodeMininetNameDecl version=1.0.0 description="Topology Nodes: node name in Mininet" flavour=Java schema=java.lang.String + + schema create name=ctxtTopologyNodesDecl version=1.0.0 description="Topology Nodes Context Map" flavour=Avro schema=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/topology-nodes.avsc" + LE + album create name=albumTopoNodes scope=global writable=true schemaName=ctxtTopologyNodesDecl + + task create name=NodeContextTask version=1.0.0 description="This task adds event context to node context" + task inputfield create name=NodeContextTask version=1.0.0 fieldName=nodeName schemaName=ctxtNodeNameDecl schemaVersion=1.0.0 + task inputfield create name=NodeContextTask version=1.0.0 fieldName=mininetName schemaName=ctxtNodeMininetNameDecl schemaVersion=1.0.0 + task outputfield create name=NodeContextTask version=1.0.0 fieldName=report schemaName=reportDecl schemaVersion=1.0.0 + task contextref create name=NodeContextTask albumName=albumTopoNodes + task logic create name=NodeContextTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/ctxt-nodes.js" + LE + + event create name=NodeContextEventIn version=1.0.0 description="Event to add Node to engine Context" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="CtxtManagement" target="APEX" + event parameter create name=NodeContextEventIn version=1.0.0 parName=nodeName schemaName=ctxtNodeNameDecl schemaVersion=1.0.0 + event parameter create name=NodeContextEventIn version=1.0.0 parName=mininetName schemaName=ctxtNodeMininetNameDecl schemaVersion=1.0.0 + + policy create name=NodeContextPolicy version=1.0.0 description="Policy that adds an node to context" template=FREEFORM firstState=NodeContextState + policy state create name=NodeContextPolicy version=1.0.0 stateName=NodeContextState triggerName=NodeContextEventIn triggerVersion=1.0.0 defaultTaskName=NodeContextTask defaultTaskVersion=1.0.0 + policy state output create name=NodeContextPolicy version=1.0.0 stateName=NodeContextState outputName=NodeContextState_Output_Direct eventName=ReportOut eventVersion=1.0.0 nextState=NULL + policy state taskref create name=NodeContextPolicy version=1.0.0 stateName=NodeContextState taskLocalName=doContext taskName=NodeContextTask taskVersion=1.0.0 outputType=DIRECT outputName=NodeContextState_Output_Direct + + + + + schema create name=ctxtCustomerNameDecl version=1.0.0 description="Customer Context: customer name" flavour=Java schema=java.lang.String + schema create name=ctxtCustomerPriorityDecl version=1.0.0 description="Customer Context: priority flag" flavour=Java schema=java.lang.Boolean + schema create name=ctxtCustomerSatisfactionDecl version=1.0.0 description="Customer Context: satisfaction in percent" flavour=Java schema=java.lang.Integer + schema create name=ctxtCustomerDowntimeSLADecl version=1.0.0 description="Customer Context: contracted downtime as per SLA" flavour=Java schema=java.lang.Integer + schema create name=ctxtCustomerDowntimeYTDDecl version=1.0.0 description="Customer Context: year-to-date downtime experienced" flavour=Java schema=java.lang.Integer + schema create name=ctxtCustomerLinksDecl version=1.0.0 description="Customer Context: links a customer uses (for events/task)" flavour=Java schema=java.lang.String + + schema create name=ctxtCustomerMapDecl version=1.0.0 description="Map of customers with all known information" flavour=Avro schema=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/customers.avsc" + LE + album create name=albumCustomerMap scope=global writable=true schemaName=ctxtCustomerMapDecl + + task create name=CustomerContextTask version=1.0.0 description="This task adds event context to customer context" + task inputfield create name=CustomerContextTask version=1.0.0 fieldName=customerName schemaName=ctxtCustomerNameDecl schemaVersion=1.0.0 + task inputfield create name=CustomerContextTask version=1.0.0 fieldName=priority schemaName=ctxtCustomerPriorityDecl schemaVersion=1.0.0 + task inputfield create name=CustomerContextTask version=1.0.0 fieldName=satisfaction schemaName=ctxtCustomerSatisfactionDecl schemaVersion=1.0.0 + task inputfield create name=CustomerContextTask version=1.0.0 fieldName=dtSLA schemaName=ctxtCustomerDowntimeSLADecl schemaVersion=1.0.0 + task inputfield create name=CustomerContextTask version=1.0.0 fieldName=dtYTD schemaName=ctxtCustomerDowntimeYTDDecl schemaVersion=1.0.0 + task inputfield create name=CustomerContextTask version=1.0.0 fieldName=links schemaName=ctxtCustomerLinksDecl schemaVersion=1.0.0 + task outputfield create name=CustomerContextTask version=1.0.0 fieldName=report schemaName=reportDecl schemaVersion=1.0.0 + task contextref create name=CustomerContextTask albumName=albumCustomerMap + task contextref create name=CustomerContextTask albumName=albumTopoEdges + task logic create name=CustomerContextTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/ctxt-customer.js" + LE + + event create name=CustomerContextEventIn version=1.0.0 description="Event to add Customers to engine Context" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="CtxtManagement" target="APEX" + event parameter create name=CustomerContextEventIn version=1.0.0 parName=customerName schemaName=ctxtCustomerNameDecl schemaVersion=1.0.0 + event parameter create name=CustomerContextEventIn version=1.0.0 parName=priority schemaName=ctxtCustomerPriorityDecl schemaVersion=1.0.0 + event parameter create name=CustomerContextEventIn version=1.0.0 parName=satisfaction schemaName=ctxtCustomerSatisfactionDecl schemaVersion=1.0.0 + event parameter create name=CustomerContextEventIn version=1.0.0 parName=dtSLA schemaName=ctxtCustomerDowntimeSLADecl schemaVersion=1.0.0 + event parameter create name=CustomerContextEventIn version=1.0.0 parName=dtYTD schemaName=ctxtCustomerDowntimeYTDDecl schemaVersion=1.0.0 + event parameter create name=CustomerContextEventIn version=1.0.0 parName=links schemaName=ctxtCustomerLinksDecl schemaVersion=1.0.0 + + policy create name=CustomerContextPolicy version=1.0.0 description="Policy that adds Customer information to engine context" template=FREEFORM firstState=CustomerContextState + policy state create name=CustomerContextPolicy version=1.0.0 stateName=CustomerContextState triggerName=CustomerContextEventIn triggerVersion=1.0.0 defaultTaskName=CustomerContextTask defaultTaskVersion=1.0.0 + policy state output create name=CustomerContextPolicy version=1.0.0 stateName=CustomerContextState outputName=CustomerContextState_Output_Direct eventName=ReportOut eventVersion=1.0.0 nextState=NULL + policy state taskref create name=CustomerContextPolicy version=1.0.0 stateName=CustomerContextState taskLocalName=doContext taskName=CustomerContextTask taskVersion=1.0.0 outputType=DIRECT outputName=CustomerContextState_Output_Direct + + + + + schema create name=edgeNameDecl version=1.0.0 description="Edge name" flavour=Java schema=java.lang.String + schema create name=edgeStatusDecl version=1.0.0 description="Statuf of the edge (UP, DOWN)" flavour=Avro schema=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/link-status.avsc" + LE + schema create name=edgeChangedDecl version=1.0.0 description="Status Change (true:change, false:no change)" flavour=Java schema=java.lang.Boolean + + task create name=VpnSlaPolicyMatchTask version=1.0.0 description="Pre-process an edge event" + task inputfield create name=VpnSlaPolicyMatchTask version=1.0.0 fieldName=edgeName schemaName=edgeNameDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyMatchTask version=1.0.0 fieldName=status schemaName=edgeStatusDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyMatchTask version=1.0.0 fieldName=edgeName schemaName=edgeNameDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyMatchTask version=1.0.0 fieldName=status schemaName=edgeStatusDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyMatchTask version=1.0.0 fieldName=hasChanged schemaName=edgeChangedDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyMatchTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task contextref create name=VpnSlaPolicyMatchTask albumName=albumTopoEdges + task logic create name=VpnSlaPolicyMatchTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-match.js" + LE + + + + + schema create name=problemMapDecl version=1.0.0 description="Map of problems with all known Information" flavour=Avro schema=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/problems.avsc" + LE + album create name=albumProblemMap scope=global writable=true schemaName=problemMapDecl + + schema create name=establishSituationDecl version=1.0.0 description="Establish: the situation that was established" flavour=Avro schema=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/situation.avsc" + LE + + task create name=VpnSlaPolicyEstablishTask version=1.0.0 description="Task taking a match event and establishing a situation" + task inputfield create name=VpnSlaPolicyEstablishTask version=1.0.0 fieldName=edgeName schemaName=edgeNameDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyEstablishTask version=1.0.0 fieldName=status schemaName=edgeStatusDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyEstablishTask version=1.0.0 fieldName=hasChanged schemaName=edgeChangedDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyEstablishTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyEstablishTask version=1.0.0 fieldName=situation schemaName=establishSituationDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyEstablishTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task contextref create name=VpnSlaPolicyEstablishTask albumName=albumProblemMap + task contextref create name=VpnSlaPolicyEstablishTask albumName=albumCustomerMap + task logic create name=VpnSlaPolicyEstablishTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-establish.js" + LE + + + + + schema create name=decideDecisionDecl version=1.0.0 description="Decide: the taken decision" flavour=Avro schema=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/decision.avsc" + LE + + task create name=VpnSlaPolicyDecideNoneTask version=1.0.0 description="Decide task for a 'none' problem" + task inputfield create name=VpnSlaPolicyDecideNoneTask version=1.0.0 fieldName=situation schemaName=establishSituationDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyDecideNoneTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyDecideNoneTask version=1.0.0 fieldName=decision schemaName=decideDecisionDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyDecideNoneTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task logic create name=VpnSlaPolicyDecideNoneTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-decide-none.js" + LE + + + task create name=VpnSlaPolicyDecideSlaTask version=1.0.0 description="Decide task solving the problem by balancing SLAs" + task inputfield create name=VpnSlaPolicyDecideSlaTask version=1.0.0 fieldName=situation schemaName=establishSituationDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyDecideSlaTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyDecideSlaTask version=1.0.0 fieldName=decision schemaName=decideDecisionDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyDecideSlaTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task contextref create name=VpnSlaPolicyDecideSlaTask albumName=albumCustomerMap + task contextref create name=VpnSlaPolicyDecideSlaTask albumName=albumProblemMap + task logic create name=VpnSlaPolicyDecideSlaTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-decide-sla.js" + LE + + + task create name=VpnSlaPolicyDecidePriorityTask version=1.0.0 description="Decide task solving the problem by using customer priorities" + task inputfield create name=VpnSlaPolicyDecidePriorityTask version=1.0.0 fieldName=situation schemaName=establishSituationDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyDecidePriorityTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyDecidePriorityTask version=1.0.0 fieldName=decision schemaName=decideDecisionDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyDecidePriorityTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task contextref create name=VpnSlaPolicyDecidePriorityTask albumName=albumCustomerMap + task contextref create name=VpnSlaPolicyDecidePriorityTask albumName=albumProblemMap + task logic create name=VpnSlaPolicyDecidePriorityTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-decide-priority.js" + LE + + + task create name=VpnSlaPolicyDecideSolvedTask version=1.0.0 description="Decide task solving the problem by using customer priorities" + task inputfield create name=VpnSlaPolicyDecideSolvedTask version=1.0.0 fieldName=situation schemaName=establishSituationDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyDecideSolvedTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyDecideSolvedTask version=1.0.0 fieldName=decision schemaName=decideDecisionDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyDecideSolvedTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task contextref create name=VpnSlaPolicyDecideSolvedTask albumName=albumProblemMap + task logic create name=VpnSlaPolicyDecideSolvedTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-decide-solved.js" + LE + + + + + schema create name=actionDecl version=1.0.0 description="An action for the actioning system" flavour=Java schema=java.lang.String + + task create name=VpnSlaPolicyActTask version=1.0.0 description="Task issueing an action for taken decision" + task inputfield create name=VpnSlaPolicyActTask version=1.0.0 fieldName=decision schemaName=decideDecisionDecl schemaVersion=1.0.0 + task inputfield create name=VpnSlaPolicyActTask version=1.0.0 fieldName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyActTask version=1.0.0 fieldName=edgeName schemaName=edgeNameDecl schemaVersion=1.0.0 + task outputfield create name=VpnSlaPolicyActTask version=1.0.0 fieldName=action schemaName=actionDecl schemaVersion=1.0.0 + task contextref create name=VpnSlaPolicyActTask albumName=albumCustomerMap + task contextref create name=VpnSlaPolicyActTask albumName=albumProblemMap + task logic create name=VpnSlaPolicyActTask logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-act.js" + LE + + + + + + + + event create name=VpnSlaTrigger version=1.0.0 description="Event triggering the VPN SLA policy" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="TriggerSys" target="VpnSlaMatch" + event parameter create name=VpnSlaTrigger version=1.0.0 parName=edgeName schemaName=edgeNameDecl schemaVersion=1.0.0 + event parameter create name=VpnSlaTrigger version=1.0.0 parName=status schemaName=edgeStatusDecl schemaVersion=1.0.0 + + event create name=VpnSlaMatchOut version=1.0.0 description="Event with matched trigger for the VPN SLA policy" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="VpnSlaMatch" target="VpnSlaEstablish" + event parameter create name=VpnSlaMatchOut version=1.0.0 parName=edgeName schemaName=edgeNameDecl schemaVersion=1.0.0 + event parameter create name=VpnSlaMatchOut version=1.0.0 parName=status schemaName=edgeStatusDecl schemaVersion=1.0.0 + event parameter create name=VpnSlaMatchOut version=1.0.0 parName=hasChanged schemaName=edgeChangedDecl schemaVersion=1.0.0 + event parameter create name=VpnSlaMatchOut version=1.0.0 parName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + + event create name=VpnSlaEstablishOut version=1.0.0 description="Event with situation for the SLA policy" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="SlaEstablish" target="SlaDecide" + event parameter create name=VpnSlaEstablishOut version=1.0.0 parName=situation schemaName=establishSituationDecl schemaVersion=1.0.0 + event parameter create name=VpnSlaEstablishOut version=1.0.0 parName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + + event create name=VpnSlaDecideOut version=1.0.0 description="Event with a decision for the SLA policy" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="SlaDecide" target="SlaAct" + event parameter create name=VpnSlaDecideOut version=1.0.0 parName=decision schemaName=decideDecisionDecl schemaVersion=1.0.0 + event parameter create name=VpnSlaDecideOut version=1.0.0 parName=matchStart schemaName=timestampDecl schemaVersion=1.0.0 + + event create name=VpnSlaActOut version=1.0.0 description="Event action" nameSpace=org.onap.policy.apex.examples.pcvs.vpnsla source="SlaAct" target="ActioningSystem" + event parameter create name=VpnSlaActOut version=1.0.0 parName=edgeName schemaName=edgeNameDecl schemaVersion=1.0.0 + event parameter create name=VpnSlaActOut version=1.0.0 parName=action schemaName=actionDecl schemaVersion=1.0.0 + + + policy create name=VpnSlaPolicy version=1.0.0 description="Policy deciding customer treatment based on SLAs as MEDA policy" template=FREEFORM firstState=VpnSlaPolicyMatchState + + policy state create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyActState triggerName=VpnSlaDecideOut triggerVersion=1.0.0 defaultTaskName=VpnSlaPolicyActTask defaultTaskVersion=1.0.0 + policy state output create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyActState outputName=SlaPolicyAct_Output_Direct eventName=VpnSlaActOut eventVersion=1.0.0 nextState=NULL + policy state taskref create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyActState taskLocalName=act taskName=VpnSlaPolicyActTask taskVersion=1.0.0 outputType=DIRECT outputName=SlaPolicyAct_Output_Direct + + policy state create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyDecideState triggerName=VpnSlaEstablishOut triggerVersion=1.0.0 defaultTaskName=VpnSlaPolicyDecideSlaTask defaultTaskVersion=1.0.0 + policy state contextref create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyDecideState albumName=albumProblemMap + policy state selecttasklogic create name=VpnSlaPolicy stateName=VpnSlaPolicyDecideState logicFlavour=JAVASCRIPT logic=LS + #MACROFILE:"src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/tsl-decide.js" + LE + policy state output create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyDecideState outputName=VpnSlaPolicyDecide_Output_Direct eventName=VpnSlaDecideOut eventVersion=1.0.0 nextState=VpnSlaPolicyActState + policy state taskref create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyDecideState taskLocalName=decideNone taskName=VpnSlaPolicyDecideNoneTask taskVersion=1.0.0 outputType=DIRECT outputName=VpnSlaPolicyDecide_Output_Direct + policy state taskref create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyDecideState taskLocalName=decideNone taskName=VpnSlaPolicyDecideSolvedTask taskVersion=1.0.0 outputType=DIRECT outputName=VpnSlaPolicyDecide_Output_Direct + policy state taskref create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyDecideState taskLocalName=decideSla taskName=VpnSlaPolicyDecideSlaTask taskVersion=1.0.0 outputType=DIRECT outputName=VpnSlaPolicyDecide_Output_Direct + policy state taskref create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyDecideState taskLocalName=decidePriority taskName=VpnSlaPolicyDecidePriorityTask taskVersion=1.0.0 outputType=DIRECT outputName=VpnSlaPolicyDecide_Output_Direct + + policy state create name=VpnSlaPolicy version=1.0.0 stateName=VpmSlaPolicyEstablishState triggerName=VpnSlaMatchOut triggerVersion=1.0.0 defaultTaskName=VpnSlaPolicyEstablishTask defaultTaskVersion=1.0.0 + policy state output create name=VpnSlaPolicy version=1.0.0 stateName=VpmSlaPolicyEstablishState outputName=VpnSlaPolicyEstablish_Output_Direct eventName=VpnSlaEstablishOut eventVersion=1.0.0 nextState=VpnSlaPolicyDecideState + policy state taskref create name=VpnSlaPolicy version=1.0.0 stateName=VpmSlaPolicyEstablishState taskLocalName=establish taskName=VpnSlaPolicyEstablishTask taskVersion=1.0.0 outputType=DIRECT outputName=VpnSlaPolicyEstablish_Output_Direct + + policy state create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyMatchState triggerName=VpnSlaTrigger triggerVersion=1.0.0 defaultTaskName=VpnSlaPolicyMatchTask defaultTaskVersion=1.0.0 + policy state output create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyMatchState outputName=VpnSlaPolicyMatch_Output_Direct eventName=VpnSlaMatchOut eventVersion=1.0.0 nextState=VpmSlaPolicyEstablishState + policy state taskref create name=VpnSlaPolicy version=1.0.0 stateName=VpnSlaPolicyMatchState taskLocalName=match taskName=VpnSlaPolicyMatchTask taskVersion=1.0.0 outputType=DIRECT outputName=VpnSlaPolicyMatch_Output_Direct + + + + validate + quit + +Context Events Nodes +-------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The following events create all nodes of the topology. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "A1", + "mininetName": "nn" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "A2", + "mininetName": "nn" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "B1", + "mininetName": "nn" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "B2", + "mininetName": "nn" + } + + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "A1CO", + "mininetName": "s1" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "A2CO", + "mininetName": "s2" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "B1CO", + "mininetName": "s3" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "B2CO", + "mininetName": "s4" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "BBL", + "mininetName": "s5" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "NodeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_NodeContext", + "nodeName": "BBR", + "mininetName": "s6" + } + +Context Events Edges +-------------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The following events create all edges of the topology. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L01", + "start": "A1", + "end": "A1CO", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L02", + "start": "B1", + "end": "B1CO", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L03", + "start": "A2", + "end": "A2CO", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L04", + "start": "B2", + "end": "B2CO", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L05", + "start": "A1CO", + "end": "BBL", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L06", + "start": "B1CO", + "end": "BBL", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L07", + "start": "A2CO", + "end": "BBR", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L08", + "start": "B2CO", + "end": "BBR", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L09", + "start": "BBL", + "end": "BBR", + "status": true + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "EdgeContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_EdgeContext", + "edgeName": "L10", + "start": "BBR", + "end": "BBL", + "status": true + } + +Context Events Customers +------------------------ + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The following events create all customers of the + topology. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "CustomerContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_CustomerContext", + "customerName": "A", + "links": "L01 L05 L09 L10", + "dtSLA": 180, + "dtYTD": 10, + "priority": false, + "satisfaction": 80 + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "CustomerContextEventIn", + "version": "1.0.0", + "source": "CtxtManagement", + "target" : "VpnSlaPolicy_CustomerContext", + "customerName": "B", + "links": "L02 L07 L09 L10", + "dtSLA": 180, + "dtYTD": 120, + "priority": true, + "satisfaction": 99 + } + +Trigger Examples +---------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The following events are examples for trigger events + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "VpnSlaTrigger", + "version": "1.0.0", + "source": "ExampleEvents", + "target" : "VpnSlaPolicy", + "edgeName": "L09", + "status": "UP" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "VpnSlaTrigger", + "version": "1.0.0", + "source": "ExampleEvents", + "target" : "VpnSlaPolicy", + "edgeName": "L09", + "status": "UP" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "VpnSlaTrigger", + "version": "1.0.0", + "source": "ExampleEvents", + "target" : "VpnSlaPolicy", + "edgeName": "L09", + "status": "DOWN" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "VpnSlaTrigger", + "version": "1.0.0", + "source": "ExampleEvents", + "target" : "VpnSlaPolicy", + "edgeName": "L09", + "status": "DOWN" + } + + { + "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla", + "name": "VpnSlaTrigger", + "version": "1.0.0", + "source": "ExampleEvents", + "target" : "VpnSlaPolicy", + "edgeName": "L09", + "status": "UP" + } + +Link Monitor +------------ + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The Link Monitor is a Python script. At startup, it + sends the context events to APEX to initialize the + topology and the customers. Then it takes events from + Kafka and sends them to APEX. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + # ============LICENSE_START======================================================= + # Copyright (C) 2016-2018 Ericsson. All rights reserved. + # ================================================================================ + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ============LICENSE_END========================================================= + + import http.client + import json + import time + from kafka import KafkaConsumer, KafkaProducer + + class StaticFlowPusher(object): + + def __init__(self, server): + self.server = server + + def get(self, data): + ret = self.rest_call({}, 'GET') + return json.loads(ret[2]) + + def set(self, data): + ret = self.rest_call(data, 'POST') + return ret[0] == 200 + + def remove(self, objtype, data): + ret = self.rest_call(data, 'DELETE') + return ret[0] == 200 + + def getControllerSummary(self, data): + ret = self.rest_call_controller_summary({}, 'GET') + return json.loads(ret[2]) + + def getLinks(self, data): + ret = self.rest_call_links({}, 'GET') + return json.loads(ret[2].decode()) + + def rest_call(self, data, action): + path = '/wm/staticflowpusher/json' + headers = { + 'Content-type': 'application/json', + 'Accept': 'application/json', + } + body = json.dumps(data) + conn = http.client.HTTPConnection(self.server, 8080) + conn.request(action, path, body, headers) + response = conn.getresponse() + ret = (response.status, response.reason, response.read()) + print(ret) + conn.close() + return ret + + def rest_call_controller_summary(self, data, action): + path = '/wm/core/controller/summary/json' + headers = { + 'Content-type': 'application/json', + 'Accept': 'application/json', + } + body = json.dumps(data) + conn = http.client.HTTPConnection(self.server, 8080) + conn.request(action, path, body, headers) + response = conn.getresponse() + ret = (response.status, response.reason, response.read()) + print(ret) + conn.close() + return ret + + def rest_call_links(self, data, action): + path = '/wm/topology/links/json' + headers = { + 'Content-type': 'application/json', + 'Accept': 'application/json', + } + body = json.dumps(data) + conn = http.client.HTTPConnection(self.server, 8080) + conn.request(action, path, body, headers) + response = conn.getresponse() + ret = (response.status, response.reason, response.read()) + conn.close() + return ret + + pusher = StaticFlowPusher('127.0.1.1') + + + def parseLinks(links): + #print("\n\n\n",links) + result = [] + for link in links: + list = [] + #print("\n\n\n",link) + #print("\nsrc-switch : s", link['src-switch'][len(link['src-switch'])-1]) + #print("\ndst-switch : s", link['dst-switch'][len(link['dst-switch'])-1]) + list.append("s") + list.append(link['src-switch'][len(link['src-switch'])-1]) + list.append("-s") + list.append(link['dst-switch'][len(link['dst-switch'])-1]) + result.append(''.join(list)) + #print(result, "\n") + return result + + + + counter =0 + healthyList = [] + testableList = [] + healthyLinks = "" + testableLinks = "" + producer = KafkaProducer(bootstrap_servers='localhost:9092') + while(True): + time.sleep(30) + switchLinks = pusher.getLinks({}) + if counter == 0: + healthyList = parseLinks(switchLinks) + #Build All Links + print("READING LINKS FROM MININET\n") + for l in healthyList: + link = "" + #print(l, "\n") + #Links between switches [s6-s7 is ignored so it matches VPN SCENARIO] + if(l == "s1-s5"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L05', 'start': 'A1CO','end': 'BBL'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(l == "s5-s6"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L09', 'start': 'BBL','end': 'BBR'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(l == "s2-s6"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L07', 'start': 'A2CO','end': 'BBR'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(l == "s5-s7"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L10', 'start': 'BBR','end': 'BBL'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(l == "s3-s5"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L06', 'start': 'B1CO','end': 'BBL'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(l == "s4-s6"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L08', 'start': 'B2CO','end': 'BBR'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + #Links between switches and hosts [NoT SENT IN FROM FLOODLIGHT] + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L01', 'start': 'A1','end': 'A1CO'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L02', 'start': 'B1','end': 'B1CO'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L03', 'start': 'A2','end': 'A2CO'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'EdgeContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_EdgeContext','status': true,'edgeName': 'L04', 'start': 'B2','end': 'B2CO'}") + print("LINKS HAVE BEEN SENT TO APEX\n") + + #Build Customers + print("BUILDING CUSTOMERS\n") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'CustomerContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_CustomerContext','dtYTD': 10,'dtSLA': 180,'links': 'L01 L05 L09 L10','customerName': 'A', 'priority': true,'satisfaction': 80}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'CustomerContextEventIn','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy_CustomerContext','dtYTD': 120,'dtSLA': 180,'links': 'L02 L07 L09 L10','customerName': 'B', 'priority': false,'satisfaction': 99}") + print("CUSTOMERS HAVE BEEN SENT TO APEX\n") + healthyLinks = switchLinks + myfile = open('LinkInfo.json', 'a') + myfile.write(str(healthyLinks)) + myfile.write('\n') + myfile.close() + print("We start off with", len(healthyLinks), "healthy Links!\n") + else: + testableList = parseLinks(switchLinks) + issueLink = ""; + for h in healthyList: + issueLink = h + for t in testableList: + if t == h: + issueLink = "" + if issueLink != "": + print("There is an issue with the links! ", issueLink, " \n") + if(issueLink == "s1-s5"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'DOWN','edgeName': 'L05'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(issueLink == "s5-s6"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'DOWN','edgeName': 'L09'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(issueLink == "s2-s6"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'DOWN','edgeName': 'L07'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(issueLink == "s5-s7"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'DOWN','edgeName': 'L10'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(issueLink == "s3-s5"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'DOWN','edgeName': 'L06'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + if(issueLink == "s4-s6"): + link = "{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'DOWN','edgeName': 'L08'}" + producer.send("apex-in-0", bytes(link, encoding="ascii")) + break + if issueLink == "": + print("All Links are working\n") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L01'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L02'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L03'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L04'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L05'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L06'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L07'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L08'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L09'}") + producer.send("apex-in-0", b"{'nameSpace': 'org.onap.policy.apex.examples.pcvs.vpnsla','name': 'VpnSlaTrigger','version': '1.0.0','source': 'LinkMonitor.py','target': 'VpnSlaPolicy','status': 'UP','edgeName': 'L10'}") + + testableLinks = switchLinks + myfile = open('LinkInfo.json', 'a') + myfile.write(str(testableLinks)) + myfile.write('\n') + myfile.close() + counter += 1 + +Mininet Topology +---------------- + + .. container:: sect1 + + .. container:: sectionbody + + .. container:: paragraph + + The topology is realized using Mininet. The following + script is use to estalish the topology and to realize + network configurations. + + .. container:: listingblock + + .. container:: content + + .. code:: CodeRay + + # ============LICENSE_START======================================================= + # Copyright (C) 2016-2018 Ericsson. All rights reserved. + # ================================================================================ + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ============LICENSE_END========================================================= + + #Add Mininet to PATH + import sys + sys.path.insert(0, "/~/mininet") + + #Kafka + import httplib + import json + import time + from kafka import KafkaConsumer, KafkaProducer + + #Mininet + from mininet.clean import * + from mininet.cli import * + from mininet.link import * + from mininet.log import * + from mininet.net import * + from mininet.node import * + from mininet.nodelib import * + from mininet.topo import * + from mininet.topolib import * + + class StaticFlowPusher(object): + def __init__(self, server): + self.server = server + + def enableFirewall(self, data): + path = "/wm/firewall/module/enable/json" + headers = {'Content-Type': 'application/json','Accept': 'application/json',} + body = json.dumps(data) + conn = httplib.HTTPConnection(self.server, 8080) + conn.request("PUT", path, "") + response = conn.getresponse() + ret = (response.status, response.reason, response.read()) + conn.close() + return ret + + def addRule(self, data): + path = '/wm/firewall/rules/json' + headers = {'Content-Type': 'application/json','Accept': 'application/json',} + body = json.dumps(data) + conn = httplib.HTTPConnection(self.server, 8080) + conn.request('POST', path, body, headers) + response = conn.getresponse() + ret = (response.status, response.reason, response.read()) + conn.close() + return ret + + def deleteRule(self, data): + path = '/wm/firewall/rules/json' + headers = {'Content-Type': 'application/json','Accept': 'application/json',} + body = json.dumps(data) + conn = httplib.HTTPConnection(self.server, 8080) + conn.request('DELETE', path, body, headers) + response = conn.getresponse() + ret = (response.status, response.reason, response.read()) + conn.close() + return ret + + #Build Pusher(REST/IN) + pusher = StaticFlowPusher('127.0.0.1') + + net = Mininet(link=TCLink) + + #Create Customers + customerA1 = net.addHost( 'A1' ) + customerA2 = net.addHost( 'A2' ) + customerB1 = net.addHost( 'B1' ) + customerB2 = net.addHost( 'B2' ) + + #Create Switches + switchA1CO = net.addSwitch( 's1' ) + switchA2CO = net.addSwitch( 's2' ) + switchB1CO = net.addSwitch( 's3' ) + switchB2CO = net.addSwitch( 's4' ) + switchBBL = net.addSwitch( 's5' ) + switchBBR = net.addSwitch( 's6' ) + # we need an extra switch here because Mininet does not allow two links between two switches + switchEx = net.addSwitch( 's7' ) + + #Create Links + net.addLink( customerA1, switchA1CO ) + net.addLink( customerA2, switchA2CO ) + net.addLink( customerB1, switchB1CO ) + net.addLink( customerB2, switchB2CO ) + net.addLink( switchA1CO, switchBBL ) + net.addLink( switchB1CO, switchBBL ) + net.addLink( switchA2CO, switchBBR ) + net.addLink( switchB2CO, switchBBR ) + net.addLink( switchBBL, switchBBR) + net.addLink( switchBBR, switchEx, bw=1.2 ) + net.addLink( switchEx, switchBBL ) + + #Create Controller + floodlightController = net.addController(name='c0' , controller=RemoteController , ip='127.0.0.1', port=6653) + + net.start() + + if pusher.enableFirewall({})[0] == 200: + print("Firewall enabled!") + + #print(pusher.addRule({"switchid": "00:00:00:00:00:00:00:01"})[2]) + s1id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:01"})[2])['rule-id'] + s2id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:02"})[2])['rule-id'] + s3id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:03"})[2])['rule-id'] + s4id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:04"})[2])['rule-id'] + s5id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:05"})[2])['rule-id'] + s6id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:06"})[2])['rule-id'] + s7id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:07"})[2])['rule-id'] + + + result = 100 + while result!=0: + result = net.pingAll(None) + print("Network Simulation Complete") + + #Assume control and when finished "exit" + cli = CLI( net ) + + consumer = KafkaConsumer(bootstrap_servers='localhost:9092',auto_offset_reset='latest') + consumer.subscribe(['apex-out']) + print("Starting Message Loop") + for message in consumer: + myOutput = json.loads(message.value.decode()) + action = "" + try: + print("Checking Message") + #print("SWITCHES= ",net.switches) + #print("LINKS= ",net.links) + #print("VALUES= ",net.values) + if myOutput['edgeName'] != '': + print("Message Received: ",myOutput['edgeName']) + pusher.deleteRule({"ruleid": s1id}) + pusher.deleteRule({"ruleid": s2id}) + pusher.deleteRule({"ruleid": s3id}) + pusher.deleteRule({"ruleid": s4id}) + pusher.deleteRule({"ruleid": s5id}) + pusher.deleteRule({"ruleid": s6id}) + pusher.deleteRule({"ruleid": s7id}) + s1id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:01"})[2])['rule-id'] + s2id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:02"})[2])['rule-id'] + s3id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:03"})[2])['rule-id'] + s4id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:04"})[2])['rule-id'] + s5id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:05"})[2])['rule-id'] + s6id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:06"})[2])['rule-id'] + s7id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:07"})[2])['rule-id'] + if myOutput['edgeName'] == "L01": + action = "link s1 s5 down" + #net.configLinkStatus('s1', 's5', "down") + pusher.deleteRule({"ruleid": s1id}) + s1id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:01", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L02": + action = "link s3 s5 down" + #net.configLinkStatus('s3', 's5', "down") + pusher.deleteRule({"ruleid": s3id}) + s3id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:03", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L03": + action = "link s2 s6 down" + #net.configLinkStatus('s2', 's6', "down") + pusher.deleteRule({"ruleid": s1id}) + s1id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:01", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L04": + action = "link s4 s6 down" + #net.configLinkStatus('s4', 's6', "down") + pusher.deleteRule({"ruleid": s3id}) + s3id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:03", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L05": + action = "link s1 s5 down" + #net.configLinkStatus('s1', 's5', "down") + pusher.deleteRule({"ruleid": s1id}) + s1id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:01", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L06": + action = "link s3 s5 down" + #net.configLinkStatus('s3', 's5', "down") + pusher.deleteRule({"ruleid": s3id}) + s3id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:03", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L07": + action = "link s2 s6 down" + #net.configLinkStatus('s2', 's6', "down") + pusher.deleteRule({"ruleid": s2id}) + s2id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:02", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L08": + action = "link s4 s6 down" + #net.configLinkStatus('s4', 's6', "down") + pusher.deleteRule({"ruleid": s4id}) + s4id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:04", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L09": + action = "link s5 s6 down" + #net.configLinkStatus('s5', 's6', "down") + pusher.deleteRule({"ruleid": s7id}) + s7id = json.loads(pusher.addRule({"switchid": "00:00:00:00:00:00:00:07", "action": "DENY"})[2])['rule-id'] + if myOutput['edgeName'] == "L10": + print("L10") + #print(action) + #print("3") + except KeyError: + print(myOutput) + print("HA") + net.stop() + + .. container:: + :name: footer-text + + 2.3.0-SNAPSHOT + Last updated 2020-04-03 16:04:24 IST + + +.. |ONAP| image:: ../../../images/logos.png + :class: builtBy + :target: http://www.onap.org/ + +.. |VPN SLA Architecture| image:: images/pcvs/vpnsla-arch.png + + diff --git a/docs/apex/APEX-Policy-Examples.rst b/docs/apex/APEX-Policy-Examples.rst new file mode 100644 index 00000000..cb8fa8d3 --- /dev/null +++ b/docs/apex/APEX-Policy-Examples.rst @@ -0,0 +1,82 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Policy Examples +*************** + +.. contents:: + :depth: 3 + +Sample APEX Policy in TOSCA format +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + .. container:: paragraph + + An example APEX policy in TOSCA format for the vCPE + use case can be found here: + + .. container:: ulist + + - `APEX TOSCA Policy + vCPE <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.apex.policy.operational.input.tosca.json>`__ + +My First Policy +^^^^^^^^^^^^^^^ + + .. container:: paragraph + + A good starting point is the ``My First Policy`` example. It + describes a sales problem, to which policy can be applied. + The example details the policy background, shows how to use + the REST Editor to create a policy, and provides details for + running the policies. The documentation can be found: + + .. container:: ulist + + - :ref:`My-First-Policy on the APEX site <apex-myFirstExample>` + +VPN SLA +^^^^^^^ + + .. container:: paragraph + + The domain Policy-controlled Video Streaming (PCVS) contains + a policy for controlling video streams with different + strategies. It also provides details for installing an + actual testbed with off-the-shelve software (Mininet, + Floodlight, Kafka, Zookeeper). The policy model here + demonstrates virtually all APEX features: local context and + policies controlling it, task selection logic and multiple + tasks in a single state, AVRO schemas for context, AVOR + schemas for events (trigger and local), and a CLI editor + specification of the policy. The documentation can be found: + + .. container:: ulist + + - :ref:`VPN SLA Policy on the APEX site <apex-PCVSExample>` + +Decision Maker +^^^^^^^^^^^^^^ + + .. container:: paragraph + + The domain Decision Maker shows a very simple policy for + decisions. Interesting here is that the it creates a Docker + image to run the policy and that it uses the APEX REST + applications to update the policy on the-fly. It also has + local context to remember past decisions, and shows how to + use that to no make the same decision twice in a row. The + documentation can be found: + + .. container:: ulist + + - :ref:`Decision Maker on APEX site <apex-DecisionMakerExample>` + +.. container:: + :name: footer + + .. container:: + :name: footer-text + + 2.3.0-SNAPSHOT + Last updated 2020-04-08 16:04:24 GMT
\ No newline at end of file diff --git a/docs/apex/APEX-Policy-Guide.rst b/docs/apex/APEX-Policy-Guide.rst index f76ed138..cb2388e0 100644 --- a/docs/apex/APEX-Policy-Guide.rst +++ b/docs/apex/APEX-Policy-Guide.rst @@ -664,6 +664,13 @@ Concept: TaskParameter values in the configuration information passed to APEX engines. + .. container:: paragraph + + The *taskParameters* field is specified under *engineParameters* + in the ApexConfig. It can contain one or more task parameters, where each + item can contain the parameter key, value as well as the taskId to which it is associated. + If the taskId is not specified, then the parameters are added to all tasks. + Concept: Logic ############## @@ -1567,6 +1574,22 @@ Writing APEX Task Selection Logic | | | | .getOutFieldSchemaHelper("authorised") | | | | | .createNewInstance("false"); | +------------+-------------+--------------------------------+-------------------------------------------------------------------------------------+ +| parameters | Fields | java.util.Map <String,String> | .. container:: paragraph | +| | | | | +| | | | All parameters in the current task. This is implemented as a standard Java Map. | +| | | | | +| | | | .. container:: | +| | | | | +| | | | .. container:: content | +| | | | | +| | | | .. container:: paragraph | +| | | | | +| | | | **Example:** | +| | | | | +| | | | .. code:: javascript | +| | | | | +| | | | executor.parameters.get("ParameterKey1")) | ++------------+-------------+--------------------------------+-------------------------------------------------------------------------------------+ | ContextAlbum getContextAlbum(String ctxtAlbumName ) | .. container:: paragraph | | | | | | A utility method to retrieve a ``ContextAlbum`` for use in the task. | @@ -1604,32 +1627,13 @@ Logic Cheatsheet Examples given here use Javascript (if not stated otherwise), other execution environments will be similar. -Add Nashorn -########### - - .. container:: paragraph - - First line in the logic use this import. - - .. container:: listingblock - - .. container:: title - - JS Nashorn - - .. container:: content - - .. code:: javascript - - load("nashorn:mozilla_compat.js"); - Finish Logic with Success or Error ################################## .. container:: paragraph To finish logic, i.e. return to APEX, with success use the - following lines close to the end of the logic. + following line close to the end of the logic. .. container:: listingblock @@ -1641,8 +1645,7 @@ Finish Logic with Success or Error .. code:: javascript - var returnValueType = Java.type("java.lang.Boolean"); - var returnValue = new returnValueType(true); + true; .. container:: paragraph @@ -1658,8 +1661,7 @@ Finish Logic with Success or Error .. code:: javascript - var returnValueType = Java.type("java.lang.Boolean"); - var returnValue = new returnValueType(false); + false; Logic Logging ############# @@ -1731,6 +1733,43 @@ Logic Logging rootLogger.error("Serious error in logic detected: " + executor.subject.id); +Accessing TaskParameters +######################## + + .. container:: paragraph + + TaskParameters available in a Task can be accessed in the logic. + The parameters in each task are made available at the executor level. + This example assumes a parameter with key ``ParameterKey1``. + + .. container:: listingblock + + .. container:: title + + JS TaskParameter value + + .. container:: content + + .. code:: javascript + + executor.parameters.get("ParameterKey1")) + + .. container:: paragraph + + Alternatively, the task parameters can also be accessed from the task object. + + .. container:: listingblock + + .. container:: title + + JS TaskParameter value using task object + + .. container:: content + + .. code:: javascript + + executor.subject.task.getTaskParameters.get("ParameterKey1").getTaskParameterValue() + Local Variable for Infields ########################### @@ -2054,69 +2093,6 @@ Using Java in Scripting Logic importClass(java.util.ArrayList); var myList = new ArrayList(); -Policy Examples -^^^^^^^^^^^^^^^ - -My First Policy ---------------- - - .. container:: paragraph - - A good starting point is the ``My First Policy`` example. It - describes a sales problem, to which policy can be applied. - The example details the policy background, shows how to use - the REST Editor to create a policy, and provides details for - running the policies. The documentation can be found: - - .. container:: ulist - - - `My-First-Policy on the APEX - site <https://ericsson.github.io/apex-docs/modules/examples/examples-myfirstpolicy/MyFirstPolicyHowto.html>`__ - - - `Stand-alone - HTML <https://ericsson.github.io/apex-docs/docs-apex/html/HowTo-MyFirstPolicy.html>`__ - - - `Stand-alone - PDF <https://ericsson.github.io/apex-docs/docs-apex/pdf/HowTo-MyFirstPolicy.pdf>`__ - -VPN SLA -------- - - .. container:: paragraph - - The domain Policy-controlled Video Streaming (PCVS) contains - a policy for controlling video streams with different - strategies. It also provides details for installing an - actual testbed with off-the-shelve software (Mininet, - Floodlight, Kafka, Zookeeper). The policy model here - demonstrates virtually all APEX features: local context and - policies controlling it, task selection logic and multiple - tasks in a single state, AVRO schemas for context, AVOR - schemas for events (trigger and local), and a CLI editor - specification of the policy. The documentation can be found: - - .. container:: ulist - - - `VPN SLA Policy on the APEX - site <https://ericsson.github.io/apex-docs/modules/examples/examples-pcvs/vpnsla/policy.html>`__ - -Decision Maker --------------- - - .. container:: paragraph - - The domain Decision Maker shows a very simple policy for - decisions. Interesting here is that the it creates a Docker - image to run the policy and that it uses the APEX REST - applications to update the policy on the-fly. It also has - local context to remember past decisions, and shows how to - use that to no make the same decision twice in a row. The - documentation can be found: - - .. container:: ulist - - - `Decision Maker on APEX - site <https://ericsson.github.io/apex-docs/modules/examples/examples-decisionmaker/index.html>`__ .. container:: :name: footer @@ -2124,8 +2100,8 @@ Decision Maker .. container:: :name: footer-text - 2.0.0-SNAPSHOT - Last updated 2018-09-04 16:04:24 IST + 2.3.0-SNAPSHOT + Last updated 2020-03-16 16:04:24 GMT .. |APEX Policy Matrix| image:: images/apex-intro/ApexPolicyMatrix.png .. |APEX Policy Model for Execution| image:: images/apex-policy-model/UmlPolicyModels.png diff --git a/docs/apex/APEX-User-Manual.rst b/docs/apex/APEX-User-Manual.rst index f33ad5ee..10201c0f 100644 --- a/docs/apex/APEX-User-Manual.rst +++ b/docs/apex/APEX-User-Manual.rst @@ -1461,31 +1461,32 @@ General Configuration Format "engineServiceParameters":{ ... (1) "engineParameters":{ (2) - "engineParameters":{...}, (3) + "executorParameters":{...}, (3) "contextParameters":{...} (4) + "taskParameters":[...] (5) } }, - "eventInputParameters":{ (5) - "input1":{ (6) + "eventInputParameters":{ (6) + "input1":{ (7) "carrierTechnologyParameters":{...}, "eventProtocolParameters":{...} }, - "input2":{...}, (7) + "input2":{...}, (8) "carrierTechnologyParameters":{...}, "eventProtocolParameters":{...} }, - ... (8) + ... (9) }, - "eventOutputParameters":{ (9) - "output1":{ (10) + "eventOutputParameters":{ (10) + "output1":{ (11) "carrierTechnologyParameters":{...}, "eventProtocolParameters":{...} }, - "output2":{ (11) + "output2":{ (12) "carrierTechnologyParameters":{...}, "eventProtocolParameters":{...} }, - ... (12) + ... (13) } } @@ -1506,31 +1507,35 @@ General Configuration Format | | for context schemas, persistence, | | | etc. | +-----------------------------------+-----------------------------------+ - | **5** | configuration of the input | + | **5** | list of task parameters that | + | | should be made available in task | + | | logic (optional). | + +-----------------------------------+-----------------------------------+ + | **6** | configuration of the input | | | interface | +-----------------------------------+-----------------------------------+ - | **6** | an example input called | + | **7** | an example input called | | | ``input1`` with carrier | | | technology and event protocol | +-----------------------------------+-----------------------------------+ - | **7** | an example input called | + | **8** | an example input called | | | ``input2`` with carrier | | | technology and event protocol | +-----------------------------------+-----------------------------------+ - | **8** | any further input configuration | + | **9** | any further input configuration | +-----------------------------------+-----------------------------------+ - | **9** | configuration of the output | + | **10** | configuration of the output | | | interface | +-----------------------------------+-----------------------------------+ - | **10** | an example output called | + | **11** | an example output called | | | ``output1`` with carrier | | | technology and event protocol | +-----------------------------------+-----------------------------------+ - | **11** | an example output called | + | **12** | an example output called | | | ``output2`` with carrier | | | technology and event protocol | +-----------------------------------+-----------------------------------+ - | **12** | any further output configuration | + | **13** | any further output configuration | +-----------------------------------+-----------------------------------+ Engine Service Parameters @@ -1557,8 +1562,9 @@ Engine Service Parameters "policyModelFileName" : "examples/models/VPN/VPNPolicyModelJava.json", (6) "periodicEventPeriod": 1000, (7) "engineParameters":{ (8) - "engineParameters":{...}, (9) - "contextParameters":{...} (10) + "executorParameters":{...}, (9) + "contextParameters":{...}, (10) + "taskParameters":[...] (11) } } @@ -1617,6 +1623,10 @@ Engine Service Parameters | | for context schemas, persistence, | | | etc. | +-----------------------------------+-----------------------------------+ + | **11** | list of task parameters that | + | | should be made available in task | + | | logic (optional). | + +-----------------------------------+-----------------------------------+ .. container:: paragraph @@ -2097,6 +2107,49 @@ Configure AVRO Schema Handler - Since AVRO uses lazy initialization, this rejection might only become visible at runtime +Configure Task Parameters +######################### + + .. container:: paragraph + + The Task Parameters are added to the configuration as + follows: + + .. container:: listingblock + + .. container:: content + + .. code:: + + "engineServiceParameters": { + "engineParameters": { + "taskParameters": [ + { + "key": "ParameterKey1", + "value": "ParameterValue1" + }, + { + "taskId": "Task_Act0", + "key": "ParameterKey2", + "value": "ParameterValue2" + } + ] + } + } + + .. container:: paragraph + + TaskParameters can be used to pass parameters from ApexConfig + to the policy logic. In the config, these are optional. + The list of task parameters provided in the config may be added + to the tasks or existing task parameters in the task will be overriden. + + .. container:: paragraph + + If taskId is provided in ApexConfig for an entry, then that + parameter is updated only for that particular task. Otherwise, + the task parameter is added to all tasks. + Carrier Technologies -------------------- @@ -2815,7 +2868,7 @@ REST Client IO APEX can act as REST client on the input as well as on the output interface. The media type is - ``application/json``, so this plugin does only work with + ``application/json``, so this plugin only works with the JSON Event protocol. REST Client Input @@ -2948,7 +3001,7 @@ REST Server IO - Maximum port: 65535 - The media type is ``application/json``, so this plugin - does only work with the JSON Event protocol. + only works with the JSON Event protocol. .. container:: paragraph @@ -3124,7 +3177,7 @@ REST Requestor IO APEX can act as REST requestor on the input as well as on the output interface. The media type is - ``application/json``, so this plugin does only work with + ``application/json``, so this plugin only works with the JSON Event protocol. REST Requestor Input @@ -3268,6 +3321,142 @@ REST Requestor Output | **4** | a general request timeout | +-------+---------------------------+ +gRPC IO +####### + + .. container:: paragraph + + APEX can send requests over gRPC at the output side, and get back + response at the input side. This can be used to send requests to CDS + over gRPC. The media type is ``application/json``, so this plugin + only works with the JSON Event protocol. + +gRPC Output +=========== + + .. container:: paragraph + + APEX will connect to a given host to send a request over + gRPC. + + .. container:: listingblock + + .. container:: content + + .. code:: + + "carrierTechnologyParameters": { + "carrierTechnology": "GRPC", (1) + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters", + "parameters": { + "host": "cds-blueprints-processor-grpc", (2) + "port": 9111, (2') + "username": "ccsdkapps", (3) + "password": ccsdkapps, (4) + "timeout" : 10 (5) + } + }, + + .. container:: colist arabic + + +-------+--------------------------------------------------+ + | **1** | set GRPC as carrier technology | + +-------+--------------------------------------------------+ + | **2** | the host to which request is sent | + +-------+--------------------------------------------------+ + | **2'**| the value for port | + +-------+--------------------------------------------------+ + | **3** | username required to initiate connection | + +-------+--------------------------------------------------+ + | **4** | password required to initiate connection | + +-------+--------------------------------------------------+ + | **5** | the timeout value for completing the request | + +-------+--------------------------------------------------+ + + .. container:: paragraph + + Further settings are required on the producer to + define the event that is requested, for example: + + .. container:: listingblock + + .. container:: content + + .. code:: + + "eventName": "GRPCRequestEvent", (1) + "eventNameFilter": "GRPCRequestEvent", (2) + "requestorMode": true, (3) + "requestorPeer": "GRPCRequestConsumer", (4) + "requestorTimeout": 500 (5) + + .. container:: colist arabic + + +-------+---------------------------+ + | **1** | the event name | + +-------+---------------------------+ + | **2** | a filter on the event | + +-------+---------------------------+ + | **3** | the mode of the requestor | + +-------+---------------------------+ + | **4** | a peer for the requestor | + +-------+---------------------------+ + | **5** | a general request timeout | + +-------+---------------------------+ + +gRPC Input +========== + + .. container:: paragraph + + APEX will connect to the host specified in the producer + side, anad take in response back at the consumer side. + + .. container:: listingblock + + .. container:: content + + .. code:: + + "carrierTechnologyParameters": { + "carrierTechnology": "GRPC", (1) + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters" + }, + + .. container:: colist arabic + + +-------+------------------------------------------+ + | **1** | set GRPC as carrier technology | + +-------+------------------------------------------+ + + .. container:: paragraph + + Further settings are required on the consumer to + define the event that is requested, for example: + + .. container:: listingblock + + .. container:: content + + .. code:: + + "eventNameFilter": "GRPCResponseEvent", (1) + "requestorMode": true, (2) + "requestorPeer": "GRPCRequestProducer", (3) + "requestorTimeout": 500 (4) + + .. container:: colist arabic + + +-------+---------------------------+ + | **1** | a filter on the event | + +-------+---------------------------+ + | **2** | the mode of the requestor | + +-------+---------------------------+ + | **3** | a peer for the requestor | + +-------+---------------------------+ + | **4** | a general request timeout | + +-------+---------------------------+ + Event Protocols, Format and Encoding ------------------------------------ diff --git a/docs/apex/apex.rst b/docs/apex/apex.rst index 4e257a17..cc196bce 100644 --- a/docs/apex/apex.rst +++ b/docs/apex/apex.rst @@ -13,3 +13,4 @@ Policy APEX PDP Engine APEX-Developer-Guide.rst APEX-Install-Guide.rst APEX-OnapPf-Guide.rst + APEX-Policy-Examples.rst
\ No newline at end of file diff --git a/docs/apex/events/1/EventIn_BoozeItem_084106GMT.json b/docs/apex/events/1/EventIn_BoozeItem_084106GMT.json new file mode 100644 index 00000000..4c5af6c2 --- /dev/null +++ b/docs/apex/events/1/EventIn_BoozeItem_084106GMT.json @@ -0,0 +1,12 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1483346466000, + "sale_ID": 99999992, + "amount": 1249, + "item_ID": 1012, + "quantity": 1, + "assistant_ID": 12, + "branch_ID": 2 +}
\ No newline at end of file diff --git a/docs/apex/events/1/EventIn_BoozeItem_201713GMT.json b/docs/apex/events/1/EventIn_BoozeItem_201713GMT.json new file mode 100644 index 00000000..cc18e7dd --- /dev/null +++ b/docs/apex/events/1/EventIn_BoozeItem_201713GMT.json @@ -0,0 +1,12 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1482265033000, + "sale_ID": 99999993, + "amount": 4799, + "item_ID": 1943, + "quantity": 2, + "assistant_ID": 9, + "branch_ID": 3 +}
\ No newline at end of file diff --git a/docs/apex/events/1/EventIn_NonBoozeItem_101309GMT.json b/docs/apex/events/1/EventIn_NonBoozeItem_101309GMT.json new file mode 100644 index 00000000..1cdc4992 --- /dev/null +++ b/docs/apex/events/1/EventIn_NonBoozeItem_101309GMT.json @@ -0,0 +1,13 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1483351989000, + "sale_ID": 99999991, + "amount": 299, + "item_ID": 5123, + "quantity": 1, + "assistant_ID": 23, + "branch_ID": 1, + "notes": "Special Offer!!" +}
\ No newline at end of file diff --git a/docs/apex/events/1/EventOut_BoozeItem_084106GMT.json b/docs/apex/events/1/EventOut_BoozeItem_084106GMT.json new file mode 100644 index 00000000..3625f908 --- /dev/null +++ b/docs/apex/events/1/EventOut_BoozeItem_084106GMT.json @@ -0,0 +1,17 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_AUTH", + "version": "0.0.1", + "source": "", + "target": "", + "amount": 1249, + "assistant_ID": 12, + "authorised": false, + "branch_ID": 2, + "item_ID": 1012, + "message": "Sale not authorised by policy task MorningBoozeCheck for time 08:41:06 GMT. Alcohol can not be sold between 00:00:00 GMT and 11:30:00 GMT", + "notes": null, + "quantity": 1, + "sale_ID": 99999992, + "time": 1483346466000 +}
\ No newline at end of file diff --git a/docs/apex/events/1/EventOut_BoozeItem_201713GMT.json b/docs/apex/events/1/EventOut_BoozeItem_201713GMT.json new file mode 100644 index 00000000..2b760d5f --- /dev/null +++ b/docs/apex/events/1/EventOut_BoozeItem_201713GMT.json @@ -0,0 +1,17 @@ +{ + "name": "SALE_AUTH", + "version": "0.0.1", + "nameSpace": "com.hyperm", + "source": "", + "target": "", + "amount": 4799, + "assistant_ID": 9, + "authorised": true, + "branch_ID": 3, + "item_ID": 1943, + "message": "Sale authorised by policy task MorningBoozeCheck for time 20:17:13 GMT", + "notes": null, + "quantity": 2, + "sale_ID": 99999993, + "time": 1482265033000 +}
\ No newline at end of file diff --git a/docs/apex/events/1/EventOut_NonBoozeItem_101309GMT.json b/docs/apex/events/1/EventOut_NonBoozeItem_101309GMT.json new file mode 100644 index 00000000..b90c6fa0 --- /dev/null +++ b/docs/apex/events/1/EventOut_NonBoozeItem_101309GMT.json @@ -0,0 +1,17 @@ +{ + "name": "SALE_AUTH", + "version": "0.0.1", + "nameSpace": "com.hyperm", + "source": "", + "target": "", + "amount": 299, + "assistant_ID": 23, + "authorised": true, + "branch_ID": 1, + "item_ID": 5123, + "message": "Sale authorised by policy task MorningBoozeCheck for time 10:13:09 GMT", + "notes": "Special Offer!!", + "quantity": 1, + "sale_ID": 99999991, + "time": 1483351989000 +}
\ No newline at end of file diff --git a/docs/apex/events/1/EventsIn.json.txt b/docs/apex/events/1/EventsIn.json.txt new file mode 100644 index 00000000..a9570f98 --- /dev/null +++ b/docs/apex/events/1/EventsIn.json.txt @@ -0,0 +1,37 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1483346466000, + "sale_ID": 99999992, + "amount": 1249, + "item_ID": 1012, + "quantity": 1, + "assistant_ID": 12, + "branch_ID": 2 +} +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1482265033000, + "sale_ID": 99999993, + "amount": 4799, + "item_ID": 1943, + "quantity": 2, + "assistant_ID": 9, + "branch_ID": 3 +} +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1483351989000, + "sale_ID": 99999991, + "amount": 299, + "item_ID": 5123, + "quantity": 1, + "assistant_ID": 23, + "branch_ID": 1, + "notes": "Special Offer!!" +}
\ No newline at end of file diff --git a/docs/apex/events/1/EventsOut.json.txt b/docs/apex/events/1/EventsOut.json.txt new file mode 100644 index 00000000..46fd887f --- /dev/null +++ b/docs/apex/events/1/EventsOut.json.txt @@ -0,0 +1,51 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_AUTH", + "version": "0.0.1", + "source": "", + "target": "", + "amount": 1249, + "assistant_ID": 12, + "authorised": false, + "branch_ID": 2, + "item_ID": 1012, + "message": "Sale not authorised by policy task MorningBoozeCheck for time 08:41:06 GMT. Alcohol can not be sold between 00:00:00 GMT and 11:30:00 GMT", + "notes": null, + "quantity": 1, + "sale_ID": 99999992, + "time": 1483346466000 +} +{ + "name": "SALE_AUTH", + "version": "0.0.1", + "nameSpace": "com.hyperm", + "source": "", + "target": "", + "amount": 4799, + "assistant_ID": 9, + "authorised": true, + "branch_ID": 3, + "item_ID": 1943, + "message": "Sale authorised by policy task MorningBoozeCheck for time 20:17:13 GMT", + "notes": null, + "quantity": 2, + "sale_ID": 99999993, + "time": 1482265033000 +} +{ + "name": "SALE_AUTH", + "version": "0.0.1", + "nameSpace": "com.hyperm", + "source": "", + "target": "", + "amount": 299, + "assistant_ID": 23, + "authorised": true, + "branch_ID": 1, + "item_ID": 5123, + "message": "Sale authorised by policy task MorningBoozeCheck for time 10:13:09 GMT", + "notes": "Special Offer!!", + "quantity": 1, + "sale_ID": 99999991, + "time": 1483351989000 +}
\ No newline at end of file diff --git a/docs/apex/events/2/EventIn_BoozeItem_101433CET_thurs.json b/docs/apex/events/2/EventIn_BoozeItem_101433CET_thurs.json new file mode 100644 index 00000000..952b4b18 --- /dev/null +++ b/docs/apex/events/2/EventIn_BoozeItem_101433CET_thurs.json @@ -0,0 +1,12 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1482398073000, + "sale_ID": 99999981, + "amount": 299, + "item_ID": 1047, + "quantity": 1, + "assistant_ID": 1212, + "branch_ID": 1002 +} diff --git a/docs/apex/events/2/EventIn_BoozeItem_171937CET_sun.json b/docs/apex/events/2/EventIn_BoozeItem_171937CET_sun.json new file mode 100644 index 00000000..7c8fb2bf --- /dev/null +++ b/docs/apex/events/2/EventIn_BoozeItem_171937CET_sun.json @@ -0,0 +1,13 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1482077977000, + "sale_ID": 99999982, + "amount": 2199, + "item_ID": 1443, + "quantity": 12, + "assistant_ID": 94, + "branch_ID": 1003, + "notes": "Buy 3, get 1 free!!" +} diff --git a/docs/apex/events/2/EventIn_NonBoozeItem_111309CET_mon.json b/docs/apex/events/2/EventIn_NonBoozeItem_111309CET_mon.json new file mode 100644 index 00000000..f8aa8760 --- /dev/null +++ b/docs/apex/events/2/EventIn_NonBoozeItem_111309CET_mon.json @@ -0,0 +1,13 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1483351989000, + "sale_ID": 99999983, + "amount": 699, + "item_ID": 5321, + "quantity": 1, + "assistant_ID": 2323, + "branch_ID": 1001, + "notes": "" +} diff --git a/docs/apex/events/2/EventOut_BoozeItem_101433CET_thurs.json b/docs/apex/events/2/EventOut_BoozeItem_101433CET_thurs.json new file mode 100644 index 00000000..d7c3a378 --- /dev/null +++ b/docs/apex/events/2/EventOut_BoozeItem_101433CET_thurs.json @@ -0,0 +1,17 @@ +{ + "nameSpace" : "com.hyperm", + "name" : "SALE_AUTH", + "version" : "0.0.1", + "source" : "", + "target" : "", + "sale_ID" : 99999981, + "amount" : 299, + "assistant_ID" : 1212, + "notes" : null, + "quantity" : 1, + "branch_ID" : 1002, + "item_ID" : 1047, + "authorised" : false, + "time" : 1482398073000, + "message" : "Sale not authorised by policy task MorningBoozeCheckAlt1 for time 10:14:33 CET. Alcohol can not be sold between 00:00:00 CET and 13:00:00 CET or on Sunday" +} diff --git a/docs/apex/events/2/EventOut_BoozeItem_171937CET_sun.json b/docs/apex/events/2/EventOut_BoozeItem_171937CET_sun.json new file mode 100644 index 00000000..cb838b83 --- /dev/null +++ b/docs/apex/events/2/EventOut_BoozeItem_171937CET_sun.json @@ -0,0 +1,17 @@ +{ + "nameSpace" : "com.hyperm", + "name" : "SALE_AUTH", + "version" : "0.0.1", + "source" : "", + "target" : "", + "sale_ID" : 99999982, + "amount" : 2199, + "assistant_ID" : 94, + "notes" : "Buy 3, get 1 free!!", + "quantity" : 12, + "branch_ID" : 1003, + "item_ID" : 1443, + "authorised" : false, + "time" : 1482077977000, + "message" : "Sale not authorised by policy task MorningBoozeCheckAlt1 for time 17:19:37 CET. Alcohol can not be sold between 00:00:00 CET and 13:00:00 CET or on Sunday" +} diff --git a/docs/apex/events/2/EventOut_NonBoozeItem_111309CET_mon.json b/docs/apex/events/2/EventOut_NonBoozeItem_111309CET_mon.json new file mode 100644 index 00000000..4b031e45 --- /dev/null +++ b/docs/apex/events/2/EventOut_NonBoozeItem_111309CET_mon.json @@ -0,0 +1,17 @@ +{ + "nameSpace" : "com.hyperm", + "name" : "SALE_AUTH", + "version" : "0.0.1", + "source" : "", + "target" : "", + "sale_ID" : 99999983, + "amount" : 699, + "assistant_ID" : 2323, + "notes" : "", + "quantity" : 1, + "branch_ID" : 1001, + "item_ID" : 5321, + "authorised" : true, + "time" : 1483351989000, + "message" : "Sale authorised by policy task MorningBoozeCheckAlt1 for time 11:13:09 CET" +} diff --git a/docs/apex/events/2/EventsIn.json.txt b/docs/apex/events/2/EventsIn.json.txt new file mode 100644 index 00000000..a38fcdbc --- /dev/null +++ b/docs/apex/events/2/EventsIn.json.txt @@ -0,0 +1,75 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1483346466000, + "sale_ID": 99999992, + "amount": 1249, + "item_ID": 1012, + "quantity": 1, + "assistant_ID": 12, + "branch_ID": 2 +} +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1482265033000, + "sale_ID": 99999993, + "amount": 4799, + "item_ID": 1943, + "quantity": 2, + "assistant_ID": 9, + "branch_ID": 3 +} +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1483351989000, + "sale_ID": 99999991, + "amount": 299, + "item_ID": 5123, + "quantity": 1, + "assistant_ID": 23, + "branch_ID": 1, + "notes": "Special Offer!!" +} +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1482398073000, + "sale_ID": 99999981, + "amount": 299, + "item_ID": 1047, + "quantity": 1, + "assistant_ID": 1212, + "branch_ID": 1002 +} +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1482077977000, + "sale_ID": 99999982, + "amount": 2199, + "item_ID": 1443, + "quantity": 12, + "assistant_ID": 94, + "branch_ID": 1003, + "notes": "Buy 3, get 1 free!!" +} +{ + "nameSpace": "com.hyperm", + "name": "SALE_INPUT", + "version": "0.0.1", + "time": 1483351989000, + "sale_ID": 99999983, + "amount": 699, + "item_ID": 5321, + "quantity": 1, + "assistant_ID": 2323, + "branch_ID": 1001, + "notes": "" +} diff --git a/docs/apex/events/2/EventsOut.json.txt b/docs/apex/events/2/EventsOut.json.txt new file mode 100644 index 00000000..16cff198 --- /dev/null +++ b/docs/apex/events/2/EventsOut.json.txt @@ -0,0 +1,102 @@ +{ + "nameSpace": "com.hyperm", + "name": "SALE_AUTH", + "version": "0.0.1", + "source": "", + "target": "", + "amount": 1249, + "assistant_ID": 12, + "authorised": false, + "branch_ID": 2, + "item_ID": 1012, + "message": "Sale not authorised by policy task MorningBoozeCheck for time 08:41:06 GMT. Alcohol can not be sold between 00:00:00 GMT and 11:30:00 GMT", + "notes": null, + "quantity": 1, + "sale_ID": 99999992, + "time": 1483346466000 +} +{ + "name": "SALE_AUTH", + "version": "0.0.1", + "nameSpace": "com.hyperm", + "source": "", + "target": "", + "amount": 4799, + "assistant_ID": 9, + "authorised": true, + "branch_ID": 3, + "item_ID": 1943, + "message": "Sale authorised by policy task MorningBoozeCheck for time 20:17:13 GMT", + "notes": null, + "quantity": 2, + "sale_ID": 99999993, + "time": 1482265033000 +} +{ + "name": "SALE_AUTH", + "version": "0.0.1", + "nameSpace": "com.hyperm", + "source": "", + "target": "", + "amount": 299, + "assistant_ID": 23, + "authorised": true, + "branch_ID": 1, + "item_ID": 5123, + "message": "Sale authorised by policy task MorningBoozeCheck for time 10:13:09 GMT", + "notes": "Special Offer!!", + "quantity": 1, + "sale_ID": 99999991, + "time": 1483351989000 +} +{ + "nameSpace" : "com.hyperm", + "name" : "SALE_AUTH", + "version" : "0.0.1", + "source" : "", + "target" : "", + "sale_ID" : 99999981, + "amount" : 299, + "assistant_ID" : 1212, + "notes" : null, + "quantity" : 1, + "branch_ID" : 1002, + "item_ID" : 1047, + "authorised" : false, + "time" : 1482398073000, + "message" : "Sale not authorised by policy task MorningBoozeCheckAlt1 for time 10:14:33 CET. Alcohol can not be sold between 00:00:00 CET and 13:00:00 CET or on Sunday" +} +{ + "nameSpace" : "com.hyperm", + "name" : "SALE_AUTH", + "version" : "0.0.1", + "source" : "", + "target" : "", + "sale_ID" : 99999982, + "amount" : 2199, + "assistant_ID" : 94, + "notes" : "Buy 3, get 1 free!!", + "quantity" : 12, + "branch_ID" : 1003, + "item_ID" : 1443, + "authorised" : false, + "time" : 1482077977000, + "message" : "Sale not authorised by policy task MorningBoozeCheckAlt1 for time 17:19:37 CET. Alcohol can not be sold between 00:00:00 CET and 13:00:00 CET or on Sunday" +} +{ + "nameSpace" : "com.hyperm", + "name" : "SALE_AUTH", + "version" : "0.0.1", + "source" : "", + "target" : "", + "sale_ID" : 99999983, + "amount" : 699, + "assistant_ID" : 2323, + "notes" : "", + "quantity" : 1, + "branch_ID" : 1001, + "item_ID" : 5321, + "authorised" : true, + "time" : 1483351989000, + "message" : "Sale authorised by policy task MorningBoozeCheckAlt1 for time 11:13:09 CET" +} diff --git a/docs/apex/images/pcvs/vpnsla-arch.png b/docs/apex/images/pcvs/vpnsla-arch.png Binary files differnew file mode 100644 index 00000000..0aa39137 --- /dev/null +++ b/docs/apex/images/pcvs/vpnsla-arch.png diff --git a/docs/api/api.rst b/docs/api/api.rst index a54ed4a4..5428a6fc 100644 --- a/docs/api/api.rst +++ b/docs/api/api.rst @@ -19,8 +19,8 @@ for storing and fetching new policies or policy types as needed. Apart from CRUD healthcheck status of this API REST service and statistics report including a variety of counters that reflect the history of API invocation. -Starting from Dublin release, we strictly follow `TOSCA Specification <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/TOSCA-Simple-Profile-YAML-v1.1.pdf>`_ -to define policy type and policy. Policy type is equivalent to policy model mentioned by clients before Dublin release. +We strictly follow `TOSCA Specification <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/TOSCA-Simple-Profile-YAML-v1.1.pdf>`_ +to define policy type and policy. A policy type is equivalent to the policy model mentioned by clients before Dublin release. Both policy type and policy are included in a TOSCA Service Template which is used as the entity passed into API POST call and the entity returned by API GET and DELETE calls. More details are presented in following sessions. We encourage clients to compose all kinds of policies and corresponding policy types in well-formed TOSCA Service Template. @@ -29,51 +29,69 @@ atop. In other words, different policies can match the same or different policy of creating such type of policies. In the payload body of each policy to create, policy type name and version should be indicated and the specified policy type should be valid and existing in policy database. -Starting from El Alto release, to ease policy creation, we preload several widely used policy types in policy database. Below is a table summarizing -preloaded policy types. +To ease policy creation, we preload several widely used policy types in policy database. Below is a table listing the preloaded policy types. .. csv-table:: :header: "Policy Type Name", "Payload" :widths: 15,10 - "Controlloop.Guard.Blacklist", `onap.policies.controlloop.guard.Blacklist.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.Blacklist.yaml>`_ - "Controlloop.Guard.FrequencyLimiter", `onap.policies.controlloop.guard.FrequencyLimiter.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.FrequencyLimiter.yaml>`_ - "Controlloop.Guard.MinMax", `onap.policies.controlloop.guard.MinMax.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.MinMax.yaml>`_ - "Controlloop.Guard.Coordination.FirstBlocksSecond", `onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml>`_ - "Controlloop.Operational", `onap.policies.controlloop.Operational.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.Operational.yaml>`_ "Monitoring.TCA", `onap.policies.monitoring.cdap.tca.hi.lo.app.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml>`_ "Monitoring.Collectors", `onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml>`_ "Optimization", `onap.policies.Optimization.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.Optimization.yaml>`_ - "Optimization.AffinityPolicy", `onap.policies.optimization.AffinityPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.AffinityPolicy.yaml>`_ - "Optimization.DistancePolicy", `onap.policies.optimization.DistancePolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.DistancePolicy.yaml>`_ - "Optimization.HpaPolicy", `onap.policies.optimization.HpaPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.HpaPolicy.yaml>`_ - "Optimization.OptimizationPolicy", `onap.policies.optimization.OptimizationPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.OptimizationPolicy.yaml>`_ - "Optimization.PciPolicy", `onap.policies.optimization.PciPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.PciPolicy.yaml>`_ - "Optimization.QueryPolicy", `onap.policies.optimization.QueryPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.QueryPolicy.yaml>`_ - "Optimization.SubscriberPolicy", `onap.policies.optimization.SubscriberPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.SubscriberPolicy.yaml>`_ - "Optimization.Vim_fit", `onap.policies.optimization.Vim_fit.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.Vim_fit.yaml>`_ - "Optimization.VnfPolicy", `onap.policies.optimization.VnfPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.VnfPolicy.yaml>`_ - -Also, in El Alto release, We provide backward compatibility support for controlloop operational and guard -policies encoded in legacy format. Below is a table containing sample legacy guard/operational policies and -well-formed TOSCA monitoring policies. + "Optimization.Resource", `onap.policies.optimization.Resource.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.Resource.yaml>`_ + "Optimization.Resource.AffinityPolicy", `onap.policies.optimization.resource.AffinityPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml>`_ + "Optimization.Resource.DistancePolicy", `onap.policies.optimization.resource.DistancePolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.resource.DistancePolicy.yaml>`_ + "Optimization.Resource.HpaPolicy", `onap.policies.optimization.resource.HpaPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.resource.HpaPolicy.yaml>`_ + "Optimization.Resource.OptimizationPolicy", `onap.policies.optimization.resource.OptimizationPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml>`_ + "Optimization.Resource.PciPolicy", `onap.policies.optimization.resource.PciPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.resource.PciPolicy.yaml>`_ + "Optimization.Resource.Vim_fit", `onap.policies.optimization.resource.Vim_fit.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.resource.Vim_fit.yaml>`_ + "Optimization.Resource.VnfPolicy", `onap.policies.optimization.resource.VnfPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.resource.VnfPolicy.yaml>`_ + "Optimization.Service", `onap.policies.optimization.Service.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.Service.yaml>`_ + "Optimization.Service.QueryPolicy", `onap.policies.optimization.service.QueryPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.service.QueryPolicy.yaml>`_ + "Optimization.Service.SubscriberPolicy", `onap.policies.optimization.service.SubscriberPolicy.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml>`_ + "Controlloop.Guard.Common", `onap.policies.controlloop.guard.Common.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.Common.yaml>`_ + "Controlloop.Guard.Common.Blacklist", `onap.policies.controlloop.guard.common.Blacklist.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml>`_ + "Controlloop.Guard.Common.FrequencyLimiter", `onap.policies.controlloop.guard.common.FrequencyLimiter.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml>`_ + "Controlloop.Guard.Common.MinMax", `onap.policies.controlloop.guard.common.MinMax.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.MinMax.yaml>`_ + "Controlloop.Guard.Coordination.FirstBlocksSecond", `onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml>`_ + "Controlloop.Operational", `onap.policies.controlloop.Operational.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.Operational.yaml>`_ + "Controlloop.Operational.Common", `onap.policies.controlloop.operational.Common.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.operational.Common.yaml>`_ + "Controlloop.Operational.Common.Apex", `onap.policies.controlloop.operational.common.Apex.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.operational.common.Apex.yaml>`_ + "Controlloop.Operational.Common.Drools", `onap.policies.controlloop.operational.common.Drools.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.controlloop.operational.common.Drools.yaml>`_ + "Naming", `onap.policies.Naming.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.Naming.yaml>`_ + "Native.Drools", `onap.policies.native.Drools.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.native.Drools.yaml>`_ + "Native.Xacml", `onap.policies.native.Xacml.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.native.Xacml.yaml>`_ + "Native.Apex", `onap.policies.native.Apex.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policytypes/onap.policies.native.Apex.yaml>`_ + +We also preload a policy in the policy database. Below is a table listing the preloaded polic(ies). + +.. csv-table:: + :header: "Policy Type Name", "Payload" + :widths: 15,10 + + "SDNC.Naming", `sdnc.policy.naming.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/sdnc.policy.naming.input.tosca.yaml>`_ + +Below is a table containing sample well-formed TOSCA compliant policies. .. csv-table:: :header: "Policy Name", "Payload" :widths: 15,10 "vCPE.Monitoring.Tosca", `vCPE.policy.monitoring.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.yaml>`_ `vCPE.policy.monitoring.input.tosca.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json>`_ - "vCPE.Optimization.Tosca", `vCPE.policies.optimization.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.policies.optimization.input.tosca.yaml>`_ - "vCPE.Operational.Legacy", `vCPE.policy.operational.input.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.policy.operational.input.json>`_ - "vDNS.Guard.FrequencyLimiting.Legacy", `vDNS.policy.guard.frequency.input.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.guard.frequency.input.json>`_ - "vDNS.Guard.MinMax.Legacy", `vDNS.policy.guard.minmax.input.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.guard.minmax.input.json>`_ + "vCPE.Optimization.Tosca", `vCPE.policies.optimization.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.policies.optimization.input.tosca.yaml>`_ `vCPE.policies.optimization.input.tosca.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.policies.optimization.input.tosca.json>`_ + "vCPE.Operational.Tosca", `vCPE.policy.operational.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.policy.operational.input.tosca.yaml>`_ `vCPE.policy.operational.input.tosca.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vCPE.policy.operational.input.tosca.json>`_ + "vDNS.Guard.FrequencyLimiting.Tosca", `vDNS.policy.guard.frequencylimiter.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.guard.frequencylimiter.input.tosca.yaml>`_ + "vDNS.Guard.MinMax.Tosca", `vDNS.policy.guard.minmaxvnfs.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.guard.minmaxvnfs.input.tosca.yaml>`_ + "vDNS.Guard.Blacklist.Tosca", `vDNS.policy.guard.blacklist.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.guard.blacklist.input.tosca.yaml>`_ "vDNS.Monitoring.Tosca", `vDNS.policy.monitoring.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.yaml>`_ `vDNS.policy.monitoring.input.tosca.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.json>`_ - "vDNS.Operational.Legacy", `vDNS.policy.operational.input.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.operational.input.json>`_ + "vDNS.Operational.Tosca", `vDNS.policy.operational.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.operational.input.tosca.yaml>`_ `vDNS.policy.operational.input.tosca.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vDNS.policy.operational.input.tosca.json>`_ "vFirewall.Monitoring.Tosca", `vFirewall.policy.monitoring.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml>`_ `vFirewall.policy.monitoring.input.tosca.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.json>`_ - "vFirewall.Operational.Legacy", `vFirewall.policy.operational.input.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.json>`_ + "vFirewall.Operational.Tosca", `vFirewall.policy.operational.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.tosca.yaml>`_ `vFirewall.policy.operational.input.tosca.json <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.tosca.json>`_ + "vFirewallCDS.Operational.Tosca", `vFirewallCDS.policy.operational.input.tosca.yaml <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vFirewallCDS.policy.operational.input.tosca.yaml>`_ Below is a global API table from where swagger JSON for different types of policy design API can be downloaded. + Global API Table -------------------- .. csv-table:: @@ -84,7 +102,6 @@ Global API Table "Statistics API", ":download:`link <swagger/statistics-api.json>`" "Tosca Policy Type API", ":download:`link <swagger/policytype-api.json>`" "Tosca Policy API", ":download:`link <swagger/policy-api.json>`" - "Legacy Guard Policy API", ":download:`link <swagger/guard-policy-api.json>`" "Legacy Operational Policy API", ":download:`link <swagger/operational-policy-api.json>`" API Swagger @@ -129,9 +146,8 @@ Please check out the sample policies in above policy table. Also, in the POST payload passed into each policy or policy type creation call (i.e. POST API invocation), the client needs to explicitly specify the version of the policy or policy type to create. That being said, the "version" field is mandatory in the TOSCA service template -formatted policy or policy type payload. Likewise in the legacy guard and the operational policy payload, "policy-version" is mandatory too. -If the version is missing, that POST call will return "406 - Not Acceptable" and the policy or policy type to create will not be stored in -the database. +formatted policy or policy type payload. If the version is missing, that POST call will return "406 - Not Acceptable" and +the policy or policy type to create will not be stored in the database. To avoid inconsistent versions between the database and policies deployed in the PDPs, policy API REST service employs some enforcement rules that validate the version specified in the POST payload when a new version is to create or an existing version to update. @@ -140,45 +156,32 @@ Instead, we encourage the client to carefully select a version for the policy or of the version and feed an informative warning back to the client if the specified version is not good. To be specific, the following rules are implemented to enforce the version: -1. If the version is not in the database, we simply insert it. For example: if policy version 1.0.0 is stored in the database and now +1. If the incoming version is not in the database, we simply insert it. For example: if policy version 1.0.0 is stored in the database and now a client wants to create the same policy with updated version 3.0.0, this POST call will succeed and return "200" to the client. -2. If the version is already in the database, "406 - Not Acceptable" will be returned along with the message saying "specified version x.x.x" - is already existing and the latest version is y.y.y. It can force the client to create a newer version than the latest one. - For example, if policy versions "1.0.0" and "2.0.0" are already in the database and a client wants to create version "1.0.0" again, the - client will get "406" code returned along with the message "specified version 1.0.0 is already existing and the latest version is 2.0.0". - Then the client can change the version to anything newer than "2.0.0", such as "3.0.0". +2. If the incoming version is already in the database and the incoming payload is different from the same version in the database, + "406 - Not Acceptable" will be returned. This forces the client to update the version of the policy if the policy is changed. + +3. If a client creates a version of a policy and wishes to update a property on the policy, they must delete that version of the policy and re-create it. -3. If multiple policies or policy types are included in the POST payload, policy API will also check if duplicate version exists in between +4. If multiple policies are included in the POST payload, policy API will also check if duplicate version exists in between any two policies or policy types provided in the payload. For example, a client provides a POST payload which includes two policies with the same name and version but different policy properties. This POST call will fail and return "406" error back to the calling application along with a message such as "duplicate policy {name}:{version} found in the payload". -4. The same version validation is applied to legacy types of policies and policy types too (i.e. legacy guard and operational) so that everything - is consistent. +5. The same version validation is applied to policy types too. -5. To avoid unnecessary id/version inconsistency between the ones specified in the entity fields and the ones returned in the metadata field, +6. To avoid unnecessary id/version inconsistency between the ones specified in the entity fields and the ones returned in the metadata field, "policy-id" and "policy-version" in the metadata will only be set by policy API. Any incoming explicit specification in the POST payload will be ignored. For example, A POST payload has a policy with name "sample-policy-name1" and version "1.0.0" specified. In this policy, the metadata also includes "policy-id": "sample-policy-name2" and "policy-version": "2.0.0". The 200 return of this POST call will have this created policy with metadata including "policy-id": "sample-policy-name1" and "policy-version": "1.0.0". -.. swaggerv2doc:: swagger/guard-policy-api.json - -It is worth noting that guard policy name should start with one of the three: *guard.frequency.*, *guard.minmax.*, or *guard.blacklist.*. -Otherwise, it will complain that guard policy type cannot be found (does not exist). Apart from policy name, the policy version specified -in API path should be an integer, e.g. 1, 2, 10, instead of "1.0.0", "2.0.1", etc. -These naming restrictions will disappear after we evolve to use well-formed TOSCA Service Template for guard policies and -legacy policy design API is then deprecated. - .. swaggerv2doc:: swagger/operational-policy-api.json -Likewise, the policy version specified in operational policy API path should be an integer too, e.g. 1, 2, 10, instead of -"1.0.0", "2.0.1", etc. This restriction will disappear after we deprecate legacy policy design API in the near future release. - -Regarding DELETE APIs for both TOSCA policies and legacy policies, we only expose API to delete one particular version of policy +Regarding DELETE APIs for TOSCA compliant policies, we only expose API to delete one particular version of policy or policy type at a time for safety purpose. If client has the need to delete multiple or a group of policies or policy types, -they will need to delete one by one. +they will need to delete them one by one. Sample API Curl Commands ------------------------- @@ -192,15 +195,15 @@ Create vFirewall Monitoring Policy:: Get vFirewall Monitoring Policy:: curl --user 'healthcheck:zb!XztG34' -X GET "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.vfirewall.tca/versions/1.0.0" -H "Accept: application/json" -H "Content-Type: application/json" - + Delete vFirewall Monitoring Policy:: curl --user 'healthcheck:zb!XztG34' -X DELETE "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.vfirewall.tca/versions/1.0.0" -H "Accept: application/json" -H "Content-Type: application/json" Create vFirewall Operational Policy:: - curl --user 'healthcheck:zb!XztG34' -X POST "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @vFirewall.policy.operational.input.json - + curl --user 'healthcheck:zb!XztG34' -X POST "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @vFirewall.policy.operational.input.tosca.json + Get vFirewall Operational Policy:: - curl --user 'healthcheck:zb!XztG34' -X GET "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/operational.modifyconfig/versions/1" -H "Accept: application/json" -H "Content-Type: application/json" - + curl --user 'healthcheck:zb!XztG34' -X GET "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0" -H "Accept: application/json" -H "Content-Type: application/json" + Delete vFirewall Operational Policy:: - curl --user 'healthcheck:zb!XztG34' -X DELETE "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/operational.modifyconfig/versions/1" -H "Accept: application/json" -H "Content-Type: application/json" + curl --user 'healthcheck:zb!XztG34' -X DELETE "http://{ip}:{port}/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0" -H "Accept: application/json" -H "Content-Type: application/json" diff --git a/docs/api/swagger/guard-policy-api.json b/docs/api/swagger/guard-policy-api.json deleted file mode 100644 index 501312e5..00000000 --- a/docs/api/swagger/guard-policy-api.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "swagger" : "2.0", - "basePath" : "/", - "tags" : [ { - "name" : "Legacy Guard Policy" - } ], - "schemes" : [ "http", "https" ], - "paths" : { - "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/latest" : { - "get" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Retrieve the latest version of a particular guard policy", - "description" : "Returns the latest version of the specified guard policy", - "operationId" : "getLatestVersionOfGuardPolicy", - "produces" : [ "application/json", "application/yaml" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Latest version of specified guard policy will be returned.", - "headers" : { - "X-MinorVersion" : { - "type" : "string", - "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client" - }, - "X-PatchVersion" : { - "type" : "string", - "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request" - }, - "X-LatestVersion" : { - "type" : "string", - "description" : "Used only to communicate an API's latest version" - }, - "X-ONAP-RequestID" : { - "type" : "string", - "format" : "uuid", - "description" : "Used to track REST transactions for logging purpose" - } - }, - "schema" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/deployed" : { - "get" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Retrieve deployed versions of a particular guard policy in pdp groups", - "description" : "Returns deployed versions of a specified guard policy in pdp groups", - "operationId" : "getDeployedVersionsOfGuardPolicy", - "produces" : [ "application/json", "application/yaml" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of guard policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Deployed versions of specified guard policy in PDP groups will be returned.", - "headers" : { - "X-MinorVersion" : { - "type" : "string", - "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client" - }, - "X-PatchVersion" : { - "type" : "string", - "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request" - }, - "X-LatestVersion" : { - "type" : "string", - "description" : "Used only to communicate an API's latest version" - }, - "X-ONAP-RequestID" : { - "type" : "string", - "format" : "uuid", - "description" : "Used to track REST transactions for logging purpose" - } - }, - "schema" : { - "type" : "map", - "items" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}" : { - "get" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Retrieve one version of a particular guard policy", - "description" : "Returns a particular version of a specified guard policy", - "operationId" : "getSpecificVersionOfGuardPolicy", - "produces" : [ "application/json", "application/yaml" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "policyVersion", - "in" : "path", - "description" : "Version of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Specified version of guard policy will be returned.", - "headers" : { - "X-MinorVersion" : { - "type" : "string", - "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client" - }, - "X-PatchVersion" : { - "type" : "string", - "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request" - }, - "X-LatestVersion" : { - "type" : "string", - "description" : "Used only to communicate an API's latest version" - }, - "X-ONAP-RequestID" : { - "type" : "string", - "format" : "uuid", - "description" : "Used to track REST transactions for logging purpose" - } - }, - "schema" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - }, - "delete" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Delete a particular version of a guard policy", - "description" : "Delete a particular version of a guard policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted", - "operationId" : "deleteSpecificVersionOfGuardPolicy", - "consumes" : [ "application/json", "application/yaml" ], - "produces" : [ "application/json", "application/yaml" ], - "parameters" : [ { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "policyVersion", - "in" : "path", - "description" : "Version of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly deleted guard policy will be returned.", - "headers" : { - "X-MinorVersion" : { - "type" : "string", - "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client" - }, - "X-PatchVersion" : { - "type" : "string", - "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request" - }, - "X-LatestVersion" : { - "type" : "string", - "description" : "Used only to communicate an API's latest version" - }, - "X-ONAP-RequestID" : { - "type" : "string", - "format" : "uuid", - "description" : "Used to track REST transactions for logging purpose" - } - }, - "schema" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "409" : { - "description" : "Delete Conflict, Rule Violation" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, - "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies" : { - "post" : { - "tags" : [ "Legacy Guard Policy" ], - "summary" : "Create a new guard policy", - "description" : "Create a new guard policy. Client should provide entity body of the new guard policy", - "operationId" : "createGuardPolicy", - "consumes" : [ "application/json", "application/yaml" ], - "produces" : [ "application/json", "application/yaml" ], - "parameters" : [ { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - }, { - "in" : "body", - "name" : "body", - "description" : "Entity body of policy", - "required" : true, - "type" : "ToscaServiceTemplate", - "schema" : { - "$ref" : "#/definitions/LegacyGuardPolicyInput" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation; Newly created guard policy will be returned.", - "headers" : { - "X-MinorVersion" : { - "type" : "string", - "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client" - }, - "X-PatchVersion" : { - "type" : "string", - "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request" - }, - "X-LatestVersion" : { - "type" : "string", - "description" : "Used only to communicate an API's latest version" - }, - "X-ONAP-RequestID" : { - "type" : "string", - "format" : "uuid", - "description" : "Used to track REST transactions for logging purpose" - } - }, - "schema" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyOutput" - } - } - }, - "400" : { - "description" : "Invalid Body" - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "406" : { - "description" : "Not Acceptable Version" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - } - }, - "securityDefinitions" : { - "basicAuth" : { - "description" : "", - "type" : "basic" - } - }, - "definitions" : { - "LegacyGuardPolicyContent" : { - "type" : "object", - "properties" : { - "actor" : { - "type" : "string" - }, - "recipe" : { - "type" : "string" - }, - "targets" : { - "type" : "string" - }, - "clname" : { - "type" : "string" - }, - "limit" : { - "type" : "string" - }, - "timeWindow" : { - "type" : "string" - }, - "timeUnits" : { - "type" : "string" - }, - "min" : { - "type" : "string" - }, - "max" : { - "type" : "string" - }, - "guardActiveStart" : { - "type" : "string" - }, - "guardActiveEnd" : { - "type" : "string" - }, - "asPropertyMap" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "LegacyGuardPolicyOutput" : { - "type" : "object", - "properties" : { - "type" : { - "type" : "string" - }, - "version" : { - "type" : "string" - }, - "metadata" : { - "type" : "object", - "additionalProperties" : { - "type" : "object" - } - }, - "properties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/LegacyGuardPolicyContent" - } - } - } - }, - "LegacyGuardPolicyInput" : { - "type" : "object", - "properties" : { - "policy-id" : { - "type" : "string" - }, - "policy-version" : { - "type" : "string" - }, - "content" : { - "$ref" : "#/definitions/LegacyGuardPolicyContent" - } - } - } - } -} diff --git a/docs/api/swagger/policy-api.json b/docs/api/swagger/policy-api.json index ef070ef7..76735751 100644 --- a/docs/api/swagger/policy-api.json +++ b/docs/api/swagger/policy-api.json @@ -506,91 +506,7 @@ "last-mod-release" : "Dublin" } } - }, - "/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/deployed" : { - "get" : { - "tags" : [ "Policy" ], - "summary" : "Retrieve deployed versions of a particular policy in pdp groups", - "description" : "Returns deployed versions of specified policy in pdp groups", - "operationId" : "getDeployedVersionsOfPolicy", - "produces" : [ "application/json", "application/yaml" ], - "parameters" : [ { - "name" : "policyTypeId", - "in" : "path", - "description" : "ID of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyTypeVersion", - "in" : "path", - "description" : "Version of policy type", - "required" : true, - "type" : "string" - }, { - "name" : "policyId", - "in" : "path", - "description" : "ID of policy", - "required" : true, - "type" : "string" - }, { - "name" : "X-ONAP-RequestID", - "in" : "header", - "description" : "RequestID for http transaction", - "required" : false, - "type" : "string", - "format" : "uuid" - } ], - "responses" : { - "200" : { - "description" : "successful operation; Deployed versions of specified policy matching specified policy type will be returned.", - "headers" : { - "X-MinorVersion" : { - "type" : "string", - "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client" - }, - "X-PatchVersion" : { - "type" : "string", - "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request" - }, - "X-LatestVersion" : { - "type" : "string", - "description" : "Used only to communicate an API's latest version" - }, - "X-ONAP-RequestID" : { - "type" : "string", - "format" : "uuid", - "description" : "Used to track REST transactions for logging purpose" - } - }, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ToscaPolicy" - } - } - }, - "401" : { - "description" : "Authentication Error" - }, - "403" : { - "description" : "Authorization Error" - }, - "404" : { - "description" : "Resource Not Found" - }, - "500" : { - "description" : "Internal Server Error" - } - }, - "security" : [ { - "basicAuth" : [ ] - } ], - "x-interface info" : { - "api-version" : "1.0.0", - "last-mod-release" : "Dublin" - } - } - }, + }, "/policy/api/v1/policies" : { "post" : { "tags" : [ "Policy" ], diff --git a/docs/architecture/architecture.rst b/docs/architecture/architecture.rst index 9a587c50..b31c371c 100644 --- a/docs/architecture/architecture.rst +++ b/docs/architecture/architecture.rst @@ -1,6 +1,7 @@ .. This work is licensed under a .. Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 +.. _architecture: .. _architecture-label: @@ -32,7 +33,7 @@ benefit from the ONAP policy Framework because they can use the capabilities of their policies rather than embedding the decision making in their applications. The Policy Framework is deployment agnostic, it manages Policy Execution (in PDPs) and Enforcement (in PEPs) regardless -of how the PDPs and PEPs are deployed. This allows policy execution and enforcement can be deployed in a manner that +of how the PDPs and PEPs are deployed. This allows policy execution and enforcement to be deployed in a manner that meets the performance requirements of a given application or use case. In one deployment, policy execution could be deployed in a separate executing entity in a Docker container. In another, policy execution could be co-deployed with an application to increase performance. An example of co-deployment is the Drools PDP Control Loop image, which is a @@ -41,7 +42,8 @@ Docker image that combines the ONAP Drools use case application and dependencies The ONAP Policy Framework architecture separates policies from the platform that is supporting them. The framework supports development, deployment, and execution of any type of policy in ONAP. The Policy Framework is metadata (model) driven so that policy development, deployment, and execution is as flexible as possible and can support modern rapid -development ways of working such as DevOps. A metadata driven approach also allows the amount of programmed support +development ways of working such as `DevOps +<https://en.wikipedia.org/wiki/DevOps>`__. A metadata driven approach also allows the amount of programmed support required for policies to be reduced or ideally eliminated. We have identified five capabilities as being essential for the framework: @@ -66,21 +68,66 @@ policy specification. The ONAP Policy Framework complies with the `TOSCA approach for policies, see the :ref:`TOSCA Policy Primer <tosca-label>` for more information on how policies are modeled in TOSCA. -1. A Policy Type is a general implementation of a policy for a feature. For example, a Policy Type could be written to - manage Service Level Agreements for VPNs. The Policy Type is designed by a domain expert, who specifies the - parameters, triggers, and actions that the Policy Type will have. The implementation (the logic, rules, and tasks of - the Policy Type) is implemented by a skilled policy developer in consultation with domain experts. + 1. A *Policy Type* describes the properties, targets, and triggers that the policy for a feature can have. A Policy type is + implementation independent. It is the metadata that specifies: - a. For example, the VPN Policy Type is used to create VPN policies for a bank network, a car dealership network, or a - university with many campuses. + - the *configuration* data that the policy can take. The Policy Type describes each property that a policy of a + given type can take. A Policy Type definition also allows the default value, optionality, and the ranges of properties + to be defined. - b. In ONAP, specific ONAP Policy Types are used to create specific policies that drive the ONAP Platform and - Components. + - the *targets* such as network element types, functions, services, or resources on which a policy of the given type + can act. -2. A Policy is created by configuring a Policy Type with parameters. For example, the SLA values in the car dealership - VPN policy for a particular dealership are configured with values appropriate for the expected level of activity in - that dealership. + - the *triggers* such as the event type, filtered event, scheduled trigger, or conditions that can activate a policy + of the given type. + Policy Types are hierarchical, A Policy Type can inherit from a parent Policy Type, inheriting the properties, targets, + and triggers of its parent. Policy Types are developed by domain experts in consultation with the developers that + implement the logic and rules for the Policy Type. + + 2. A *Policy* is defined using a Policy Type. The Policy defines: + + - the values for each property of the policy type + - the specific targets (network elements, functions, services, resources) on which this policy will act + - the specific triggers that trigger this policy. + + 3. A *Policy Type Implementation* or *Raw Policy*, is the logic that implements the policy. It is implemented by a + skilled policy developer in consultation with domain experts. The implementation has software that reads the Policy + Type and parses the incoming configuration properties. The software has domain logic that is triggered when one of the + triggers described in the Policy Type occurs. The software logic executes and acts on the targets specified in the + Policy Type. + + +For example, a Policy Type could be written to describe how to manage Service Level Agreements for VPNs. The VPN Policy +Type can be used to create VPN policies for a bank network, a car dealership network, or a university with many campuses. +The Policy Type has two parameters: + + - The *maximumDowntime* parameter allows the maximum downtime allowed per year to be specified + - The *mitigationStrategy* parameter allows one of three strategies to be selected for downtime breaches + + - *allocateMoreResources*, which will automatically allocate more resources to mitigate the problem + - *report*, which report the downtime breach to a trouble ticketing system + - *ignore*, which logs the breach and takes no further action + +The Policy Type defines a trigger event, an event that is received from an analytics system when the maximum downtime +value for a VPN is breached. The target of the policy type is an instance of the VPN service. + +The Policy Type Implementation is developed that can configure the maximum downtime parameter in an analytics system, +can receive a trigger from the analytics system when the maximum downtime is breached, and that can either request more +resources, report an issue to a trouble ticketing system, and can log a breach. + +VPN Policies are created by specifying values for the properties, triggers, and targets specifed in VPN Policy Type. + +In the case of the bank network, the *maximumDowntime* threshold is specified as 5 minutes downtime per year and the +*mitigationStrategy* is defined as *allocateMoreResources*, and the target is specified as being the bank's VPN service +ID. When a breach is detected by the analytics system, the policy is executed, the target is identified as being the +bank's network, and more resources are allocated by the policy. + +For the car dealership VPN policy, a less stringent downtime threshold of 60 minutes per year is specified, and the +mitigation strategy is to issue a trouble ticket. The university network is best effort, so a downtime of 4 days per +year is specified. Breaches are logged and mitigated as routine network administration tasks. + +In ONAP, specific ONAP Policy Types are used to create specific policies that drive the ONAP Platform and Components. For more detailed information on designing Policy Types and developing an implementation for that policy type, see :ref:`Policy Design and Development <design-label>`. @@ -105,11 +152,11 @@ are executing correctly, and that the state and status of policies is monitored. running in the ONAP system and is responsible for making policy decisions and for managing the administrative state of the PDPs as directed by \ *PolicyAdministration.* -*PolicyDevelopment* creates policy artifacts and supporting information in the policy database. \ *PolicyAdministration* -reads those artifacts and the supporting information from the policy database whilst deploying policy artifacts. Once -the policy artifacts are deployed, *PolicyAdministration* handles the run-time management of the PDPs on which the -policies are running. *PolicyDevelopment* interacts with ONAP design time components, and has no programmatic interface -with *PolicyAdministration*, *PolicyExecution* or any other run-time ONAP components. +*PolicyDevelopment* provides APIs that allow creation of policy artifacts and supporting information in the policy +database. *PolicyAdministration* reads those artifacts and the supporting information from the policy database whilst +deploying policy artifacts. Once the policy artifacts are deployed, *PolicyAdministration* handles the run-time +management of the PDPs on which the policies are running. *PolicyDevelopment* interacts with the database, and has +no programmatic interface with *PolicyAdministration*, *PolicyExecution* or any other run-time ONAP components. The diagram below shows a more detailed view of the architecture, as inspired by `RFC-2753 <https://tools.ietf.org/html/rfc2753>`__ and `RFC-3198 <https://tools.ietf.org/html/rfc3198>`__. @@ -117,15 +164,15 @@ The diagram below shows a more detailed view of the architecture, as inspired by .. image:: images/PFDesignAndAdmin.svg *PolicyDevelopment* provides a `CRUD <https://en.wikipedia.org/wiki/Create,_read,_update_and_delete>`__ API for policy -types and policies. The policy types and policy artifacts and their metadata (Information about policies, policy types, +types and policies. The policy types and policy artifacts and their metadata (information about policies, policy types, and their interrelations) are stored in the *PolicyDB*. The *PolicyDevGUI*, PolicyDistribution, and other applications -such as *CLAMP* can use the *PolicyDevelopment* API to create, update, and delete policy types and policies. +such as *CLAMP* can use the *PolicyDevelopment* API to create, update, delete, and read policy types and policies. *PolicyAdministration* has two important functions: - Management of the life cycle of PDPs in an ONAP installation. PDPs register with *PolicyAdministration* when they come - up. *PolicyAdministration* handles the allocation of PDPs to a PDP Groups and PDP Subgroups, so that they can be - managed as microservices in Kubernetes. + up. *PolicyAdministration* handles the allocation of PDPs to PDP Groups and PDP Subgroups, so that they can be + managed as microservices in infrastructure management systems such as Kubernetes. - Management of the deployment of policies to PDPs in an ONAP installation. *PolicyAdministration* gives each PDP group a set of domain policies to execute. @@ -135,7 +182,7 @@ three APIs: - a CRUD API for policy groups and subgroups -- an API that allows the allocation of policies PDP groups and subgroups to be controlled +- an API that allows the allocation of policies to PDP groups and subgroups to be controlled - an API allows policy execution to be managed, showing the status of policy execution on PDP Groups, subgroups, and individual PDPs as well as the life cycle state of PDPs @@ -154,8 +201,8 @@ is a group of PDPs of the same type that are running the same policies. *A PDPSu structuring of PDPs is required because, in order to simplify deployment and scaling of PDPs in Kubernetes, we gather all the PDPs of the same type that are running the same policies together for deployment. -For example, assume we have policies for the SON (Self Organizing Network) and ACPE (Advanced Customer Premises Service) -domains. For SON,we have XACML, Drools, and APEX policies, and for ACPE we have XACML and Drools policies. The table +For example, assume we have policies for the SON (Self Organizing Network) and ACPS (Advanced Customer Premises Service) +domains. For SON,we have XACML, Drools, and APEX policies, and for ACPS we have XACML and Drools policies. The table below shows the resulting \ *PDPGroup*, *PDPSubGroup*, and PDP allocations: ============= ================ ========================= ======================================== ================ @@ -166,8 +213,8 @@ SON SON-XACML SON-XACML-Dep Always 2, be geo redund scale down on 40% load, be geo-redundant \ SON-APEX SON-APEX-Dep At Least 3, scale up on 70% load, scale >= 3 PDP-A down on 40% load, be geo-redundant -ACPE ACPE-XACML ACPE-XACML-Dep Always 2 2 PDP-X -\ ACPE-Drools ACPE-Drools-Dep At Least 2, scale up on 80% load, scale >=2 PDP-D +ACPS ACPS-XACML ACPS-XACML-Dep Always 2 2 PDP-X +\ ACPS-Drools ACPS-Drools-Dep At Least 2, scale up on 80% load, scale >=2 PDP-D down on 50% load ============= ================ ========================= ======================================== ================ @@ -182,13 +229,7 @@ implemented as a common model and is used by *PolicyDevelopment*, *PolicyDeploym .. image:: images/ClassStructure.svg -The UML class diagram above shows the portion of the Policy Framework Object Model that applies to *PolicyDeployment* -and *PolicyExecution.* - -.. image:: images/DesignTimeComponents.svg - -The UML class diagram above shows the portion of the Policy Framework Object Model that applies to *PolicyDevelopment* -and *PolicyDeployment.* +The UML class diagram above shows thePolicy Framework Object Model. 2.2 Policy Design Architecture ------------------------------ @@ -200,7 +241,7 @@ Framework database. Policies that are expressed via natural language or a model require some development work ahead of time for them to be translated into concrete runtime policies. Some Policy Domains will be set up and available in the platform during startup such as Control Loop Operational Policy Models, OOF placement Models, DCAE microservice models. Policy type -implementation development is done by an experienced developer. +implementation logic development is done by an experienced developer. 2.2.1 Policy Type Design ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -209,32 +250,32 @@ Policy Type Design is the task of creating policy types that capture the generic policy for a particular domain use case. The policy type implementation specifies the model information, rules, and tasks that a policy type requires to generate concrete policies. -All policy types must implement the ONAP Policy Framework *PolicyType* interface. This interface allows -*PolicyDevelopment* to manage policy types and to generate policies from these policy types in a uniform way regardless -of the domain that the policy type is addressing or the PDP technology that will execute the policy. The interface is -used by *PolicyDevelopment* to determine the PDP technology of the policy type, the structure, type, and definition of -the model information that must be supplied to the policy type to generate a concrete policy. +All policy types are specified in a TOSCA service template. Once policy types are defined and created in the system, +*PolicyDevelopment* manages them and uses them to allow policies to be created from these policy types in a uniform +way regardless of the domain that the policy type is addressing or the PDP technology that will execute the policy. -A *PolicyTypeImpl* is developed for a certain type of PDP (for example XACML oriented for decision policies or Drools -rules oriented for ECA policies). The design environment and tool chain for a policy type is specific for the type of -policy being designed. +A *PolicyTypeImpl* is developed for a policy type for a certain type of PDP (for example XACML oriented for decision +policies, Drools rules or Apex state machines oriented for ECA policies). While a policy type is implementation +independent, a policy type implementation for a policy type is specific for the technology of the PDP on which +policies that use that policy type implementation will execute. Further, the design environment and tool chain for +a policy type implementation is specific to the technology of the PDP on which policies that use that policy type +implementation will use. -The *PolicyTypeImpl* implementation (or raw policy) is the specification of the specific rules or tasks, the flow of -the policy, its internal states and data structures and other relevant information. A *PolicyTypeImpl* is specific to a -PDP technology, that is XACML, Drools, or APEX. *A PolicyTypeImpl* can be specific to a particular policy type, it can -be more general, providing the implementation of a class of policy types, or the same policy type may have many -implementations. +The *PolicyTypeImpl* implementation (or raw policy) is the specification of the specific rules or tasks, the flow of +the policy, its internal states and data structures and other relevant information. *A PolicyTypeImpl* can be specific +to a particular policy type, it can be more general, providing the implementation of a class of policy types, or +the same policy type may have many implementations. -*PolicyDevelopment* provides the RESTful :ref:`Policy Design API <design-label>` which allows other components to query -policy types and policy type implementations, to determine the model information, rules, or tasks that they require, to -specialize policy flow, and to generate policies from policy types. This API is used by the ONAP Policy Framework and -other components such as \ *PolicyDistribution* to create policies from policy types. +*PolicyDevelopment* provides the RESTful :ref:`Policy Design API <design-label>`, which allows other components to query +policy types, Those components can then create policies that specify values for the properties, triggers, and targets +specified in a policy type. This API is used by components such as *CLAMP* and *PolicyDistribution* to create policies +from policy types. Consider a policy type created for managing faults on vCPE equipment in a vendor independent way. The policy type -captures the generic logic required to manage the faults and specifies the vendor specific information that must be -supplied to the type for specific vendor vCPE VFs. The actual vCPE policy that is used for managing particular vCPE -equipment is created by setting the parameters specified in the policy type together with the specific modeled -information, rules and tasks in the policy type implementation for that vendor model of vCPE. +implementation captures the generic logic required to manage the faults and specifies the vendor specific information +that must be supplied to the type for specific vendor vCPE VFs. The actual vCPE policy that is used for managing +particular vCPE equipment is created by setting the properties specified in the policy type for that vendor model +of vCPE. 2.2.1.1 Generating Policy Types """"""""""""""""""""""""""""""" diff --git a/docs/architecture/draw.io/ClassStructure.xml b/docs/architecture/draw.io/ClassStructure.xml index 9619a8e2..f4ffcffb 100644 --- a/docs/architecture/draw.io/ClassStructure.xml +++ b/docs/architecture/draw.io/ClassStructure.xml @@ -1,2 +1 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mxGraphModel dx="1395" dy="808" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="1169" pageHeight="827" background="#ffffff" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="36" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>MicroService</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="520" y="170" width="100" height="65" as="geometry"/></mxCell><mxCell id="3" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPGroup</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="180" y="80" width="140" height="60" as="geometry"/></mxCell><mxCell id="5" value="" style="endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;" parent="1" source="3" target="8" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="20" y="100" as="sourcePoint"/><mxPoint x="150" y="340" as="targetPoint"/></mxGeometry></mxCell><mxCell id="6" value="1" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="5" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="10" as="offset"/></mxGeometry></mxCell><mxCell id="7" value="1..n" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="5" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="30" y="-40" as="offset"/></mxGeometry></mxCell><mxCell id="8" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPSubGroup</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="400" y="265" width="110" height="60" as="geometry"/></mxCell><mxCell id="9" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="430" y="400" width="50" height="60" as="geometry"/></mxCell><mxCell id="10" value="" style="endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" parent="1" source="8" target="9" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="100" y="90" as="sourcePoint"/><mxPoint x="460" y="240" as="targetPoint"/></mxGeometry></mxCell><mxCell id="11" value="1" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="10" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="10" as="offset"/></mxGeometry></mxCell><mxCell id="12" value="1..n" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="10" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="30" y="-40" as="offset"/></mxGeometry></mxCell><mxCell id="13" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>&lt;&lt;enumeration&gt;&gt;<br>PDPType</b></p><hr size="1">PDP-X<br><div style="height: 2px">PDP-D<br>PDP-A<br></div>" style="verticalAlign=top;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="175" y="265" width="140" height="90" as="geometry"/></mxCell><mxCell id="14" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;entryX=1;entryY=0.5;exitX=0;exitY=0.25;" parent="1" source="8" target="13" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="-10" y="470" as="sourcePoint"/><mxPoint x="150" y="470" as="targetPoint"/></mxGeometry></mxCell><mxCell id="15" value="1" style="resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="14" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-20" y="-5" as="offset"/></mxGeometry></mxCell><mxCell id="16" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="14" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="17" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-X</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="360" y="510" width="50" height="60" as="geometry"/></mxCell><mxCell id="18" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-D</b></p><hr size="1"><div style="height: 2px"></div><hr size="1">" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="430" y="510" width="50" height="60" as="geometry"/></mxCell><mxCell id="19" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-A</b></p><hr size="1"><div style="height: 2px"></div><hr size="1">" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="490" y="510" width="60" height="60" as="geometry"/></mxCell><mxCell id="20" value="" style="endArrow=block;endSize=8;endFill=0;html=1;entryX=0.5;entryY=1;exitX=0.5;exitY=0;" parent="1" source="17" target="9" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-20" y="590" as="sourcePoint"/><mxPoint x="140" y="590" as="targetPoint"/></mxGeometry></mxCell><mxCell id="21" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" parent="1" source="18" target="9" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="395" y="520" as="sourcePoint"/><mxPoint x="450" y="410" as="targetPoint"/></mxGeometry></mxCell><mxCell id="22" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" parent="1" source="19" target="9" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="465" y="520" as="sourcePoint"/><mxPoint x="520" y="460" as="targetPoint"/></mxGeometry></mxCell><mxCell id="24" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>Kubernetes</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="385" y="95" width="100" height="30" as="geometry"/></mxCell><mxCell id="39" value="manages" style="endArrow=open;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;exitX=1;exitY=0.5;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitDx=0;exitDy=0;" parent="1" source="24" target="36" edge="1"><mxGeometry x="0.0345" y="-20" relative="1" as="geometry"><mxPoint x="580" y="165" as="sourcePoint"/><mxPoint x="500" y="200" as="targetPoint"/><mxPoint as="offset"/><Array as="points"><mxPoint x="570" y="110"/></Array></mxGeometry></mxCell><mxCell id="40" value="" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="39" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"/></mxCell><mxCell id="41" value="<div>0..n</div>" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="39" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint y="-30" as="offset"/></mxGeometry></mxCell><mxCell id="42" value="" style="endArrow=block;endSize=8;endFill=0;html=1;entryX=0.25;entryY=1;exitX=0.75;exitY=0;" parent="1" source="8" target="36" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="395" y="520" as="sourcePoint"/><mxPoint x="465" y="470" as="targetPoint"/></mxGeometry></mxCell><mxCell id="49" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyImpl</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="15" y="400" width="85" height="60" as="geometry"/></mxCell><mxCell id="50" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>XACMLPolicyImpl<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-155" y="510" width="135" height="60" as="geometry"/></mxCell><mxCell id="51" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>DroolsPolicyImpl</b></p><hr size="1"><div style="height: 2px"></div><hr size="1">" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-5" y="510" width="120" height="60" as="geometry"/></mxCell><mxCell id="52" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>ApexPolicyImpl</b></p><hr size="1"><div style="height: 2px"></div><hr size="1">" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="130" y="510" width="115" height="60" as="geometry"/></mxCell><mxCell id="53" value="" style="endArrow=block;endSize=8;endFill=0;html=1;entryX=0.5;entryY=1;exitX=0.5;exitY=0;strokeWidth=1;" parent="1" source="50" target="49" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-365" y="590" as="sourcePoint"/><mxPoint x="-205" y="590" as="targetPoint"/></mxGeometry></mxCell><mxCell id="54" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;strokeWidth=1;" parent="1" source="51" target="49" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="50" y="520" as="sourcePoint"/><mxPoint x="105" y="410" as="targetPoint"/></mxGeometry></mxCell><mxCell id="55" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" parent="1" source="52" target="49" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="120" y="520" as="sourcePoint"/><mxPoint x="175" y="460" as="targetPoint"/></mxGeometry></mxCell><mxCell id="56" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;entryX=0;entryY=0.5;exitX=1;exitY=0.25;" parent="1" source="49" target="13" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="410" y="290" as="sourcePoint"/><mxPoint x="320" y="355" as="targetPoint"/></mxGeometry></mxCell><mxCell id="57" value="1" style="resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="56" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="10" y="15" as="offset"/></mxGeometry></mxCell><mxCell id="58" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="56" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="60" value="executes" style="endArrow=open;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;entryX=1;entryY=0.75;exitX=0;exitY=0.25;" parent="1" source="9" target="49" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="350" y="420" as="sourcePoint"/><mxPoint x="190" y="460" as="targetPoint"/></mxGeometry></mxCell><mxCell id="61" value="" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="60" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"/></mxCell><mxCell id="62" value="<div>0..n</div>" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="60" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="30" y="-6" as="offset"/></mxGeometry></mxCell><mxCell id="79" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicySet</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-40" y="160" width="80" height="60" as="geometry"/></mxCell><mxCell id="83" value="executes" style="endArrow=openThin;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;strokeWidth=1;exitX=0;exitY=0.5;entryX=1;entryY=0.25;endFill=0;" parent="1" source="3" target="79" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="-170" y="90" as="sourcePoint"/><mxPoint x="-270" y="180" as="targetPoint"/></mxGeometry></mxCell><mxCell id="84" value="1" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="83" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-30" as="offset"/></mxGeometry></mxCell><mxCell id="85" value="1" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="83" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="20" y="2.5" as="offset"/></mxGeometry></mxCell><mxCell id="86" value="" style="endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" parent="1" source="79" target="49" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="260" y="150" as="sourcePoint"/><mxPoint x="465" y="275" as="targetPoint"/><Array as="points"><mxPoint y="330"/><mxPoint x="58" y="330"/></Array></mxGeometry></mxCell><mxCell id="87" value="1" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="86" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="10" as="offset"/></mxGeometry></mxCell><mxCell id="88" value="1..n" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="86" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="30" y="-40" as="offset"/></mxGeometry></mxCell><mxCell id="91" value="All the PDPs in a given PDPSubGroup instance must be of the same type" style="shape=note;whiteSpace=wrap;html=1;size=14;verticalAlign=top;align=left;spacingTop=-6;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="530" y="330" width="160" height="50" as="geometry"/></mxCell><mxCell id="93" value="" style="endArrow=none;dashed=1;html=1;entryX=1;entryY=0.75;exitX=0;exitY=0.5;strokeColor=#97D077;" parent="1" source="91" target="8" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="-180" y="800" as="sourcePoint"/><mxPoint x="-130" y="750" as="targetPoint"/></mxGeometry></mxCell><mxCell id="94" value="" style="endArrow=none;dashed=1;html=1;entryX=1;entryY=0.25;exitX=0;exitY=0.5;strokeColor=#97D077;" parent="1" source="91" target="9" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="570" y="410" as="sourcePoint"/><mxPoint x="520" y="320" as="targetPoint"/></mxGeometry></mxCell><mxCell id="WxIZwHBQDS0929NCy7-o-94" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeImpl<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-330" y="408.5" width="140" height="58" as="geometry"/></mxCell><mxCell id="WxIZwHBQDS0929NCy7-o-98" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>&lt;&lt;TOSCA&gt;&gt;<br>Policy</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-328" y="329" width="95" height="52" as="geometry"/></mxCell><mxCell id="WxIZwHBQDS0929NCy7-o-99" value="has implementation" style="endArrow=openThin;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;strokeWidth=1;endFill=0;exitX=0;exitY=0.867;exitDx=0;exitDy=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;exitPerimeter=0;" parent="1" source="49" target="WxIZwHBQDS0929NCy7-o-94" edge="1"><mxGeometry x="0.1923" y="-10" relative="1" as="geometry"><mxPoint x="-252" y="340" as="sourcePoint"/><mxPoint x="-290" y="413" as="targetPoint"/><mxPoint as="offset"/><Array as="points"><mxPoint x="-110" y="452"/><mxPoint x="-110" y="423"/></Array></mxGeometry></mxCell><mxCell id="WxIZwHBQDS0929NCy7-o-100" value="<div>n</div>" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="WxIZwHBQDS0929NCy7-o-99" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-20" y="-25" as="offset"/></mxGeometry></mxCell><mxCell id="WxIZwHBQDS0929NCy7-o-101" value="1" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="WxIZwHBQDS0929NCy7-o-99" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="27.5" y="-23" as="offset"/></mxGeometry></mxCell><mxCell id="WxIZwHBQDS0929NCy7-o-102" value="is specified by" style="endArrow=openThin;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;strokeWidth=1;endFill=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;" parent="1" source="49" target="WxIZwHBQDS0929NCy7-o-98" edge="1"><mxGeometry x="-0.0333" relative="1" as="geometry"><mxPoint x="-10" y="455" as="sourcePoint"/><mxPoint x="-280" y="423" as="targetPoint"/><mxPoint as="offset"/><Array as="points"><mxPoint x="-90" y="430"/><mxPoint x="-90" y="342"/></Array></mxGeometry></mxCell><mxCell id="WxIZwHBQDS0929NCy7-o-103" value="<div>n</div>" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="WxIZwHBQDS0929NCy7-o-102" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-20" y="-25" as="offset"/></mxGeometry></mxCell><mxCell id="WxIZwHBQDS0929NCy7-o-104" value="1" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="WxIZwHBQDS0929NCy7-o-102" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="27.5" y="-23" as="offset"/></mxGeometry></mxCell><mxCell id="yHxFdaB63uvkelnHd-nB-94" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>&lt;&lt;TOSCA&gt;&gt;<br>PolicyType</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-330" y="209" width="95" height="52" as="geometry"/></mxCell><mxCell id="yHxFdaB63uvkelnHd-nB-100" value="is defined by" style="endArrow=openThin;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;strokeWidth=1;endFill=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" parent="1" source="WxIZwHBQDS0929NCy7-o-98" target="yHxFdaB63uvkelnHd-nB-94" edge="1"><mxGeometry x="0.1714" relative="1" as="geometry"><mxPoint x="-390" y="290" as="sourcePoint"/><mxPoint x="-230" y="280" as="targetPoint"/><mxPoint as="offset"/><Array as="points"><mxPoint x="-282" y="320"/><mxPoint x="-282" y="320"/></Array></mxGeometry></mxCell><mxCell id="yHxFdaB63uvkelnHd-nB-101" value="<div>n</div>" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="yHxFdaB63uvkelnHd-nB-100" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-18" y="-30" as="offset"/></mxGeometry></mxCell><mxCell id="yHxFdaB63uvkelnHd-nB-102" value="1" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="yHxFdaB63uvkelnHd-nB-100" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="22" as="offset"/></mxGeometry></mxCell></root></mxGraphModel>
\ No newline at end of file +<mxfile host="Electron" modified="2020-04-08T14:21:39.521Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/12.9.9 Chrome/80.0.3987.163 Electron/8.2.1 Safari/537.36" etag="PvUznb4W1W4THncNQY30" version="12.9.9" type="device"><diagram id="DArkqDwHTHM-5atZUUOz" name="Page-1">7V1dc5s8Fv41vrSHb+zLJH7TdN7tbnaTmaa9w0a2mWLwAk7s/fUrYQmDEEQGyZETt9MmSCAE5+vROUeHgXm33n1LvM3qR+yDcGBo/m5gTgeGoduaAX+glj1u0TTt0LJMAh+3HRuegv8BciJu3QY+SCsnZnEcZsGm2jiPowjMs0qblyTxW/W0RRxW77rxlviO2rHhae6FoHbaz8DPVrhVdybHjgcQLFf41mPDPXTMvPmfZRJvI3y/gWEu8j+H7rVHxsL3TVeeH7+Vmsy/BuZdEsfZ4bf17g6E6OWS13a47r6ht5h3AqKM5wLTOVzx6oVbQKbshPDa2w2aXrbHr8T57xbN6XbtJcsgGpg3sFfb7OD/sDF/MtQ+zOLNoc8q9WVglw29MFji6+ZwciA5jgl/W+Kf+Z1npOFHME/iJ5C8BnNAOuGzzOgLYNuGblslaP6Es8it9Oa7+sEr84lXmM5o5gZ6qqYB4CzyMVSbh1EZzngFSRZAVr85EGSak+wWk2caggW6KoZnLcKcMxcB5BjzdhFHGRZU3cDH9946CJGMP4DwFaBR0TyzdYhOQufAS+/iME7yOyNJMOZz2J5mSfwHlHp8Z+bYTjHbMv9ilkazBrtSE+bnbyBegyzZw1Nwr01kiygfFx+/lSSZ6KNVSYgdGysQrDyWxdBHAYK/YBlqkCeVxelx+vgN6qbNVZSuosQlSvq4KkpjhiRZLEnS+kuSzZAk6vWDyL9Bxh4exRsQVV8Y7Cy/4zTzkoyc7QfeOo785xUSvUMXOdciDfc5raZI5oAPwQG+bZxkq3gZR17417H1FuyC7AWdPbLx0S88jUYqpPE2mYOK1oC3XQKCKA5N6NatlEpA6GXBaxW3sN47vvQxDuBECgrTulKjKHeYJb6ojCOocSDmqwxkWtRAh2erDZRzQfE4XIxRRyx6jTMSANWEN8sPtSpfUNLJFuHQm4HwtsByVcFDaK4qxBqT0HYFo+LZHKEfvxgO8QP2pLVOkSReLFLQlxpunRqjUdSFIMlBf1wERcQQxKzKzJCWGSEEGiuOSJ62sysouYISftmztKrYFLi9jEp0Sahkorg0XaXoKkV8UkQZn0KqSlJkSxIiIpwfje31ntgevv1kX+pCh78wwOHC/eM67p+cB/frlBKddMT9lkMpY3m4X9drXKMo8Cf8/bmRv25cEvQXR5MLwv660u5I+NNb5wSuH4FouwYJfMFxVHRUL6qOmZQw0PN+Iy9aAMcfvtRv2xuWoHGnzMcZ3jTfrheIwYS6aBiju/b7iwGWi5I2eJ1wjHUSjoniCFA45n3wQSBGgTd+VaDIC1aqBJZoI8PugT6IwpANP4Y6hT7djviD9jvWBhKIP+oeaZH4YxZnWbwWZu4sxSDIkPI0D6lgmxh7x4pmi4MjqpLoVApx67e6c1ch+FCxxFd/x9Xf0SojJrVQtfUz+jtU98EfkecnlqMvxvC0g++sDK+6m/y4proy/Kdh+Mn7DO9IYvgCs/GtBGdhPP8zKPuxx4ejUtJJxd3N9jPrgybvNLcHmkC8Li7o8hKbvETBqwS7q1+6WPM3DSRuXVhwqhzaN9K3jSv4aN8j/CCB9uak6sop8jhPjknQPgHa/S2Q9sal0n6iFO0tRxDt6eRfi9buAmnP8v4pA3L+3s5AEoEMpF8A6Xz6JbKN/rIAlJP/gT3LxPMDyBylvln+Vwy4MsdVAZ0w3OysnHpTALgy66uJtRd5S8Tazbr2tKwB7JsXmApMFHjJX9+SLpAfTHeVo/3g6Ns/dqED0sOl6omeKqt6su3nXV2Pya+NNNOqckAB1XqqfpvKMdfpbRjcqp/OC6NzmRtU/3GgZl80ZBNvXzpjg65IWx7KpR5Kr2zDgr8cRuxqeyyO9YYSqRBEdj8gDsGrXiwWfi9ZlIM10PLUBi47oUbCg7g33zMARPQFbQqERHwsuQD8qLGNlpW322npzVh9catlpZdfFJaXGJK11PYzxmEw339fb8IrBL98CH6edBZKdBhJuQSIC99vx4IUysjSy83dj3/UBYqZEXUVsauIteFImzJ0jDiBbsqSsmawqYCUTZM4DtMvZbe+Gvdz8L7B8OMI4X0WVleG9282YHfl/M/L+TpHPoSuy1L7rER8GcvUE+LDh7dNyhtxR44ITiyvW60PDB0NTTp21DVmPDS0d0YSt3K1T0sdP0vgsCtD6GoxBBX97ezH0ClukBhGtk8rdqJOGJmYdFVorxuiiE/tK5EYR7Y5ktZF7SLRylSu7iKpxqv4d5EQcn/ENhKL2kbSeRurSfGNadvSyM2omFKjtyrbSAhvKrONhCK4LmMXic1K1z6dQOfZRSKOQrLia0Rzll4n2IH5NlM0ft+w484VseWOoSu5zWXf+A6dFdfZNFJ5thJNo8ORWqlEmJu8AoXD3E6z9+WSw9zi3rycff2OBAPlXkDY8wk95af3oV1DMkKc0lSyfrEaLIc9JTmlx3XPHC86wSWGzo5Q6n4aNiyp5BxSaAans5Q9BlwAhlGp1D0TgBnqVFJddz8fnZ03loZgxnU/n6JFi4ggKLPUk5MwNhZUxeEM0EYcRcQQhPKRGCMZi+/xad4wZes+964N537gWtFwaDeLoFxAw+Xzq3HnWxN/nam1zoO4dNin907HHsv16YnUKao69MQqkboHT+HSdOJockGl6SZ1185NfkK2AvD/x+ljis6O0H3hvyV8nOjQfiwYDbuhyo7Qt2G09TZFjzBDv8eLYpzUW6MfWV4SjqJ+uvI2IEfmGdLlb6sgA08bL1fAb4m3qTJEWjIUXAuyFA4VRMtn1DcdOvXFlW+DsW+xFldjY2Y6oj6HQpGT6D5m+K28uqJ1fqdyyaflPeA1ku+lK+Dj987Kc+B3zTI3zU3cqea63D5bRnyb9+sM79TaIG29V0a173R0XRrRWTIuzQXilkaTTtXzTuUN4+y80SH8LZE36J1otSyGrjurTTp+II4zfu6+/357uP339EmbGJN/3u3dYTxksotiTk9UefSani52Hl/NF2pS21gti2GvWRVNyRqnj71mS57S5csGLVWEn//1dHdTNPHVD84F+SquV3HlXAXTBfDdcU1cJ4ysYpI5J15a68HBlZevpaBhAmv4qLiqdrtTTaHgRiVKwYZyY8cdtBVKOKLDkZZPrIQQHaOAjC0FGB5BEkACoXrZxzPoRi7MyEqYa0U8/EUa9AkJ0JC1uy5ohVHwK0F/tFOAP/hCp4+QZEEBZRpEYc2ilEl7soTATAn5nr9WZaGMO7BWJtqQEWRoIHrdJaVqaEgyMQXFi9wRXTLGPB8xjRoxA2QF0w2YB4sA+PD32f5zWUHi6njHBrJ2CbVYP8FGjdd1Vhg1UyeBUNEfHaCTvPltGOVvs2jGVsKGNX/85VPZsELUr0YMvQxBCScfZcQEUvOirNj+YXfve7eOuX39A8LowR9Gt4r7PKV4XqR+vOnqfflk3hdTo6XTYJTMkeV/Ycosa+2YI08fLILo0nFn2+eo3vGgNGxB7VfcshVjlsFoq349wcPiks/29AejVI5V109gDelNcYbJl2Qlo/DlUCefhSSTMRxKpPqlWjXIHFcNx4vCuu3KRR2sq1dT6+Rk7Ta8jPoaX1WsK5uagrCuIYF2P7U0/X3zO3zx7u+87/9x19tnh4Vsv5P4xCVtvGBbxxM9LEfraJlOyT4OtZGmTdqdOozQRA/DySgVLcRwoicxSSFqoikmogypQWPAMRUK5zelBjWS9YGmlM7CtrC+E2VK2YLJKkVSs6T6JVnSVgWkriE19JFF8bFEfVzfdqGqKZVMTnUsKTxMYrTsP56eeJvVj9gH6Iz/Aw==</diagram></mxfile>
\ No newline at end of file diff --git a/docs/architecture/draw.io/DesignTimeComponents.xml b/docs/architecture/draw.io/DesignTimeComponents.xml deleted file mode 100644 index 032d8558..00000000 --- a/docs/architecture/draw.io/DesignTimeComponents.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mxGraphModel dx="2595" dy="1608" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="1169" pageHeight="827" background="#ffffff" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="12" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>&lt;&lt;enumeration&gt;&gt;<br>PDPType</b></p><hr size="1">PDP-X<br><div style="height: 2px">PDP-D<br>PDP-A<br></div>" style="verticalAlign=top;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1"><mxGeometry x="-900" y="-9.5" width="140" height="90" as="geometry"/></mxCell><mxCell id="28" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>XACMLPolicy<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-440" y="-164.5" width="100" height="60" as="geometry"/></mxCell><mxCell id="29" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>DroolsPolicy</b></p><hr size="1"><div style="height: 2px"></div><hr size="1">" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-330" y="-164.5" width="90" height="60" as="geometry"/></mxCell><mxCell id="30" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>ApexPolicy</b></p><hr size="1"><div style="height: 2px"></div><hr size="1">" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-230" y="-164.5" width="80" height="60" as="geometry"/></mxCell><mxCell id="31" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;strokeWidth=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="28" target="JLu5tQw5rpazg5sk-l6F-103" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-615" y="40" as="sourcePoint"/><mxPoint x="-215" y="-100" as="targetPoint"/></mxGeometry></mxCell><mxCell id="32" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;strokeWidth=1;entryDx=0;entryDy=0;" parent="1" source="29" target="JLu5tQw5rpazg5sk-l6F-103" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-200" y="-30" as="sourcePoint"/><mxPoint x="-215" y="-100" as="targetPoint"/></mxGeometry></mxCell><mxCell id="33" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="30" target="JLu5tQw5rpazg5sk-l6F-103" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-130" y="-30" as="sourcePoint"/><mxPoint x="-215" y="-100" as="targetPoint"/></mxGeometry></mxCell><mxCell id="34" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;entryX=1;entryY=0.5;exitX=0;exitY=0.75;dashed=1;strokeColor=#7EA6E0;exitDx=0;exitDy=0;" parent="1" source="JLu5tQw5rpazg5sk-l6F-103" target="12" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="10" y="-260" as="sourcePoint"/><mxPoint x="-80" y="-195" as="targetPoint"/><Array as="points"><mxPoint x="-460" y="-243"/><mxPoint x="-460" y="40"/><mxPoint x="-760" y="40"/></Array></mxGeometry></mxCell><mxCell id="35" value="1" style="resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="34" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-20" y="20" as="offset"/></mxGeometry></mxCell><mxCell id="36" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="34" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="25" y="-6" as="offset"/></mxGeometry></mxCell><mxCell id="54" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>XACMLImpl<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-772.5" y="-61.5" width="100" height="36" as="geometry"/></mxCell><mxCell id="55" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>DroolsImpl<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-662.5" y="-61.5" width="100" height="35" as="geometry"/></mxCell><mxCell id="56" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>ApexImpl<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-552.5" y="-61.5" width="80" height="36" as="geometry"/></mxCell><mxCell id="59" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeImpl<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-675" y="-164.5" width="140" height="58" as="geometry"/></mxCell><mxCell id="60" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;strokeWidth=1;entryX=0.5;entryY=1;" parent="1" source="54" target="59" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-775" y="204.5" as="sourcePoint"/><mxPoint x="-625" y="94.5" as="targetPoint"/></mxGeometry></mxCell><mxCell id="61" value="" style="endArrow=block;endSize=8;endFill=0;html=1;strokeWidth=1;entryX=0.5;entryY=1;" parent="1" source="55" target="59" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-670" y="204.5" as="sourcePoint"/><mxPoint x="-685" y="174.5" as="targetPoint"/></mxGeometry></mxCell><mxCell id="62" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" parent="1" source="56" target="59" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-575" y="204.5" as="sourcePoint"/><mxPoint x="-660" y="154.5" as="targetPoint"/></mxGeometry></mxCell><mxCell id="63" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;entryX=0.5;entryY=0;exitX=0;exitY=0.75;dashed=1;strokeColor=#7EA6E0;entryDx=0;entryDy=0;exitDx=0;exitDy=0;" parent="1" source="59" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="-350" y="-110" as="sourcePoint"/><mxPoint x="-805" y="-9" as="targetPoint"/><Array as="points"><mxPoint x="-805" y="-117"/></Array></mxGeometry></mxCell><mxCell id="64" value="1" style="resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="63" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-20" y="-4" as="offset"/></mxGeometry></mxCell><mxCell id="65" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="63" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="66" value="<b>PolicyTypeXACML<br></b><hr size="1"><div style="height: 2px" align="left"><br></div>" style="verticalAlign=top;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-1245" y="-61.5" width="130" height="37" as="geometry"/></mxCell><mxCell id="69" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>&lt;&lt;TOSCA&gt;&gt;<br>PolicyType<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-1115" y="-165.5" width="140" height="56" as="geometry"/></mxCell><mxCell id="70" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;strokeWidth=1;entryX=0.5;entryY=1;" parent="1" source="66" target="69" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-1215" y="200.5" as="sourcePoint"/><mxPoint x="-1065" y="90.5" as="targetPoint"/></mxGeometry></mxCell><mxCell id="71" value="" style="endArrow=block;endSize=8;endFill=0;html=1;strokeWidth=1;entryX=0.5;entryY=1;exitX=0.5;exitY=0;" parent="1" source="74" target="69" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-1051" y="-59.5" as="sourcePoint"/><mxPoint x="-1125" y="170.5" as="targetPoint"/></mxGeometry></mxCell><mxCell id="72" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" parent="1" target="69" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-935" y="-59.5" as="sourcePoint"/><mxPoint x="-1100" y="150.5" as="targetPoint"/></mxGeometry></mxCell><mxCell id="73" value="" style="resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="1" connectable="0" vertex="1"><mxGeometry x="-960" y="-109.5" as="geometry"><mxPoint x="171" y="188" as="offset"/></mxGeometry></mxCell><mxCell id="74" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeDrools<br></b></p><hr size="1"><div style="height: 2px"><br></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-1105" y="-61.5" width="120" height="38" as="geometry"/></mxCell><mxCell id="75" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeApex<br></b></p><hr size="1"><div style="height: 2px"><i><br></i></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-975" y="-61.5" width="110" height="38" as="geometry"/></mxCell><mxCell id="78" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#7EA6E0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=0.75;exitDx=0;exitDy=0;" parent="1" source="69" target="12" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="-950" y="-100" as="sourcePoint"/><mxPoint x="-900" y="40" as="targetPoint"/><Array as="points"><mxPoint x="-830" y="-119"/></Array></mxGeometry></mxCell><mxCell id="79" value="1" style="resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="78" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="10" as="offset"/></mxGeometry></mxCell><mxCell id="80" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="78" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="25" y="-6" as="offset"/></mxGeometry></mxCell><mxCell id="82" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyCreator<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-850" y="-410" width="120" height="60" as="geometry"/></mxCell><mxCell id="83" value="applies" style="endArrow=open;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;strokeWidth=1;entryX=0.5;entryY=0;endFill=0;exitX=1;exitY=0.75;exitDx=0;exitDy=0;" parent="1" source="82" target="59" edge="1"><mxGeometry x="-0.2222" y="30" relative="1" as="geometry"><mxPoint x="-730" y="-160" as="sourcePoint"/><mxPoint x="235" y="-230" as="targetPoint"/><mxPoint x="-30" y="30" as="offset"/></mxGeometry></mxCell><mxCell id="84" value="1" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="83" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-10" as="offset"/></mxGeometry></mxCell><mxCell id="85" value="1" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="83" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint y="-30" as="offset"/></mxGeometry></mxCell><mxCell id="86" value="parameterizes" style="endArrow=open;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;strokeWidth=1;entryX=0.75;entryY=0;endFill=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="82" target="69" edge="1"><mxGeometry x="-0.1579" y="60" relative="1" as="geometry"><mxPoint x="-370" y="220" as="sourcePoint"/><mxPoint x="-980" y="-150" as="targetPoint"/><mxPoint x="-60" y="60" as="offset"/></mxGeometry></mxCell><mxCell id="87" value="1" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="86" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="10" y="5" as="offset"/></mxGeometry></mxCell><mxCell id="88" value="1" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="86" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint y="-30" as="offset"/></mxGeometry></mxCell><mxCell id="89" value="creates" style="endArrow=open;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;strokeWidth=1;endFill=0;exitX=1;exitY=0.25;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="82" target="JLu5tQw5rpazg5sk-l6F-103" edge="1"><mxGeometry x="0.1183" relative="1" as="geometry"><mxPoint x="-570" y="-440" as="sourcePoint"/><mxPoint x="-330" y="-395" as="targetPoint"/><mxPoint as="offset"/><Array as="points"><mxPoint x="-285" y="-395"/></Array></mxGeometry></mxCell><mxCell id="90" value="1" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="89" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="10" y="-20" as="offset"/></mxGeometry></mxCell><mxCell id="91" value="1" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="89" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint y="-30" as="offset"/></mxGeometry></mxCell><mxCell id="92" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPXCreator<br></b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-945" y="-270" width="100" height="60" as="geometry"/></mxCell><mxCell id="93" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPDCreator</b></p><hr size="1"><div style="height: 2px"></div><hr size="1">" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-835" y="-270" width="95" height="60" as="geometry"/></mxCell><mxCell id="94" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPACreator</b></p><hr size="1"><div style="height: 2px"></div><hr size="1">" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-735" y="-270" width="95" height="60" as="geometry"/></mxCell><mxCell id="95" value="" style="endArrow=block;endSize=8;endFill=0;html=1;entryX=0.5;entryY=1;exitX=0.5;exitY=0;strokeWidth=1;" parent="1" source="92" target="82" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-1180" y="-170" as="sourcePoint"/><mxPoint x="-780" y="-310" as="targetPoint"/></mxGeometry></mxCell><mxCell id="96" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;strokeWidth=1;entryX=0.5;entryY=1;" parent="1" source="93" target="82" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-765" y="-240" as="sourcePoint"/><mxPoint x="-770" y="-350" as="targetPoint"/></mxGeometry></mxCell><mxCell id="97" value="" style="endArrow=block;endSize=8;endFill=0;html=1;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" parent="1" source="94" target="82" edge="1"><mxGeometry width="160" relative="1" as="geometry"><mxPoint x="-695" y="-240" as="sourcePoint"/><mxPoint x="-780" y="-310" as="targetPoint"/></mxGeometry></mxCell><mxCell id="98" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=1;exitY=0.5;dashed=1;strokeColor=#7EA6E0;startArrow=none;startFill=0;endFill=0;" parent="1" source="82" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="-550" y="-120" as="sourcePoint"/><mxPoint x="-760" y="36" as="targetPoint"/><Array as="points"><mxPoint x="-460" y="-380"/><mxPoint x="-460" y="40"/><mxPoint x="-760" y="40"/></Array></mxGeometry></mxCell><mxCell id="99" value="1" style="resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="98" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="10" as="offset"/></mxGeometry></mxCell><mxCell id="100" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="98" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="25" y="-6" as="offset"/></mxGeometry></mxCell><mxCell id="WnAEskrEjoqfPgaEkT4R-103" value="implements" style="endArrow=none;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;strokeWidth=1;endFill=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;exitX=0;exitY=0.25;exitDx=0;exitDy=0;" parent="1" source="59" target="69" edge="1"><mxGeometry x="-0.0507" relative="1" as="geometry"><mxPoint x="-740" y="-170" as="sourcePoint"/><mxPoint x="-910" y="-130" as="targetPoint"/><mxPoint as="offset"/><Array as="points"><mxPoint x="-675" y="-151"/></Array></mxGeometry></mxCell><mxCell id="WnAEskrEjoqfPgaEkT4R-104" value="m" style="resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="WnAEskrEjoqfPgaEkT4R-103" connectable="0" vertex="1"><mxGeometry x="-1" relative="1" as="geometry"><mxPoint x="-30" y="-25" as="offset"/></mxGeometry></mxCell><mxCell id="WnAEskrEjoqfPgaEkT4R-105" value="n" style="resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;" parent="WnAEskrEjoqfPgaEkT4R-103" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"><mxPoint x="15" y="-21" as="offset"/></mxGeometry></mxCell><mxCell id="JLu5tQw5rpazg5sk-l6F-103" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>&lt;&lt;TOSCA&gt;&gt;<br>Policy</b></p><hr size="1"><div style="height: 2px"></div><hr size="1"><div style="height: 2px"></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="-332.5" y="-280" width="95" height="52" as="geometry"/></mxCell></root></mxGraphModel>
\ No newline at end of file diff --git a/docs/architecture/draw.io/PFDesignAndAdmin.xml b/docs/architecture/draw.io/PFDesignAndAdmin.xml index 9ba43502..2188d0ca 100644 --- a/docs/architecture/draw.io/PFDesignAndAdmin.xml +++ b/docs/architecture/draw.io/PFDesignAndAdmin.xml @@ -1,2 +1 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mxGraphModel dx="995" dy="808" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" background="#ffffff" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="PolicyDevelopment" style="html=1;fillColor=#fff2cc;strokeColor=#d6b656;gradientColor=#ffd966;" parent="1" vertex="1"><mxGeometry x="260" y="220" width="150" height="30" as="geometry"/></mxCell><mxCell id="3" value="Portal" style="html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="150" y="120" width="50" height="30" as="geometry"/></mxCell><mxCell id="4" value="PolicyDevAPIUser" style="html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="210" y="120" width="120" height="30" as="geometry"/></mxCell><mxCell id="5" value="PolicyDistribution" style="html=1;fillColor=#fff2cc;strokeColor=#d6b656;gradientColor=#ffd966;" parent="1" vertex="1"><mxGeometry x="340" y="120" width="120" height="30" as="geometry"/></mxCell><mxCell id="8" value="SDC" style="html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="375" y="70" width="50" height="30" as="geometry"/></mxCell><mxCell id="10" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" parent="1" source="8" target="5" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="80" y="270" as="sourcePoint"/><mxPoint x="450" y="130" as="targetPoint"/></mxGeometry></mxCell><mxCell id="12" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="10" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="14" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" parent="1" source="3" target="2" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="580" y="90" as="sourcePoint"/><mxPoint x="580" y="130" as="targetPoint"/><Array as="points"><mxPoint x="175" y="170"/><mxPoint x="335" y="170"/></Array></mxGeometry></mxCell><mxCell id="15" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="14" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="16" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;entryX=0.5;entryY=0;exitX=0.5;exitY=1;" parent="1" source="4" target="2" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="390" y="150" as="sourcePoint"/><mxPoint x="445" y="230" as="targetPoint"/><Array as="points"><mxPoint x="270" y="170"/><mxPoint x="335" y="170"/></Array></mxGeometry></mxCell><mxCell id="17" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="16" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="18" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;entryX=0.5;entryY=0;exitX=0.5;exitY=1;" parent="1" source="5" target="2" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="395" y="160" as="sourcePoint"/><mxPoint x="445" y="230" as="targetPoint"/><Array as="points"><mxPoint x="400" y="170"/><mxPoint x="335" y="170"/></Array></mxGeometry></mxCell><mxCell id="19" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="18" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="20" value="PolicyDevGUI" style="html=1;fillColor=#fff2cc;strokeColor=#d6b656;gradientColor=#ffd966;" parent="1" vertex="1"><mxGeometry x="40" y="120" width="100" height="30" as="geometry"/></mxCell><mxCell id="21" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" parent="1" source="20" target="2" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="255" y="160" as="sourcePoint"/><mxPoint x="440" y="220" as="targetPoint"/><Array as="points"><mxPoint x="90" y="170"/><mxPoint x="335" y="170"/></Array></mxGeometry></mxCell><mxCell id="22" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="21" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="24" value="PolicyDB" style="shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="502" y="290" width="80" height="30" as="geometry"/></mxCell><mxCell id="31" value="PolicyAdminGUI" style="html=1;fillColor=#fff2cc;strokeColor=#d6b656;gradientColor=#ffd966;" parent="1" vertex="1"><mxGeometry x="472" y="80" width="110" height="30" as="geometry"/></mxCell><mxCell id="33" value="PolicyAdministration" style="html=1;fillColor=#fff2cc;strokeColor=#d6b656;gradientColor=#ffd966;" parent="1" vertex="1"><mxGeometry x="522" y="220" width="140" height="30" as="geometry"/></mxCell><mxCell id="34" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;" parent="1" source="31" target="33" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="372" y="160" as="sourcePoint"/><mxPoint x="307" y="230" as="targetPoint"/><Array as="points"><mxPoint x="527" y="130"/><mxPoint x="592" y="130"/></Array></mxGeometry></mxCell><mxCell id="35" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="34" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="46" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;entryX=0.5;entryY=0;exitX=0.75;exitY=1;" parent="1" source="2" target="24" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="270" y="280" as="sourcePoint"/><mxPoint x="425" y="375" as="targetPoint"/><Array as="points"><mxPoint x="370" y="250"/><mxPoint x="370" y="270"/><mxPoint x="542" y="270"/></Array></mxGeometry></mxCell><mxCell id="47" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="46" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="48" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;entryX=0.5;entryY=0;exitX=0.5;exitY=1;" parent="1" source="33" target="24" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="670" y="310" as="sourcePoint"/><mxPoint x="730" y="360" as="targetPoint"/><Array as="points"><mxPoint x="592" y="270"/><mxPoint x="542" y="270"/></Array></mxGeometry></mxCell><mxCell id="49" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="48" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="58" value="PolicyAdminAPIUser" style="html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="597" y="80" width="135" height="30" as="geometry"/></mxCell><mxCell id="59" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" parent="1" source="58" target="33" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="537" y="160" as="sourcePoint"/><mxPoint x="522" y="200" as="targetPoint"/><Array as="points"><mxPoint x="665" y="130"/><mxPoint x="592" y="130"/></Array></mxGeometry></mxCell><mxCell id="60" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="59" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="62" value="PolicyExecution" style="html=1;fillColor=#fff2cc;strokeColor=#d6b656;gradientColor=#ffd966;" parent="1" vertex="1"><mxGeometry x="920" y="220" width="100" height="30" as="geometry"/></mxCell><mxCell id="63" value="DMaaP" style="html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="770" y="305" width="100" height="30" as="geometry"/></mxCell><mxCell id="64" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0;exitY=0.5;entryX=1;entryY=0.5;" parent="1" source="63" target="33" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="410" y="160" as="sourcePoint"/><mxPoint x="710" y="235" as="targetPoint"/><Array as="points"><mxPoint x="750" y="320"/><mxPoint x="750" y="235"/></Array></mxGeometry></mxCell><mxCell id="65" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="64" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="66" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0;exitY=0.5;entryX=1;entryY=0.5;" parent="1" source="62" target="63" edge="1"><mxGeometry relative="1" as="geometry"><mxPoint x="780" y="245" as="sourcePoint"/><mxPoint x="710" y="245" as="targetPoint"/></mxGeometry></mxCell><mxCell id="67" value="" style="resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10;" parent="66" connectable="0" vertex="1"><mxGeometry x="1" relative="1" as="geometry"/></mxCell><mxCell id="68" value="AsyncCaller" style="html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="870" y="120" width="90" height="30" as="geometry"/></mxCell><mxCell id="69" value="SyncCaller" style="html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="970" y="120" width="80" height="30" as="geometry"/></mxCell><mxCell id="70" value="" style="endArrow=classic;startArrow=classic;html=1;entryX=0.5;entryY=1;exitX=0.75;exitY=0;" parent="1" source="62" target="69" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="50" y="440" as="sourcePoint"/><mxPoint x="100" y="390" as="targetPoint"/></mxGeometry></mxCell><mxCell id="73" value="" style="endArrow=classic;html=1;entryX=0.25;entryY=0;exitX=0.5;exitY=1;" parent="1" source="68" target="62" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="50" y="440" as="sourcePoint"/><mxPoint x="100" y="390" as="targetPoint"/></mxGeometry></mxCell><mxCell id="74" value="" style="endArrow=classic;html=1;entryX=0.75;entryY=1;exitX=0.5;exitY=0;" parent="1" source="62" target="68" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="900" y="400" as="sourcePoint"/><mxPoint x="955" y="230" as="targetPoint"/></mxGeometry></mxCell><mxCell id="75" value="" style="endArrow=classic;html=1;entryX=0.25;entryY=0;exitX=0;exitY=0.75;" parent="1" source="68" target="63" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="980" y="230" as="sourcePoint"/><mxPoint x="948" y="160" as="targetPoint"/></mxGeometry></mxCell><mxCell id="76" value="" style="endArrow=classic;html=1;entryX=0.25;entryY=1;exitX=0.5;exitY=0;" parent="1" source="63" target="68" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="930" y="460" as="sourcePoint"/><mxPoint x="910" y="150" as="targetPoint"/></mxGeometry></mxCell><mxCell id="78" value="<div>Policy Artifacts and Metadata</div><div>PDP Group and Subgroup Definitions</div><div>Policy to PDP Group and Subgroup Mappings<br></div>" style="shape=note;whiteSpace=wrap;html=1;size=14;verticalAlign=top;align=left;spacingTop=-6;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="352" y="341.5" width="240" height="60" as="geometry"/></mxCell><mxCell id="80" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=0;exitX=0.5;exitY=1;strokeColor=#97D077;" parent="1" source="24" target="78" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="535" y="425" as="sourcePoint"/><mxPoint x="135" y="505" as="targetPoint"/></mxGeometry></mxCell><mxCell id="82" value="CRUD API for Policy Groups and Sub-Groups<br>API for Policy Deployment" style="shape=note;whiteSpace=wrap;html=1;size=14;verticalAlign=top;align=left;spacingTop=-6;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="630" y="150" width="190" height="50" as="geometry"/></mxCell><mxCell id="84" value="<div>Policies for a given</div><div>domain execute in a</div><div> PDP Group. PDP Groups</div><div> have subgroups for each</div><div> PDP type in a PDP group<br></div>" style="shape=note;whiteSpace=wrap;html=1;size=14;verticalAlign=top;align=left;spacingTop=-6;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="960" y="311" width="160" height="89" as="geometry"/></mxCell><mxCell id="85" value="" style="endArrow=none;dashed=1;html=1;entryX=0.75;entryY=0;exitX=0.75;exitY=1;strokeColor=#97D077;" parent="1" source="62" target="84" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="550" y="360" as="sourcePoint"/><mxPoint x="590" y="390" as="targetPoint"/></mxGeometry></mxCell><mxCell id="87" value="" style="endArrow=none;dashed=1;html=1;entryX=1;entryY=0.5;exitX=0.5;exitY=0;" parent="1" source="2" target="90" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="260" y="233" as="sourcePoint"/><mxPoint x="333" y="402" as="targetPoint"/></mxGeometry></mxCell><mxCell id="88" value="<div>Deploy</div><div>Retire</div><div>Archive<br>Upgrade</div><div>Rollback<br></div>" style="shape=note;whiteSpace=wrap;html=1;size=14;verticalAlign=top;align=left;spacingTop=-6;fillColor=#D5E8D4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="673" y="297.5" width="68" height="75" as="geometry"/></mxCell><mxCell id="89" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=0;strokeColor=#97D077;" parent="1" target="88" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="662" y="235" as="sourcePoint"/><mxPoint x="565" y="402" as="targetPoint"/></mxGeometry></mxCell><mxCell id="90" value="CRUD API for Policy Artifacts" style="shape=note;whiteSpace=wrap;html=1;size=14;verticalAlign=top;align=left;spacingTop=-6;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="130" y="185" width="110" height="35" as="geometry"/></mxCell><mxCell id="93" value="" style="endArrow=none;dashed=1;html=1;entryX=0;entryY=0.5;exitX=0.5;exitY=0;strokeColor=#97D077;" parent="1" source="33" target="82" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="672" y="253" as="sourcePoint"/><mxPoint x="700" y="335" as="targetPoint"/></mxGeometry></mxCell><mxCell id="94" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="10" y="278" width="30" height="13" as="geometry"/></mxCell><mxCell id="95" value="Policy Framework Component" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="32" y="274" width="200" height="20" as="geometry"/></mxCell><mxCell id="97" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;gradientColor=#b3b3b3;" parent="1" vertex="1"><mxGeometry x="10" y="295" width="30" height="13" as="geometry"/></mxCell><mxCell id="98" value="Other Component" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="32" y="291" width="128" height="20" as="geometry"/></mxCell></root></mxGraphModel>
\ No newline at end of file +<mxfile host="Electron" modified="2020-04-08T12:56:16.158Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/12.9.9 Chrome/80.0.3987.163 Electron/8.2.1 Safari/537.36" version="12.9.9" etag="PXYjNIaQAZ4uMtULGwls" type="device"><diagram id="0-5FABUy0DJKN6pRLFS_" name="Page-1">7V1bc5s4FP41fmyHO+YxttNsd7bTTNPMdvdNBsVmihED5OL99SsZCYMkbEHAhmmTmRaOQIhz9J2bjsjMXO7e7lKQbL+gAEYzQwveZuZqZhi6rhn4P0LZU4qmaQVlk4YBpR0JD+F/kF1Iqc9hALPahTlCUR4mdaKP4hj6eY0G0hS91i97QlH9qQnYQIHw4INIpP4dBvmWvZjjHRv+gOFmSx89N9yiYQ38n5sUPcf0eTPDfDr8FM07wPqiL5ptQYBeKyTzdmYuU4Ty4mj3toQRYS5jW3Hfp4bWctwpjHOVG6igXkD0TF/9HkWhv1/BFxihZEe6KQaa7xlztvkuwkf6zFw8hVG0RBFKDy3kVQ3fx/QsT9FPWGkJnLVjO7hlk4IgxL3W7go8h7SJg6fv8wLTHL5VSPRl7iDawTzd40toq+FQxtKZVzL6tSJGm9K2FQmalAbozNmUXR+5hw8oA+XMNCXMTHMQteGgTX5lHHQOP3IOrg+//XCw5A7DroSDQzHQap6NN/efHzOYToqVpTo7wcqS1jcv7SZehpgf4fo5D1E8KWib1hW5ORe4+bBaTmoymq5dY597OVgzGFS4J7AOxsENMdz4LEYxJi4qzIQBts70WqxRt2iDYhDdHqkL+BbmP3Cr9tGmZ/+we2M82koTOSVt2im2Zug59WFN9DlINzCvYYsM6yTrUxiBPHypOxUyTtJb71FI7C0T2ZyzZS4ni2KU9Kaqkef6sXiVzgu1eDeho4Ncy9dRE7XoUAiiTmEW/gfWh1OtLmgQhZsYH6fFBFyQ6R1it+yG0tcoz9EON0RgDaNF6WzVFRVxtzACUZxTz1JvEDZlA/Ui6ZBmpc/QwmgWNyjLWxk5okWcEHJMETnGZZBjc9DxOiKH70cVOVggYF+5LCEXZM3j1TnlrLvayXGZ5snr8UExgs4wFr2HEcPYGj2MneFhfAKszRBXgrF1NRibHgc/u6sFtOp4EdyannBcmuix4NidEo6d0eNYDAMmhGP7ijjmprkzchxb2shw7E0Jx/Ox47iMnifjVl8BtP3Z3oaUbM+Y5cd7ZcgyMU0Cstx6yhgh25gbXghszbYgIYf+PgrjAGJ2LF63YQ4fEnCwha8pSOrcXhPWweCvdUkoGfr1Oce9wNlI03o2W2tj6GIwqOT1WBDb+3qHbMGDyOQm2IUxyTODyWWZbYPjpyzLbA3F0Gume5RsDxP54AkctqDKtLPe0fqYWr2joTxGYcDmafNje8ap699tfswpZXDM0WdwrLFkcNxOoZ8hIpkZ1KGRzKdESmvU2o806g5buaDVM5JNfsD2GUeSv/6M42lbxqnr3418a0o5H2v0OR9r0jkfU7YGcyHkOxwwzK423DW5jvj0UV823DuJzMsjeUpZH2v0WR9bRHIlXJligZHt1Z3OuSRWYY5g7/VFCpNzXDm0Wi5cUtVxsdjG5EKFrtlwIVbVhtGLjsOlyq4c2zB+TUIvMpyMVy86RoNevH2D/vTqBD2D88dlGRxtoAyOI6bEVl8AuJ+UWXF5x02zL8jBC+bAKlalYkh+VI3MsU3JrjgSf/tSdsXiy4272hWX66hMJvVsV1yuLtHkNyucuZ6Nqze7MqWcmTP6nJlzgZzZgEg2RCQ7F0Kyy1f+WhwAOyOZ76i/yl9nSmknZ/RpJ0cMVm+yfewvQRRNLEqd80VxEofMG8qbEKPUh2ly0VPg4lALva5CwFXR5H4EsiwsggCQ5iK5quMbInm9edVDOciXqnBPUYWf2RfDaO/NBdSFWtbKtFX0OlewZvIV7/0pelcMcdQmg1zqRt8pb0eS2mEz4bfUO0u9XVh2TuruCbD3h/X5qKTucdKy+HSdqtg9u1sVbBexK4RE/YC95sG76m66DO2qbvqF5M5787y4lOXO1liaAvwe5d4udmsn9z7gLsmzjA3u3Kql1TUd4/F5Hb4St0exyxa7nYgEZEH4gg835LDIDuPLbnCM9gR8kuPRQBzgf7/AHAQgB+wu/MDKjbK+Vvf4tjscyyVlJw/P6w0lrOBTGIckB52pd8mGlyP8z5kHfAFJEsabsvd1yvfMP49DASs2jVFOMhJnCk0zGpZakhA3R0klEI7gE3lehrvC4/tO2lYfHDEyCWw4DyxZZDI31mZvm+9to+5pWPpHMSlsyAoj+Wnfaft9uwCEppICkG1hQDmvEHOcdj4F/nruSnNdVY0l20bnjktj2VxJfFlx1dov5TqytcHSTnNDmBnLb48ropzuP8/Ip39SogSYSjjogaO6worgAyPx+Jfev4JJhPbSz+L8GorAMRuMUXVtSJbN4Y1WJzUgC0Lk+j+EWSk9bI20DYZFrGxCArQDYUyQeVgChWQMcdGTYg91y/OxfqpuywgTwQt5fkZt1vG1IPC37ceT75Pq61AqNYe/beCpDBz3bSlT18Wp70im/tzrYeq3C8TULaDbptj4nTZQFqQzTI/FBvJrkp2Lc7j9aAPmZuYKSy8d5oZk5eydUZtE/IwrIxG/8P04tnjfet8Ju7FM9hiDiV8paCs8F2V78Q3mYQqVL79J/S3humBBHhOyLqLe0TcURWTz3WRt0cq+na+Gd8Pc+vQyPFcSj7GMSBUo/K6JTsaoU+1nl3Csg8GpGZdxBVgOM4BNhTXKxoWryBxQu3hi6H0qwKqkhEYGzMs4iTofH80ltXO6ZIrxU6ELLr12S3PKuGzjCLzTRZRtWGEx/lhQ7HIotjv6CC6/fKdYZ9cFxQrLd2mxCZ7K8Qw+25f99gEufqfdXMCWKZG7bjaLWBlaTd9TxbRPKdjBV5Rip0Vbol2CYSXJD+F3zDkdV+MVRWOVsZTENJ2Puz18zYBXiLswCKImpVoXaw9SMLnpz5aGq4lgWXUw/92PTmJQqTJ7zzy+ep0PP8c90X4MNsfFQOJrviV1Ur/itPYk2R1D4lD3Ma1vv29fl873x4fYiAztz/1q4f/7Qdeavq+xgi93j58FUQw8rQVWShjeyF2VjzcPtaWggbtNX5Q5bAecHH+5iEC2FbCnj2Pj0+MfKCh8keOfgTBv/wc=</diagram></mxfile>
\ No newline at end of file diff --git a/docs/architecture/images/ClassStructure.svg b/docs/architecture/images/ClassStructure.svg index 650e5a31..769a239d 100644 --- a/docs/architecture/images/ClassStructure.svg +++ b/docs/architecture/images/ClassStructure.svg @@ -1,2 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1021px" height="491px" viewBox="-0.5 -0.5 1021 491" content="<mxfile modified="2019-05-29T11:48:04.413Z" host="wiki.onap.org" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" etag="zgXaW_pTuo0MciUNTLlH" version="10.6.3" type="atlas"><mxAtlasLibraries/><diagram id="cc2518d8-65ea-84d8-8e3f-abfc6d914d1d" name="Page-1">7V1td6K4Hv80vrSHZ/BlW3eme3bnbvd0ztmZfYcSlTNIvIit3k9/E0gQQtAIwcaW6ZlWkhBC/g/5/R8SR+bjev818TerbzAA0cjQgv3InI4MQzcnNvqDSw55iad5ecEyCQPS6FjwEv4PkEKNlO7CAGwrDVMIozTcVAvnMI7BPK2U+UkC36rNFjCqPnXjL8kTtWPBy9yPQK3ZP2GQrkip7kyOFU8gXK7Ioz3DzStm/vzXMoG7mDxvZJiL7F9evfZpX+S525UfwLdSkfnbyHxMIEzzT+v9I4jw3NJpy+/70lBbjDsBcSpyg+nkd7z60Q7QITsRuvdhg4eXHsiUOP/d4TE9rP1kGcYj8x7Vaps9+o0KszfD5eMUbvI6q1SXgn069qNwSe6bo8GB5Ngn+rQkf7Mnz2jBt3CewBeQvIZzQCvRu8zYG1DZhi1bJXj8lLPoo/TmpwbhK/eNV4TOeOQGfqumDtAosj5UG4dR6c54BUkaIla/zwkyzUj2QMgzjcAC3wVRq0WUceYiRBxjPixgnBJB1Q1y/cVfhxEW8ScQvQLcKx5nuo5wI9wG3foII5hkT8aSYMznqHybJvAXKNUEzsyxnWK0Zf4lLI1HDfalIsLPXwFcgzQ5oCak1qayRXSP7pLrt5Ika6RsVRJihygtnyiPZdH1UYDQByJDDfKksjg9T5+/It20GURpECUhUdK9qih5HEmyeJKkdZckmyNJzPSDOLjHiz26ghsQVycMVZbneJv6SUpbB6G/hnHwfYVFL6+ibS1a8CWj1RTLHAgQOCCPhUm6gksY+9Fvx9IHsA/TH7j1nU2ufpJhNFJhC3fJHFS0BnrsElBEkRfhR5+kVAIiPw1fq7iFN+/k1mcYooEUFGZ1pcZQLh8luamMI5h+dLvakWkxHeXvVuso44LidYQYo45Y9BpnJACpCX+WXWpVvmCkky/CkT8D0UOB5aqCh9FcVYg1LqHtCkYlozlCP3ExHJMX7EhrnSEJXCy2oCs13Do17u7iNgRJcv1xExSRQxCzKjNjVmakEMhTHJG87GYDKBlAibjsWVpVbArcXkYlek+oZKK4NA1SNEiRmBQxi08hVSUpsnsSIiqc743t9Y7YHs1+cihV4cufBOAI4X6vjvsn18H9OqNEJy1xv+Uwyrg/3K/rNa5RFPhT/v7YyF83bgn6y6PJDWF/XWl3JPrrrzMC169AvFuDBE0wjIuK6k3VPpMSBvp+2PQXLUD9j3/UH9sZluB+p9zXGd83P64TiCGEumkYo7v2eWOA56JkF7xWOMa6CMfEMAYMjjkPPijEKPDGzwoU+UGUKoUl2p1hd0AfVGH0DT/GOoM+3Zb4g/U71jqSiD/qHmmZ+GMG0xSupS13lmIQZMx4msdMsE3OeseLZsuDI6qS6FIKCeu3unNXIfhQWYkHf8fg7zgpIyZjqNr6Ff0dqvvgj8jzA8vRJ2N41sF3VYZX3U1+tKkGhv8wDD85z/BOTwxfYDYxS3AWwfmvUdmP7eVXpaSTirub72fWR03eaWEPNIV4bVzQZRObTqJkK8Fu65cubP6mjuTZhQWn9kP7Rvqe4gox2ncIP/RA+yJpnJLMaEl7i/UJsO5vibQ3bpX2E6VobzmSaM8m/1qsdpdIe573TxmQ88duBpIYpGD7CZDOhzeRbfzDA1BO9g/VLBM/CBFzlOpm2Y8ccGV6VQGdcNzsvJx6UwK4MuvWxNqP/SVm7WZde1nWAPHNS0wFpgq85K8/kS6QXUz3lavD6OjbP1bhC1ojpOqpniqrerrt56yuJ+TX7jTTqnJAAdU6qn6byTHX2W0YwqqfzQtjc5kbVP+xo2ZfNGIT/1BqscF3bE+8lMu8lF7ZhoU+5D22XXssAXtDiVQIKrvvEIcQVS8WD7+XVpR8NdCy1AahdUKNhAd5M98xAET1BbsUSIn4WP0C8KPGNk5Y3m4r05tjfQmrZaXNLwbL9xiStdT2M8IonB9+X2+iAYLfPgS/TjoLIzqcpFwKxKXvt+NBCmVk6cf947c/6wLFzYgaRGwQsVM40mYWOk6cQDf7krJmsKmAlE0TCKPtp1q3Phv3C/C+wfHjSOF9HlZXhvfvN2A/cP7H5XxdIB9C1/tS+7xE/D7M1Aviw/ls0+ONhCNHFCeW7VbrHUNHY5ONHbWNGY8N7UxP8ixX+7LU8asEDtsyhK4WQzDR39Z+DJ3hhh7DyPZlh52oE0amS7oqtNcNWcRn9pX0GEe2BZLWZe0i0cpUru4iqcarxHeRUHK/xzYSi9lG0nobq8nwjWnbvZGbc2JKjd6qbCOhvKnMNhKG4Hofu0hsXrr25QS6zi4SeRTqK75GNWdpOsEezHepovH7hh13rowtdxxdKbxcdo3vsFlxrZdGJs+2x6XREUitVCLMTadA4TC30+x9ueUwt7yZ72dfv9PDAuXeQNjzBb/lh/ehDSEZKU5pJlm/sAbLYc+enNJe3TMnik7IEUNXRyh1Pw0fllRyDhk0Q9JZyh4DIQDDOanUvRKAGetMUl17Px+bnef1hmC8up9P0UOLqCAoY+r1kzDmSTrF4QrQRh5F5BCE8ZEYd30Y395l3jBlz33ufDac+462ouGwbhZJuYCGK+ZXE863pv46Uzs5DurS4TfvnI7t9evTk6lTVHXoyVUidQ+ewkfTyaPJDR1NN6m7du6zBukKoN/P0+ctbh3j56L/S/Q6cV5+PDAaVSOVHePvhtHWuy1+hRn+DBdFP1t/jf+k2ZFwDPW3K38DMmSeYl3+tgpT8LLxMwX8lvibKkNsSwuFkEG2RV2F8fI7rpuOnbpxFdjACyyeceUZM9OR9XUoDDmp7uOG38rWFavzWx2XfFneA7GRAn+7AgGZd16eg7hrlrtpbuJONdcV9tly4tui385w5qwNWtbZMqp9T0db04jNknFZLpBnGk1anZ53KW8YV+eNFuHvHnmD3YlWy2Jou7PaZOMH8jjjn/3v/749Pfw9fdEmxuQ/jwd3DMdcdlHM6YlPHh3S0+WO47P5Qs3awezeneCZptTK6bJi82VP6QPMRifOEf7+18vjfVEkdoJwJsqDwA4CKyiwBuNcoAigJK4TTl4xzZ2TL6318ODKz6wptDSBNXpVcq72abeaQuGNSpyCD+Y8xx2dOirhTCDk9OkLzyAJEW3wYdniDjxeYtxJZCN+GIM+oYEYaqPrkiyJgispM7PGv3iQhU0ToUmB73Acw1hnz5smr9lsB7E3kAmX5THkMkJxgsrpHA2JCRr9OxxPaihlvJC106mNPmIbDUSve8JUjUj1TExJYSr3jj2pxrweMY0aMUO89G43YB4uQhCgz7PDx1p6qYdF8sIreZEVddlRjYCPPDJNOdqltvq0POJobHj8ZeldFlV2gT8Tg2Pbm1ZlDe5rSW3+CpwPtaQWmmdYU/FkSEq7ea81VSI1b2pRPTztvwT+g2PuXn+BKH4KxvGD4p7fXrxPvX6F1eCB+mgeKMZlbGjX80BxJZZnyGYwOACLML51EHxqt/0ZR1LDNtxuB3yexLtlYHxSu17gfXLpVxd1zvBkIGGHlF5WBARTensBxobHONGMM8j4zA2doXGDkAodfHlT0Pi0NlIHGuvVkEE/qc4Nk1H3UKgKjfumpiRobHSnHbpMIMY2x+aJv1l9gwHALf4P</diagram></mxfile>"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-f5f5f5-1-b3b3b3-1-s-0"><stop offset="0%" style="stop-color:#f5f5f5"/><stop offset="100%" style="stop-color:#b3b3b3"/></linearGradient></defs><g><rect x="850" y="90" width="100" height="65" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(850.5,90.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="98" height="63" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 99px; height: 64px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>MicroService</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="49" y="38" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="510" y="0" width="140" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(510.5,0.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="138" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 139px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPGroup</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="69" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 580 75.99 L 580 113 Q 580 123 590 123 L 775 123 Q 785 123 785 133 L 785 182.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 580 60.99 L 584.41 68.49 L 580 75.99 L 575.59 68.49 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 778.5 170.88 L 785 183.88 L 791.5 170.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(592.5,67.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><g transform="translate(794.5,152.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="18" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1..n</div></div></foreignObject><text x="9" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1..n</text></switch></g><rect x="730" y="185" width="110" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(730.5,185.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="108" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 109px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPSubGroup</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="54" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="760" y="320" width="50" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(760.5,320.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="48" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 49px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="24" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 785 260.99 L 785 317.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 785 245.99 L 789.41 253.49 L 785 260.99 L 780.59 253.49 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 778.5 305.88 L 785 318.88 L 791.5 305.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(797.5,252.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><g transform="translate(794.5,287.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="18" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1..n</div></div></foreignObject><text x="9" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1..n</text></switch></g><rect x="505" y="185" width="140" height="90" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(505.5,185.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="138" height="88" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 139px; height: 89px; overflow: hidden; white-space: nowrap; text-align: center;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<enumeration>><br />PDPType</b></p><hr size="1" />PDP-X<br /><div style="height: 2px">PDP-D<br />PDP-A<br /></div></div></foreignObject><text x="69" y="50" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 730 200 L 698 200 Q 688 200 688 210 L 688 220 Q 688 230 678 230 L 645 230" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(712.5,181.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><rect x="690" y="430" width="50" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(690.5,430.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="48" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 49px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-X</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="24" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="760" y="430" width="50" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(760.5,430.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="48" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 49px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-D</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></foreignObject><text x="24" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="820" y="430" width="60" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(820.5,430.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="58" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 59px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-A</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></foreignObject><text x="29" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 715 430 L 776.77 385.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 784.09 380.65 L 779.38 389.54 L 774.15 382.22 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 785 430 L 785 390.12" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 785 381.12 L 789.5 390.12 L 780.5 390.12 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 850 430 L 793.02 386.17" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 785.89 380.68 L 795.76 382.6 L 790.28 389.74 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="715" y="15" width="100" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(715.5,15.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="98" height="28" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 99px; height: 29px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>Kubernetes</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="49" y="20" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 815 30 L 890 30 Q 900 30 900 40 L 900 87.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 893.5 75.88 L 900 88.88 L 906.5 75.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(867.5,44.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="45" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">manages</div></div></foreignObject><text x="23" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">manages</text></switch></g><g transform="translate(879.5,67.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="18" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><div>0..n</div></div></div></foreignObject><text x="9" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 813 185 L 865.89 159.41" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 873.99 155.49 L 867.85 163.46 L 863.93 155.36 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="345" y="320" width="85" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(345.5,320.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="83" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 84px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyImpl</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="42" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="175" y="430" width="135" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(175.5,430.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="133" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 134px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>XACMLPolicyImpl<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="67" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="325" y="430" width="120" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(325.5,430.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="118" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 119px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>DroolsPolicyImpl</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></foreignObject><text x="59" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="460" y="430" width="115" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(460.5,430.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="113" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 114px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>ApexPolicyImpl</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></foreignObject><text x="57" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 243 430 L 378.43 383.3" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 386.94 380.36 L 379.9 387.55 L 376.97 379.04 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 385 430 L 387.39 390.1" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 387.93 381.12 L 391.89 390.37 L 382.9 389.83 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 518 430 L 397.44 383.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 389.04 380.4 L 399.06 379.43 L 395.83 387.83 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 430 335 L 458 335 Q 468 335 468 325 L 468 240 Q 468 230 478 230 L 505 230" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(442.5,336.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><path d="M 760 335 L 605 335 Q 595 335 595 345 L 595 355 Q 595 365 585 365 L 432.24 365" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 444.12 358.5 L 431.12 365 L 444.12 371.5" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(572.5,344.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="45" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">executes</div></div></foreignObject><text x="23" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">executes</text></switch></g><g transform="translate(439.5,366.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="18" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><div>0..n</div></div></div></foreignObject><text x="9" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="290" y="80" width="80" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(290.5,80.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="78" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 79px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicySet</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="39" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 510 30 L 450 30 Q 440 30 440 40 L 440 85 Q 440 95 430 95 L 372.24 95" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 384.12 90.67 L 371.12 95 L 384.12 99.33" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(417.5,57.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="45" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">executes</div></div></foreignObject><text x="23" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">executes</text></switch></g><g transform="translate(482.5,37.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><g transform="translate(381.5,105.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><path d="M 330 155.99 L 330 240 Q 330 250 340 250 L 378 250 Q 388 250 388 260 L 388 317.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 330 140.99 L 334.41 148.49 L 330 155.99 L 325.59 148.49 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 381.5 305.88 L 388 318.88 L 394.5 305.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(342.5,147.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><g transform="translate(397.5,287.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="18" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1..n</div></div></foreignObject><text x="9" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1..n</text></switch></g><path d="M 860 250 L 1006 250 L 1020 264 L 1020 300 L 860 300 L 860 250 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><path d="M 1006 250 L 1006 264 L 1020 264" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(862.5,251.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="156" height="41" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 156px; white-space: normal; overflow-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">All the PDPs in a given PDPSubGroup instance must be of the same type</div></div></foreignObject><text x="78" y="27" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 860 275 L 840 230" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 860 275 L 810 335" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><rect x="0" y="328.5" width="140" height="58" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(0.5,329.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="138" height="56" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 139px; height: 57px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeImpl<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="69" y="34" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="2" y="249" width="95" height="52" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(2.5,249.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="93" height="50" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 94px; height: 51px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<TOSCA>><br />Policy</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="47" y="31" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 345 372 L 230 372 Q 220 372 220 362 L 220 352.5 Q 220 343 210 343 L 142.24 343" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 154.12 338.67 L 141.12 343 L 154.12 347.33" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(183.5,352.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="93" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">has implementation</div></div></foreignObject><text x="47" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">has implementation</text></switch></g><g transform="translate(327.5,354.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><div>n</div></div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><g transform="translate(159.5,327.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><path d="M 345 350 L 250 350 Q 240 350 240 340 L 240 272 Q 240 262 230 262 L 99.24 262" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 111.12 257.67 L 98.12 262 L 111.12 266.33" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(204.5,287.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="70" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">is specified by</div></div></foreignObject><text x="35" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">is specified by</text></switch></g><g transform="translate(327.5,332.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><div>n</div></div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><g transform="translate(116.5,246.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><rect x="0" y="129" width="95" height="52" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(0.5,129.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="93" height="50" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 94px; height: 51px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<TOSCA>><br />PolicyType</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="47" y="31" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 50 249 L 49 249 Q 48 249 48 244.5 L 48 242.25 Q 48 240 48 230 L 48 183.24" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 52.33 195.12 L 48 182.12 L 43.67 195.12" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(16.5,204.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="62" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">is defined by</div></div></foreignObject><text x="31" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">is defined by</text></switch></g><g transform="translate(34.5,226.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><div>n</div></div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><g transform="translate(61.5,188.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g></g></svg>
\ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="999px" height="491px" viewBox="-0.5 -0.5 999 491" content="<mxfile host="Electron" modified="2020-04-08T14:21:45.444Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/12.9.9 Chrome/80.0.3987.163 Electron/8.2.1 Safari/537.36" etag="ugj4-FiNY8r_LWTr8hqT" version="12.9.9" type="device"><diagram id="DArkqDwHTHM-5atZUUOz" name="Page-1">7V1dc5s8Fv41vrSHb+zLJH7TdN7tbnaTmaa9w0a2mWLwAk7s/fUrYQmDEEQGyZETt9MmSCAE5+vROUeHgXm33n1LvM3qR+yDcGBo/m5gTgeGoduaAX+glj1u0TTt0LJMAh+3HRuegv8BciJu3QY+SCsnZnEcZsGm2jiPowjMs0qblyTxW/W0RRxW77rxlviO2rHhae6FoHbaz8DPVrhVdybHjgcQLFf41mPDPXTMvPmfZRJvI3y/gWEu8j+H7rVHxsL3TVeeH7+Vmsy/BuZdEsfZ4bf17g6E6OWS13a47r6ht5h3AqKM5wLTOVzx6oVbQKbshPDa2w2aXrbHr8T57xbN6XbtJcsgGpg3sFfb7OD/sDF/MtQ+zOLNoc8q9WVglw29MFji6+ZwciA5jgl/W+Kf+Z1npOFHME/iJ5C8BnNAOuGzzOgLYNuGblslaP6Es8it9Oa7+sEr84lXmM5o5gZ6qqYB4CzyMVSbh1EZzngFSRZAVr85EGSak+wWk2caggW6KoZnLcKcMxcB5BjzdhFHGRZU3cDH9946CJGMP4DwFaBR0TyzdYhOQufAS+/iME7yOyNJMOZz2J5mSfwHlHp8Z+bYTjHbMv9ilkazBrtSE+bnbyBegyzZw1Nwr01kiygfFx+/lSSZ6KNVSYgdGysQrDyWxdBHAYK/YBlqkCeVxelx+vgN6qbNVZSuosQlSvq4KkpjhiRZLEnS+kuSzZAk6vWDyL9Bxh4exRsQVV8Y7Cy/4zTzkoyc7QfeOo785xUSvUMXOdciDfc5raZI5oAPwQG+bZxkq3gZR17417H1FuyC7AWdPbLx0S88jUYqpPE2mYOK1oC3XQKCKA5N6NatlEpA6GXBaxW3sN47vvQxDuBECgrTulKjKHeYJb6ojCOocSDmqwxkWtRAh2erDZRzQfE4XIxRRyx6jTMSANWEN8sPtSpfUNLJFuHQm4HwtsByVcFDaK4qxBqT0HYFo+LZHKEfvxgO8QP2pLVOkSReLFLQlxpunRqjUdSFIMlBf1wERcQQxKzKzJCWGSEEGiuOSJ62sysouYISftmztKrYFLi9jEp0Sahkorg0XaXoKkV8UkQZn0KqSlJkSxIiIpwfje31ntgevv1kX+pCh78wwOHC/eM67p+cB/frlBKddMT9lkMpY3m4X9drXKMo8Cf8/bmRv25cEvQXR5MLwv660u5I+NNb5wSuH4FouwYJfMFxVHRUL6qOmZQw0PN+Iy9aAMcfvtRv2xuWoHGnzMcZ3jTfrheIwYS6aBiju/b7iwGWi5I2eJ1wjHUSjoniCFA45n3wQSBGgTd+VaDIC1aqBJZoI8PugT6IwpANP4Y6hT7djviD9jvWBhKIP+oeaZH4YxZnWbwWZu4sxSDIkPI0D6lgmxh7x4pmi4MjqpLoVApx67e6c1ch+FCxxFd/x9Xf0SojJrVQtfUz+jtU98EfkecnlqMvxvC0g++sDK+6m/y4proy/Kdh+Mn7DO9IYvgCs/GtBGdhPP8zKPuxx4ejUtJJxd3N9jPrgybvNLcHmkC8Li7o8hKbvETBqwS7q1+6WPM3DSRuXVhwqhzaN9K3jSv4aN8j/CCB9uak6sop8jhPjknQPgHa/S2Q9sal0n6iFO0tRxDt6eRfi9buAmnP8v4pA3L+3s5AEoEMpF8A6Xz6JbKN/rIAlJP/gT3LxPMDyBylvln+Vwy4MsdVAZ0w3OysnHpTALgy66uJtRd5S8Tazbr2tKwB7JsXmApMFHjJX9+SLpAfTHeVo/3g6Ns/dqED0sOl6omeKqt6su3nXV2Pya+NNNOqckAB1XqqfpvKMdfpbRjcqp/OC6NzmRtU/3GgZl80ZBNvXzpjg65IWx7KpR5Kr2zDgr8cRuxqeyyO9YYSqRBEdj8gDsGrXiwWfi9ZlIM10PLUBi47oUbCg7g33zMARPQFbQqERHwsuQD8qLGNlpW322npzVh9catlpZdfFJaXGJK11PYzxmEw339fb8IrBL98CH6edBZKdBhJuQSIC99vx4IUysjSy83dj3/UBYqZEXUVsauIteFImzJ0jDiBbsqSsmawqYCUTZM4DtMvZbe+Gvdz8L7B8OMI4X0WVleG9282YHfl/M/L+TpHPoSuy1L7rER8GcvUE+LDh7dNyhtxR44ITiyvW60PDB0NTTp21DVmPDS0d0YSt3K1T0sdP0vgsCtD6GoxBBX97ezH0ClukBhGtk8rdqJOGJmYdFVorxuiiE/tK5EYR7Y5ktZF7SLRylSu7iKpxqv4d5EQcn/ENhKL2kbSeRurSfGNadvSyM2omFKjtyrbSAhvKrONhCK4LmMXic1K1z6dQOfZRSKOQrLia0Rzll4n2IH5NlM0ft+w484VseWOoSu5zWXf+A6dFdfZNFJ5thJNo8ORWqlEmJu8AoXD3E6z9+WSw9zi3rycff2OBAPlXkDY8wk95af3oV1DMkKc0lSyfrEaLIc9JTmlx3XPHC86wSWGzo5Q6n4aNiyp5BxSaAans5Q9BlwAhlGp1D0TgBnqVFJddz8fnZ03loZgxnU/n6JFi4ggKLPUk5MwNhZUxeEM0EYcRcQQhPKRGCMZi+/xad4wZes+964N537gWtFwaDeLoFxAw+Xzq3HnWxN/nam1zoO4dNin907HHsv16YnUKao69MQqkboHT+HSdOJockGl6SZ1185NfkK2AvD/x+ljis6O0H3hvyV8nOjQfiwYDbuhyo7Qt2G09TZFjzBDv8eLYpzUW6MfWV4SjqJ+uvI2IEfmGdLlb6sgA08bL1fAb4m3qTJEWjIUXAuyFA4VRMtn1DcdOvXFlW+DsW+xFldjY2Y6oj6HQpGT6D5m+K28uqJ1fqdyyaflPeA1ku+lK+Dj987Kc+B3zTI3zU3cqea63D5bRnyb9+sM79TaIG29V0a173R0XRrRWTIuzQXilkaTTtXzTuUN4+y80SH8LZE36J1otSyGrjurTTp+II4zfu6+/357uP339EmbGJN/3u3dYTxksotiTk9UefSani52Hl/NF2pS21gti2GvWRVNyRqnj71mS57S5csGLVWEn//1dHdTNPHVD84F+SquV3HlXAXTBfDdcU1cJ4ysYpI5J15a68HBlZevpaBhAmv4qLiqdrtTTaHgRiVKwYZyY8cdtBVKOKLDkZZPrIQQHaOAjC0FGB5BEkACoXrZxzPoRi7MyEqYa0U8/EUa9AkJ0JC1uy5ohVHwK0F/tFOAP/hCp4+QZEEBZRpEYc2ilEl7soTATAn5nr9WZaGMO7BWJtqQEWRoIHrdJaVqaEgyMQXFi9wRXTLGPB8xjRoxA2QF0w2YB4sA+PD32f5zWUHi6njHBrJ2CbVYP8FGjdd1Vhg1UyeBUNEfHaCTvPltGOVvs2jGVsKGNX/85VPZsELUr0YMvQxBCScfZcQEUvOirNj+YXfve7eOuX39A8LowR9Gt4r7PKV4XqR+vOnqfflk3hdTo6XTYJTMkeV/Ycosa+2YI08fLILo0nFn2+eo3vGgNGxB7VfcshVjlsFoq349wcPiks/29AejVI5V109gDelNcYbJl2Qlo/DlUCefhSSTMRxKpPqlWjXIHFcNx4vCuu3KRR2sq1dT6+Rk7Ta8jPoaX1WsK5uagrCuIYF2P7U0/X3zO3zx7u+87/9x19tnh4Vsv5P4xCVtvGBbxxM9LEfraJlOyT4OtZGmTdqdOozQRA/DySgVLcRwoicxSSFqoikmogypQWPAMRUK5zelBjWS9YGmlM7CtrC+E2VK2YLJKkVSs6T6JVnSVgWkriE19JFF8bFEfVzfdqGqKZVMTnUsKTxMYrTsP56eeJvVj9gH6Iz/Aw==</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-f5f5f5-1-b3b3b3-1-s-0"><stop offset="0%" style="stop-color:#f5f5f5"/><stop offset="100%" style="stop-color:#b3b3b3"/></linearGradient></defs><g><rect x="828" y="90" width="100" height="65" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 102px; height: 65px; padding-top: 90px; margin-left: 828px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 102px; height: 65px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>MicroService</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="828" y="102" fill="#000000" font-family="Helvetica" font-size="12px">MicroService...</text></switch></g><rect x="488" y="0" width="140" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 142px; height: 60px; padding-top: 0px; margin-left: 488px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 142px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPGroup</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="488" y="12" fill="#000000" font-family="Helvetica" font-size="12px">PDPGroup...</text></switch></g><path d="M 558 75.99 L 558 112.5 Q 558 122.5 568 122.5 L 753 122.5 Q 763 122.5 763 132.5 L 763 182.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 558 60.99 L 562.41 68.49 L 558 75.99 L 553.59 68.49 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 756.5 170.88 L 763 183.88 L 769.5 170.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 67px; margin-left: 570px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="570" y="77" fill="#000000" font-family="Helvetica" font-size="10px">1</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 152px; margin-left: 792px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1..n</div></div></div></foreignObject><text x="792" y="162" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">1..n</text></switch></g><rect x="708" y="185" width="110" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 112px; height: 60px; padding-top: 185px; margin-left: 708px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 112px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPSubGroup</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="708" y="197" fill="#000000" font-family="Helvetica" font-size="12px">PDPSubGroup...</text></switch></g><rect x="738" y="320" width="50" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 52px; height: 60px; padding-top: 320px; margin-left: 738px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 52px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="738" y="332" fill="#000000" font-family="Helvetica" font-size="12px">PDP...</text></switch></g><path d="M 763 260.99 L 763 317.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 763 245.99 L 767.41 253.49 L 763 260.99 L 758.59 253.49 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 756.5 305.88 L 763 318.88 L 769.5 305.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 252px; margin-left: 775px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="775" y="262" fill="#000000" font-family="Helvetica" font-size="10px">1</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 287px; margin-left: 792px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1..n</div></div></div></foreignObject><text x="792" y="297" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">1..n</text></switch></g><rect x="483" y="185" width="140" height="90" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 142px; height: 90px; padding-top: 185px; margin-left: 482px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; width: 142px; height: 90px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<enumeration>><br />PDPType</b></p><hr size="1" />PDP-X<br /><div style="height: 2px">PDP-D<br />PDP-A<br /></div></div></div></div></foreignObject><text x="553" y="197" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle"><<enumeration>>...</text></switch></g><path d="M 708 200 L 675.5 200 Q 665.5 200 665.5 210 L 665.5 220 Q 665.5 230 655.5 230 L 623 230" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 193px; margin-left: 690px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="690" y="193" fill="#000000" font-family="Helvetica" font-size="10px">1</text></switch></g><rect x="668" y="430" width="50" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 52px; height: 60px; padding-top: 430px; margin-left: 668px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 52px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-X</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="668" y="442" fill="#000000" font-family="Helvetica" font-size="12px">PDP-X...</text></switch></g><rect x="738" y="430" width="50" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 52px; height: 60px; padding-top: 430px; margin-left: 738px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 52px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-D</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></div></div></foreignObject><text x="738" y="442" fill="#000000" font-family="Helvetica" font-size="12px">PDP-D
</text></switch></g><rect x="798" y="430" width="60" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 62px; height: 60px; padding-top: 430px; margin-left: 798px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 62px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDP-A</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></div></div></foreignObject><text x="798" y="442" fill="#000000" font-family="Helvetica" font-size="12px">PDP-A
</text></switch></g><path d="M 693 430 L 754.77 385.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 762.09 380.65 L 757.38 389.54 L 752.15 382.22 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 763 430 L 763 390.12" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 763 381.12 L 767.5 390.12 L 758.5 390.12 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 828 430 L 771.02 386.17" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 763.89 380.68 L 773.76 382.6 L 768.28 389.74 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="693" y="15" width="100" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 102px; height: 30px; padding-top: 15px; margin-left: 693px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 102px; height: 30px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>Kubernetes</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="693" y="27" fill="#000000" font-family="Helvetica" font-size="12px">Kubernetes...</text></switch></g><path d="M 793 30 L 868 30 Q 878 30 878 40 L 878 87.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 871.5 75.88 L 878 88.88 L 884.5 75.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 50px; margin-left: 868px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">manages</div></div></div></foreignObject><text x="868" y="53" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">manages</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 67px; margin-left: 877px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; "><div>0..n</div></div></div></div></foreignObject><text x="877" y="77" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">0..n</text></switch></g><path d="M 790.5 185 L 843.88 159.38" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 851.99 155.48 L 845.83 163.44 L 841.93 155.32 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="323" y="320" width="85" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 87px; height: 60px; padding-top: 320px; margin-left: 323px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 87px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyImpl</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="323" y="332" fill="#000000" font-family="Helvetica" font-size="12px">PolicyImpl...</text></switch></g><rect x="153" y="430" width="135" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 137px; height: 60px; padding-top: 430px; margin-left: 153px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 137px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>XACMLPolicyImpl<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="153" y="442" fill="#000000" font-family="Helvetica" font-size="12px">XACMLPolicyImpl...</text></switch></g><rect x="303" y="430" width="120" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 122px; height: 60px; padding-top: 430px; margin-left: 303px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 122px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>DroolsPolicyImpl</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></div></div></foreignObject><text x="303" y="442" fill="#000000" font-family="Helvetica" font-size="12px">DroolsPolicyImpl
</text></switch></g><rect x="438" y="430" width="115" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 117px; height: 60px; padding-top: 430px; margin-left: 438px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 117px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>ApexPolicyImpl</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></div></div></foreignObject><text x="438" y="442" fill="#000000" font-family="Helvetica" font-size="12px">ApexPolicyImpl
</text></switch></g><path d="M 220.5 430 L 355.93 383.3" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 364.44 380.36 L 357.4 387.55 L 354.47 379.04 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 363 430 L 364.99 390.11" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 365.44 381.12 L 369.49 390.33 L 360.5 389.88 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 495.5 430 L 374.94 383.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 366.54 380.4 L 376.56 379.43 L 373.33 387.83 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 408 335 L 435.5 335 Q 445.5 335 445.5 325 L 445.5 240 Q 445.5 230 455.5 230 L 483 230" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 348px; margin-left: 420px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="420" y="348" fill="#000000" font-family="Helvetica" font-size="10px">1</text></switch></g><path d="M 738 335 L 583 335 Q 573 335 573 345 L 573 355 Q 573 365 563 365 L 410.24 365" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 422.12 358.5 L 409.12 365 L 422.12 371.5" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 350px; margin-left: 573px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">executes</div></div></div></foreignObject><text x="573" y="353" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">executes</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 366px; margin-left: 437px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; "><div>0..n</div></div></div></div></foreignObject><text x="437" y="376" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">0..n</text></switch></g><rect x="268" y="80" width="80" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 82px; height: 60px; padding-top: 80px; margin-left: 268px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 82px; height: 60px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicySet</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="268" y="92" fill="#000000" font-family="Helvetica" font-size="12px">PolicySet...</text></switch></g><path d="M 488 30 L 428 30 Q 418 30 418 40 L 418 85 Q 418 95 408 95 L 350.24 95" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 362.12 90.67 L 349.12 95 L 362.12 99.33" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 63px; margin-left: 418px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">executes</div></div></div></foreignObject><text x="418" y="66" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">executes</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 37px; margin-left: 460px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="460" y="47" fill="#000000" font-family="Helvetica" font-size="10px">1</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 105px; margin-left: 367px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="367" y="115" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">1</text></switch></g><path d="M 308 155.99 L 308 240 Q 308 250 318 250 L 355.5 250 Q 365.5 250 365.5 260 L 365.5 317.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 308 140.99 L 312.41 148.49 L 308 155.99 L 303.59 148.49 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 359 305.88 L 365.5 318.88 L 372 305.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 147px; margin-left: 320px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="320" y="157" fill="#000000" font-family="Helvetica" font-size="10px">1</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 288px; margin-left: 395px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1..n</div></div></div></foreignObject><text x="395" y="298" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">1..n</text></switch></g><path d="M 838 250 L 984 250 L 998 264 L 998 300 L 838 300 L 838 250 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><path d="M 984 250 L 984 264 L 998 264" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 158px; height: 1px; padding-top: 251px; margin-left: 840px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">All the PDPs in a given PDPSubGroup instance must be of the same type</div></div></div></foreignObject><text x="840" y="263" fill="#000000" font-family="Helvetica" font-size="12px">All the PDPs in a given PD...</text></switch></g><path d="M 838 275 L 818 230" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 838 275 L 788 335" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><rect x="8" y="360" width="140" height="58" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 142px; height: 58px; padding-top: 360px; margin-left: 8px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 142px; height: 58px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeImpl<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="8" y="372" fill="#000000" font-family="Helvetica" font-size="12px">PolicyTypeImpl...</text></switch></g><rect x="148" y="198" width="95" height="52" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 97px; height: 52px; padding-top: 198px; margin-left: 148px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 97px; height: 52px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<TOSCA>><br />Policy</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="148" y="210" fill="#000000" font-family="Helvetica" font-size="12px"><<TOSCA>>...</text></switch></g><path d="M 323 372.02 L 245.5 372 Q 235.5 372 235.5 382 L 235.5 389 Q 235.5 396 225.5 396 L 152.2 396.02" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 164.08 391.68 L 151.08 396.02 L 164.08 400.35" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 386px; margin-left: 230px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">has implementation</div></div></div></foreignObject><text x="230" y="389" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">has implementation</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 354px; margin-left: 305px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; "><div>n</div></div></div></div></foreignObject><text x="305" y="364" fill="#000000" font-family="Helvetica" font-size="10px">n</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 380px; margin-left: 177px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="177" y="390" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">1</text></switch></g><path d="M 323 350 L 205.5 350 Q 195.5 350 195.5 340 L 195.5 252.24" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 199.83 264.12 L 195.5 251.12 L 191.17 264.12" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 328px; margin-left: 196px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">is specified by</div></div></div></foreignObject><text x="196" y="331" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">is specified by</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 332px; margin-left: 305px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; "><div>n</div></div></div></div></foreignObject><text x="305" y="342" fill="#000000" font-family="Helvetica" font-size="10px">n</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 234px; margin-left: 222px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="222" y="244" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">1</text></switch></g><rect x="0.5" y="120" width="95" height="52" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 97px; height: 52px; padding-top: 120px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; width: 97px; height: 52px; overflow: hidden; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; width: 100%; height: 100%; white-space: nowrap; "><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<TOSCA>><br />PolicyType</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></div></div></foreignObject><text x="1" y="132" fill="#000000" font-family="Helvetica" font-size="12px"><<TOSCA>>...</text></switch></g><path d="M 195.5 198 L 195.5 156 Q 195.5 146 185.5 146 L 97.74 146" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 109.62 141.67 L 96.62 146 L 109.62 150.33" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 146px; margin-left: 159px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">is defined by</div></div></div></foreignObject><text x="159" y="149" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">is defined by</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 175px; margin-left: 180px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; "><div>n</div></div></div></div></foreignObject><text x="180" y="185" fill="#000000" font-family="Helvetica" font-size="10px">n</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 153px; margin-left: 117px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="117" y="163" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">1</text></switch></g><path d="M 69.04 359.48 L 69.01 332 Q 69 322 59 322 L 53.5 322 Q 48 322 48 312 L 48 174.24" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 52.33 186.12 L 48 173.12 L 43.67 186.12" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 279px; margin-left: 57px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">Implements</div></div></div></foreignObject><text x="57" y="283" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">Implements</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 345px; margin-left: 53px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; "><div>1</div></div></div></div></foreignObject><text x="53" y="355" fill="#000000" font-family="Helvetica" font-size="10px">1</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 179px; margin-left: 69px;"><div style="box-sizing: border-box; font-size: 0; text-align: right; "><div style="display: inline-block; font-size: 10px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">1</div></div></div></foreignObject><text x="69" y="189" fill="#000000" font-family="Helvetica" font-size="10px" text-anchor="end">1</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg>
\ No newline at end of file diff --git a/docs/architecture/images/DesignTimeComponents.svg b/docs/architecture/images/DesignTimeComponents.svg deleted file mode 100644 index 3766c4cc..00000000 --- a/docs/architecture/images/DesignTimeComponents.svg +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1096px" height="492px" viewBox="-0.5 -0.5 1096 492" content="<mxfile modified="2019-05-29T11:48:19.079Z" host="wiki.onap.org" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" etag="TgGO2uxYwQk9-0toFjvi" version="10.6.3" type="atlas"><mxAtlasLibraries/><diagram id="4fe262cb-fef2-56cb-b8af-46ed0329d089" name="Page-1">7V1bd6M2EP41fnQOF3N7dOJsL6d7mnb3nKaP2JZtGmxRTLJ2f32FkQyMhI1BxCLxPmyCEEJovtHMfCMpA/Nhvfsp9qPVVzxH4cDQ5ruBORkYhmF5FvmRluyzEt3W3KxkGQdzWpYXfAv+Q7RQo6WvwRxtSxUTjMMkiMqFM7zZoFlSKvPjGP8oV1vgsPzWyF/SN2p5wbeZHyKu2l/BPFnRUt328hs/o2C5oq92DSe7MfVnL8sYv27o+waGuTj8y26vfdYWfe925c/xj0KR+TgwH2KMk+y39e4BhengsmHLnvtScffY7xhtkloPGNkTb374iliX7ZA8ex+l3Uv2dEjsf1/TPt2v/XgZbAbmmNzVoh35nxQeviwtHyY4yu6NCvcStEuGfhgs6XMz0jkU522S35b05+HN00KBvyYN3of8Fdq8rlHsJwHeHG+UHyq3GbNGnyZP3/cRYjfI2ExhB0hZBMtWcToeDKms6zr/FaT94TP/WlYyD96EA7uicEoHyEgHT9TuRPg5w3H168inHN7ISo3Sy403FCcBwf04k87kIL97KqsJFZR5j0m9RXgA6iIgADLvF3iTUL0lGMquv/jrIExV/mcUvqG03fS7knWYVkrrkEcfcIjjw7vNuY/cxYyUb5MYv6DCHXvmouni2N8inCnC036jXaGIwvsnhNcoifekCr079DSqa3tWcEenpx8F1R7RSquCVnu0zKezyfLYeK5R5BeqVGIFM1yVFex5/PD1tyccBrP9SQjJ1ZDWqlAFblX6cZGShWiRdKVixPAYM6GKze2pbdmSVGw0Aiqm2yORkmkCJbNlKJmnspJNiDkPt2Ut+8A69dnAb5q1wO91hH32djWxP47Q7ob8D4p8ox7y3a6QrwuQD2SANvNxGg+Sq2mIZy+DNHBgAaebXX05jPtEKw8p2gXJc1pMvii7+ptWygaVxYWHuhvS9ULl9PLv4r3Jjj6bXe3pVaUQtvg1nqGyB5kQ/US02q+/vVrJHz+sOPL/W1rbl2FofxnqmpnVRHMW3VYIsGiTmSRiFJJg6q0cAIvEQ5t7wgHpdA4GW7dKYBgBCWefRJ8qRqSwIQM0NDy6DaypbCS4pg54OX5lPQiJwt93gNApwFTAqxWEvF5AyICRmtkLDJnqYag1YtjIK44YHVqgfiBmdBFiNniDACjIWH+jdXGcrPASb/zwMS/NwaEXoZGD6JlBgwHqzklvzf3tCs1LE1HBeXAex/YjeypHV3pxEbhOA6kIOUZPngVXSyDpAEacf1IbRy50iRgXfgZGRNj+vlAtSitsT0B/ZMM+j8zTXYNPjLTT9Z2T9ckvWZ8ba4HFaQHDSq4GMSKutz89XIKZETjS0Nue4iTBa3Ij9KcovD/y8mU3OWXmyy63GMVMZWnCgfZocOTxL/CadVnGsiQcAwAWLxZb1Hqiss9PVDUkFGd+f29EJEdCBjAodgcCskSWRJng/8Au/7KOwhu3fOOWS1p0wXTpOMYd1CS9Lrls2tVaW5dmsHg7pZCOZeTyTcluStZGyWy7jZJZEpRM5Gkoo2Qpi31TsZuKtVExy6qnYiK2XIoZUzpHmuWI0nU5Nz276VkrU+ZAIk+8FkG04Mdy2+sZI03UzkpVjnSRp2PRZZGRY9PIVeheB8iWTD53wPmoTdTZID73uKbkEb52p5nKLiRvKSZ524F0VwvJu2XJ606XojeuMx20h4CtGAQsmcoPqG3d6hIClyUIW6V7gLS1gZR0z4lsYstUUG1EtUWPacHEjN48xQM8DK8Wci7O8HDv0XUHQLFdBsbm2WN1MzBMi5TNwAxH5RakEPy2iHy8XELvk4GRJ6JLJVTbOa+mmQSh6CF/cVks+h7xnsakmhceNLA6yhZ1XdVdIe8UJurGqBbhaYroGEcCEpWmYwYnNl59//3bw3hw2Zaro0rdmJ0bs9NYZXVujZZt1aZ2JFCozsehdmxBdGdfM7rT4QI8Mss1Du90zQbkDteWvPDOUYjcqcZQLVQ4AsLvuqjQLL2s8pbXHBW6AYmfLmHRJ+JHGYF7piVR3hpkebqUdw2WR5VYunx6QptQ2oOrUHWNE1iN5bdOWct1FyRipMTSDk93KORy5z5ytqSnj56y5EDzQ/iskMQTh5mGKMyUkI10RPyRgphPV9j0EfFBLRXgan12tfBgkl6sFXpXWiE6lKPaN2uSkbkktVKVuDmTdjlu7ykndVpmZJj7d41tOEOPy9LAXVi1vT947AvcjyotS8NtgtY9gMV2WRqHZwrVzdIwzVImSwOzfFI8SbcGEaRMVkaeSPqzL8YVBd+KuT0PMfITHPfR67kx4mq4US40lyM23Z2LLWScv+HyjIcfRWGAtqecKRyhDXCmjpTXYbi3xDInwPU6lLFKI1ZQoMbOO2T1idTM2yoSb915W2yiarTKisFAuyOzqlFCgimJj3P4I14aOmQGZPYMuFe/wiMTrOXRhN8q14J0uzYmm4qk2HdXuYUx3fhckraLVzldSkqkpUCqTsWQIxB+LQ0ZBJ+0gGIyPP0zAk5NK1BeSNmREaidhcmNgG6xUHFfNvKt107CxdfwsIH6QTl3PIbV1AiAxAM0S3Ig7vTGCNiKGQFwoorVhXR4Fk9ZiyBNPEpbBJ6pmqVBbn9swXmn37AGzVnbxtag5dFbFDvEROjMN2m/GwOGno0P/OMOUDVrnpmUN1UN44v5XAPsDjr2Rhaf6/HkoapGxVPbqAyhHyJlFvP49VzKmhVpAlLZrHgGJxCVyNzJ0/ONyr1RuW0z4nA7wnG18XscoO+JFq+ppGIToGIfWKE+G/JdjhgWIJ95hNKBr/aawMnT+Ab8jwp856rAr7GxtMXy9EZ7FPiIvHKYiwEz8w+LATMLoq+za0HnaE6naXDswKZMmF2Rt4Tdq3Hca0/2N3mCw6SvignHhsremC9xIPVi1iTRm0CCZ8DfBRLtASDYynRVANiePAC855zQ/VJZMdF6wfkklQRxkc0tYbAWhGrDpTWXyq16bZxgg2e2w5MDOzt93nTPnCav2OnzXp9W1XqfYlXtkd3oxbJaeTLpz7Lavzbjx+1L/PgP/nfxtPQfX76P/szTUAWxBesoRGtE55ALjIUamb+KP56S5/7O7MoorxAxJCwRYWsCWy4R0SzNkePOONyf/Gwc4ngwraNfvDJQYv6PPz+UbkGXZXkqlIgnotYS7ZHEpNPpSUAZEwVXiQ47WYNSMRg8ubKRacl6JE1J/gaMnfQOZHl6kYWaDPGgi4OaPgHXfMtaSqGwTZM71P64Oe4MiW0Z1ZNABYlNLmOcyiFX8NiPVl/xHKU1/gc=</diagram></mxfile>"><defs/><g><rect x="345" y="400.5" width="140" height="90" fill="#dae8fc" stroke="#6c8ebf" pointer-events="none"/><g transform="translate(345.5,401.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="138" height="88" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 139px; height: 89px; overflow: hidden; white-space: nowrap; text-align: center;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<enumeration>><br />PDPType</b></p><hr size="1" />PDP-X<br /><div style="height: 2px">PDP-D<br />PDP-A<br /></div></div></foreignObject><text x="69" y="50" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="805" y="245.5" width="100" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(805.5,246.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="98" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 99px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>XACMLPolicy<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="49" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="915" y="245.5" width="90" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(915.5,246.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="88" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 89px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>DroolsPolicy</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></foreignObject><text x="44" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="1015" y="245.5" width="80" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(1015.5,246.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="78" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 79px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>ApexPolicy</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></foreignObject><text x="39" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 855 246 L 951.36 187.27" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 959.05 182.58 L 953.7 191.11 L 949.02 183.42 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 960 246 L 960 192.12" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 960 183.12 L 964.5 192.12 L 955.5 192.12 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 1055 246 L 968.39 187.65" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 960.93 182.62 L 970.91 183.92 L 965.88 191.39 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 913 169 L 913 168 Q 913 167 903 167 L 795 167 Q 785 167 785 177 L 785 440 Q 785 450 775 450 L 495 450 Q 485 450 485 448 L 485 446" fill="none" stroke="#7ea6e0" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><g transform="translate(895.5,175.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><rect x="472.5" y="348.5" width="100" height="36" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(473.5,349.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="98" height="34" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 99px; height: 35px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>XACMLImpl<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="49" y="23" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="582.5" y="348.5" width="100" height="35" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(583.5,349.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="98" height="33" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 99px; height: 34px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>DroolsImpl<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="49" y="23" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="692.5" y="348.5" width="80" height="36" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(693.5,349.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="78" height="34" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 79px; height: 35px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>ApexImpl<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="39" y="23" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="570" y="245.5" width="140" height="58" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(570.5,246.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="138" height="56" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 139px; height: 57px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeImpl<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="69" y="34" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 523 349 L 630.56 307.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 638.96 304.4 L 632.17 311.83 L 628.94 303.43 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 634.62 348.5 L 638.78 314.04" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 639.87 305.11 L 643.25 314.59 L 634.32 313.5 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 733 349 L 649.11 308.41" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 641.01 304.49 L 651.07 304.36 L 647.15 312.46 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 570 289 L 570 291 Q 570 293 560 293 L 450 293 Q 440 293 440 303 L 440 401" fill="none" stroke="#7ea6e0" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><g transform="translate(552.5,271.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><rect x="0" y="348.5" width="130" height="37" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(0.5,349.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="128" height="35" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 129px; height: 36px; overflow: hidden; white-space: nowrap; text-align: center;"><b>PolicyTypeXACML<br /></b><hr size="1" /><div style="height: 2px" align="left"><br /></div></div></foreignObject><text x="64" y="24" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="130" y="244.5" width="140" height="56" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(130.5,245.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="138" height="54" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 139px; height: 55px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<TOSCA>><br />PolicyType<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="69" y="33" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 65 349 L 190.47 304.39" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 198.95 301.37 L 191.97 308.63 L 188.96 300.15 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 200 349 L 200 311.12" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 200 302.12 L 204.5 311.12 L 195.5 311.12 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 310 350.5 L 209.23 305.15" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 201.02 301.46 L 211.07 301.05 L 207.38 309.26 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="140" y="348.5" width="120" height="38" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(140.5,349.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="118" height="36" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 119px; height: 37px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeDrools<br /></b></p><hr size="1" /><div style="height: 2px"><br /></div></div></foreignObject><text x="59" y="24" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="270" y="348.5" width="110" height="38" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(270.5,349.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="108" height="36" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 109px; height: 37px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyTypeApex<br /></b></p><hr size="1" /><div style="height: 2px"><i><br /></i></div></div></foreignObject><text x="54" y="24" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 270 287 L 270 289 Q 270 291 280 291 L 405 291 Q 415 291 415 301 L 415 401" fill="none" stroke="#7ea6e0" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><g transform="translate(282.5,273.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><rect x="395" y="0" width="120" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(395.5,0.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="118" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 119px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PolicyCreator<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="59" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 515 45 L 630 45 Q 640 45 640 55 L 640 243.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 633.5 231.88 L 640 244.88 L 646.5 231.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(622.5,71.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="34" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">applies</div></div></foreignObject><text x="17" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">applies</text></switch></g><g transform="translate(507.5,52.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><g transform="translate(631.5,223.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><path d="M 395 30 L 245 30 Q 235 30 235 40 L 235 242.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 228.5 230.88 L 235 243.88 L 241.5 230.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(141.5,144.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="70" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">parameterizes</div></div></foreignObject><text x="35" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">parameterizes</text></switch></g><g transform="translate(407.5,42.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><g transform="translate(226.5,222.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><path d="M 515 15 L 950 15 Q 960 15 960 25 L 960 127.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 953.5 115.88 L 960 128.88 L 966.5 115.88" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(809.5,9.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="37" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">creates</div></div></foreignObject><text x="19" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">creates</text></switch></g><g transform="translate(527.5,2.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><g transform="translate(951.5,107.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><rect x="300" y="140" width="100" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(300.5,140.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="98" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 99px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPXCreator<br /></b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="49" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="410" y="140" width="95" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(410.5,140.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="93" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 94px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPDCreator</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></foreignObject><text x="47" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="510" y="140" width="95" height="60" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(510.5,140.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="93" height="58" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 94px; height: 59px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b>PDPACreator</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /></div></foreignObject><text x="47" y="35" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 350 140 L 446.95 66.13" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 454.11 60.68 L 449.68 69.71 L 444.22 62.55 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 458 140 L 455.38 70.11" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 455.04 61.12 L 459.88 69.94 L 450.88 70.28 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 558 140 L 462.99 66.21" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 455.88 60.69 L 465.75 62.65 L 460.23 69.76 Z" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 515 30 L 775 30 Q 785 30 785 40 L 785 440 Q 785 450 775 450 L 495 450 Q 485 450 485 448 L 485 446" fill="none" stroke="#7ea6e0" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><g transform="translate(527.5,16.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">1</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">1</text></switch></g><path d="M 570 260 L 570 259.5 Q 570 259 560 259 L 270 259" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(400.5,253.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="55" height="11" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">implements</div></div></foreignObject><text x="28" y="11" fill="#000000" text-anchor="middle" font-size="11px" font-family="Helvetica">implements</text></switch></g><g transform="translate(542.5,242.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="8" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">m</div></div></foreignObject><text x="4" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">m</text></switch></g><g transform="translate(276.5,245.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="10" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 10px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;">n</div></div></foreignObject><text x="3" y="10" fill="#000000" text-anchor="middle" font-size="10px" font-family="Helvetica">n</text></switch></g><rect x="912.5" y="130" width="95" height="52" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(913.5,130.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="93" height="50" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 94px; height: 51px; overflow: hidden; white-space: nowrap;"><p style="margin: 0px ; margin-top: 4px ; text-align: center"><b><<TOSCA>><br />Policy</b></p><hr size="1" /><div style="height: 2px"></div><hr size="1" /><div style="height: 2px"></div></div></foreignObject><text x="47" y="31" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g></g></svg>
\ No newline at end of file diff --git a/docs/architecture/images/PFDesignAndAdmin.svg b/docs/architecture/images/PFDesignAndAdmin.svg index f91d3084..0be2163e 100644 --- a/docs/architecture/images/PFDesignAndAdmin.svg +++ b/docs/architecture/images/PFDesignAndAdmin.svg @@ -1,2 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1111px" height="333px" viewBox="-0.5 -0.5 1111 333" content="<mxfile modified="2019-05-29T11:47:21.032Z" host="wiki.onap.org" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" etag="vJRmICOpGRSJj4XFN2EV" version="10.6.3" type="atlas"><mxAtlasLibraries/><diagram name="Page-1" id="b5b7bab2-c9e2-2cf4-8b2a-24fd1a2a6d21">7V1bb6M4FP41eZwR98tjm3S6I2011XSrnX10wE3QEIyAXjK/fu1gE7BNaigkoJlWquAYjDnH37n5mC7M5e7tNgPp9g6FMF4YWvi2MFcLw/B9G/8lhH1J8DSvJGyyKCxJ+pHwEP2ClKhR6nMUwrxxYYFQXERpkxigJIFB0aCBLEOvzcueUNx8ago2UCA8BCAWqf9GYbGlVN3xjw1/wWizpY/2DLdsWIPg5yZDzwl93sIwnw4/ZfMOsL7oi+ZbEKLXGsm8WZjLDKGiPNq9LWFMWMvYVt73paW1GncGk0LlBqO84QXEz/TV71EcBfsVfIExSnekm3KgxZ4xZ1vsYnykL8zrpyiOlyhG2aGFvKoRBJieFxn6CWstobN2bAe3bDIQRrjXxl2h75A2cfD0fV5gVsC3Gom+zC1EO1hke3wJbTUcylg68SpGv9bEaFPatiZBk9IAnTmbqusj9/ABZaCcmaaEmVkB4i4ctMmvjIPO4UfOwfXhdxgOVtyhHNQlHByLgVb7bLy6//qYw2xWrKzU2QlWVrSheWm38TLC/IjWz0WEkllB27QuyE1P4ObDajmryWi6doN97vlgzWBQ457AOpiEV8Rw47MEJZh4XWMmDLF1ptdijbpFG5SA+OZIvYZvUfEDt2qfbXr2H7s3waOtNZFT0qadYmuOnrMANkRfgGwDiwa2yLBOsj6DMSiil6ZTIeMkvfUeRcTeMpF5nC1zOVmUo6Q31Y0814/Fq3ReqOW7CR0d5Fq9jpqoRYdCEHUG8+gXWB9OtaagQRxtEnyclRPwmkzvCLtlV5S+RkWBdrghBmsYX1fOVlNREXcLIxAlBfUs9RZhUzZQL5IOaVH5DB2MZnmDsryVkSNaxBkhxxSRY5wHOTYHHb8ncvh+VJGDBQL2tctSckHePl6dU866q50cl2mevB4flCPoDWPRe5gwjK3Jw9gZH8YnwNoOcSUYWxeDselz8LP7WkCriRfBrRkIx5WJngqO3Tnh2Jk8jsUwYEY4ti+IY26aOxPHsaVNDMf+nHDsTR3HhhiQVomm28evAmunnBZRyYpoIwX21WhnGZ4wTl1AIRr2YAqxJd89sELkHbEL60Mmp1noQ26xaor6sDXxfi2wNd+ClBwG+zhKQojZcf26jQr4kIIDsF4zkDa5vSasg+Hf64pQMfTbc4F7gS269eI5U1szmujyReXqjaRbTVG3ljK5CndRMjsr5TY56UmslD4WJ2XrchUnyXIImN1iiG1wM1Nm9q2xGHrJrKSSaWfgqZt2Ng1GD3a4qd7btpua25TxSMGObTSfw5KcrUlR3zh1/YeNuzmn5KM5+eSjNZXko9sLyoaIZOaujO6lc9m8ymp19tKNpjtcrcUOjGSTH7D9jpvOX/+OW29bxqnrP4x8a07pSmvy6Upr1ulKU7Z8eCbkOxwwTL0n8l2T64h3Boay4f5JZJ4fyXNKWFqTT1jaIpJrIcwca+Nsv+l0ygJC5ggOXhqnMDmnm7a0JQVJ54ptbJMLFfrGNkL8qo2jFx2HS0ReOLZh/JqFXmQ4ma5edIwWvXjzBoP5lbj6BuePn3MxxxHTZKs7AO5nZVZc3nHT7DNy8Ix5sZpVqRmSH3Ujc2xTsiuOxN8+l12x+Er5vnbF5TqqkkkD2xWXK6k1+X0271zPxjWYXZlTzsyZfM7MOUPObEQkGyKSnTMh2eWL1i0OgL2RzHc0XNG6M6e0kzP5tJMjBqtX+T4JliCOZxalenw9p8Qh88fyJsQo9WGeXPQVuDjWMrqrEHDVNHkQgzyPyiAAZIVIruv4lkheb1/1UA7ypSrcV1Th72zpYrSP5gKaQq0qkboqep2rtTT5zRrDKXpXDHHUJoNc6sbQKW9HktphM+GP1HtLvVtY9p7U3RNgHw7r3qSk7nPSsvh0narYfbtfAXcfsSuERMOAveHBu+puugztqm76meTOe/O8uJTlztZY2gL8AeXeLXbrJvch4C7Js0wN7tyqpdU3HePzeR1+A9eAYpctdjsxCcjC6AUfbshhmR3Gl13hGO0JBCTHo4EkxH/vYAFCUAB2F35g7UZZX6t7fNstjuXSqpOH5/WGElbwKUoikoPO1btkwysQ/vPOA+5AmkbJpup9nfE988/jUMBKeRNUkIzEO2W8OQ1LLUmIW6C0FgjH8Ik8L8dd4fH9Q9pWnxwxMglt6IWWLDLxjLU52HcjbKPpaVj6ZzEpbMiKJflp3+vLEd0CEJpKCkG+hSHlvELMcdr5FPjruyvNdVU1lmwHqDstjWVzGw6qiqvOfinXka2NlnbyDGFmLL8/rohyuv+6IF+tyogSYCrhoAeO6gorgk+MxONfev8KpjHaS7/o9HsoAsdsMUb1tSFZNoc3Wr3UgCwIkev/COaV9LA10jYYFomyCQnRDkQJQeZhCRSSMSRlT4o9NC3P5+apui0jTAQv5Pk5tVnH14Ig2HYfT7FP669DqdQc/rGBpzJw3GfRTF0Xp74jmfqeP8DU7xaIqVtAt0ux8QdtoCxIZ5ieig3k1yR7F+dwu/1GzM14CksvPeaGZOXsg1GbRPyMKxMRv/DpQ7Z433nfCbuxSvYYo4lfKWgrPRdle/EdFlEGlS+/yoIt4bpgQR5Tsi6i3tF3FMdka+NsbdHKvvFW47thbnN6Gb4ricdYRqQOFH7XRC9j1Kv2s0841sPgNIzLtAIshxnAtsIaZePCVWSOqF18MfQ+FWDVUkITA+Z5nESdj488Se2cdJPuALj0uy3NKeOyiyPwQRdRtmGFxfhTQTG3N9Wwe/oILr98p1hn1wfFCst3WfmJASrHd/DZvex3CHDxO+08AVumRO662S5iZWi1fQoY075kYAdfUYadFm2JdimGlSQ/hN+x4HRcg1cUjXXGUhLTdAHu9vCtCF4h7qIwjNuUalOsA0jB5KY/WxquJ4Jl1cH8V1V6iUGlyuwj8/jidT78HPdF+zHaHBcDiW/FltRJ/Y7T2pdkdwyJQ91jWuPT438nKLX58T9AmDf/Aw==</diagram></mxfile>"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-fff2cc-1-ffd966-1-s-0"><stop offset="0%" style="stop-color:#fff2cc"/><stop offset="100%" style="stop-color:#ffd966"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-f5f5f5-1-b3b3b3-1-s-0"><stop offset="0%" style="stop-color:#f5f5f5"/><stop offset="100%" style="stop-color:#b3b3b3"/></linearGradient></defs><g><rect x="250" y="150" width="150" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="none"/><g transform="translate(271.5,158.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="106" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyDevelopment</div></div></foreignObject><text x="53" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyDevelopment</text></switch></g><rect x="140" y="50" width="50" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(148.5,58.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="32" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Portal</div></div></foreignObject><text x="16" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Portal</text></switch></g><rect x="200" y="50" width="120" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(209.5,58.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="100" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyDevAPIUser</div></div></foreignObject><text x="50" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyDevAPIUser</text></switch></g><rect x="330" y="50" width="120" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="none"/><g transform="translate(342.5,58.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="95" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyDistribution</div></div></foreignObject><text x="48" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyDistribution</text></switch></g><rect x="365" y="0" width="50" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(376.5,8.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="26" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">SDC</div></div></foreignObject><text x="13" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">SDC</text></switch></g><path d="M 390 30 L 390 50" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 165 80 L 165 90 Q 165 100 175 100 L 315 100 Q 325 100 325 110 L 325 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 260 80 L 260 90 Q 260 100 270 100 L 315 100 Q 325 100 325 110 L 325 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 390 80 L 390 90 Q 390 100 380 100 L 335 100 Q 325 100 325 110 L 325 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="30" y="50" width="100" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="none"/><g transform="translate(41.5,58.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="76" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyDevGUI</div></div></foreignObject><text x="38" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyDevGUI</text></switch></g><path d="M 80 80 L 80 90 Q 80 100 90 100 L 315 100 Q 325 100 325 110 L 325 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 492 226 C 492 218 572 218 572 226 L 572 244 C 572 252 492 252 492 244 Z" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" stroke-miterlimit="10" pointer-events="none"/><path d="M 492 226 C 492 232 572 232 572 226" fill="none" stroke="#666666" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(506.5,232.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="50" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 51px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyDB</div></div></foreignObject><text x="25" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyDB</text></switch></g><rect x="462" y="10" width="110" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="none"/><g transform="translate(472.5,18.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="89" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyAdminGUI</div></div></foreignObject><text x="45" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyAdminGUI</text></switch></g><rect x="512" y="150" width="140" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="none"/><g transform="translate(526.5,158.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="111" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyAdministration</div></div></foreignObject><text x="56" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyAdministration</text></switch></g><path d="M 517 40 L 517 50 Q 517 60 527 60 L 572 60 Q 582 60 582 70 L 582 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 363 180 L 361.5 180 Q 360 180 360 190 L 360 195 Q 360 200 370 200 L 522 200 Q 532 200 532 210 L 532 220" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 582 180 L 582 190 Q 582 200 572 200 L 542 200 Q 532 200 532 210 L 532 220" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="587" y="10" width="135" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(597.5,18.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="113" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyAdminAPIUser</div></div></foreignObject><text x="57" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyAdminAPIUser</text></switch></g><path d="M 655 40 L 655 50 Q 655 60 645 60 L 592 60 Q 582 60 582 70 L 582 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="910" y="150" width="100" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="none"/><g transform="translate(916.5,158.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="87" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">PolicyExecution</div></div></foreignObject><text x="44" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">PolicyExecution</text></switch></g><rect x="760" y="235" width="100" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(789.5,243.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="41" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">DMaaP</div></div></foreignObject><text x="21" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">DMaaP</text></switch></g><path d="M 760 250 L 750 250 Q 740 250 740 240 L 740 175 Q 740 165 730 165 L 652 165" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 910 165 L 895 165 Q 885 165 885 175 L 885 240 Q 885 250 875 250 L 860 250" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="860" y="50" width="90" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(871.5,58.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="66" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">AsyncCaller</div></div></foreignObject><text x="33" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">AsyncCaller</text></switch></g><rect x="960" y="50" width="80" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(969.5,58.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="60" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">SyncCaller</div></div></foreignObject><text x="30" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">SyncCaller</text></switch></g><path d="M 986.33 143.77 L 998.67 86.23" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 985.23 148.91 L 983.28 141.33 L 986.33 143.77 L 990.12 142.8 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 999.77 81.09 L 1001.72 88.67 L 998.67 86.23 L 994.88 87.2 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 905 80 L 932.49 144.15" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 934.56 148.97 L 928.59 143.92 L 932.49 144.15 L 935.02 141.16 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 960 150 L 930.65 85.79" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 928.46 81.02 L 934.56 85.93 L 930.65 85.79 L 928.19 88.84 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 860 73 L 787.68 229.22" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 785.47 233.99 L 785.23 226.16 L 787.68 229.22 L 791.59 229.1 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 810 235 L 880.29 85.76" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 882.52 81.01 L 882.71 88.84 L 880.29 85.76 L 876.37 85.85 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 342 271.5 L 568 271.5 L 582 285.5 L 582 331.5 L 342 331.5 L 342 271.5 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><path d="M 568 271.5 L 568 285.5 L 582 285.5" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(344.5,273.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="236" height="56" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 236px; white-space: normal; overflow-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div>Policy Artifacts and Metadata</div><div>PDP Group and Subgroup Definitions</div><div>Policy to PDP Group and Subgroup Mappings<br /></div></div></div></foreignObject><text x="118" y="34" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 532 250 L 462 272" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 620 80 L 796 80 L 810 94 L 810 130 L 620 130 L 620 80 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><path d="M 796 80 L 796 94 L 810 94" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(622.5,81.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="186" height="41" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 186px; white-space: normal; overflow-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">CRUD API for Policy Groups and Sub-Groups<br />API for Policy Deployment</div></div></foreignObject><text x="93" y="27" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">CRUD API for Policy Groups and Sub-Groups<br>API for Policy Deployment</text></switch></g><path d="M 950 241 L 1096 241 L 1110 255 L 1110 330 L 950 330 L 950 241 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><path d="M 1096 241 L 1096 255 L 1110 255" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(952.5,242.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="137" height="70" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 138px; white-space: nowrap; overflow-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div>Policies for a given</div><div>domain execute in a</div><div> PDP Group. PDP Groups</div><div> have subgroups for each</div><div> PDP type in a PDP group<br /></div></div></div></foreignObject><text x="69" y="41" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 985 180 L 1070 241" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 325 150 L 230 133" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 663 227.5 L 717 227.5 L 731 241.5 L 731 302.5 L 663 302.5 L 663 227.5 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><path d="M 717 227.5 L 717 241.5 L 731 241.5" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(665.5,229.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="48" height="70" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 49px; white-space: nowrap; overflow-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div>Deploy</div><div>Retire</div><div>Archive<br />Upgrade</div><div>Rollback<br /></div></div></div></foreignObject><text x="24" y="41" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 652 165 L 697 228" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 120 115 L 216 115 L 230 129 L 230 150 L 120 150 L 120 115 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><path d="M 216 115 L 216 129 L 230 129" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(122.5,116.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="106" height="27" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 106px; white-space: normal; overflow-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">CRUD API for Policy Artifacts</div></div></foreignObject><text x="53" y="20" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">CRUD API for Policy Artifacts</text></switch></g><path d="M 582 150 L 620 105" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><rect x="0" y="208" width="30" height="13" fill="#fff2cc" stroke="#d6b656" pointer-events="none"/><g transform="translate(39.5,207.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="164" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 165px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Policy Framework Component</div></div></foreignObject><text x="82" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Policy Framework Component</text></switch></g><rect x="0" y="225" width="30" height="13" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="none"/><g transform="translate(37.5,224.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="97" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 98px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Other Component</div></div></foreignObject><text x="49" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Other Component</text></switch></g></g></svg>
\ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1111px" height="333px" viewBox="-0.5 -0.5 1111 333" content="<mxfile host="app.diagrams.net" modified="2020-04-08T13:01:46.897Z" agent="5.0 (X11)" etag="I6gRPp6TBtgkpgymslct" version="12.9.10" type="device"><diagram id="0-5FABUy0DJKN6pRLFS_" name="Page-1">7V1bc5s4FP41fmyHO+YxttNsd7bTTNPMdvdNBsVmihED5OL99SsZCYMkbEHAhmmTmQwcgRDn6Ds3HZGZudy93aUg2X5BAYxmhha8zczVzDA8x8B/CWFfEFxXKwibNAwKkn4kPIT/QUpklz2HAcxqF+YIRXmY1Ik+imPo5zUaSFP0Wr/sCUX1pyZgAwXCgw8ikfp3GORbStUd79jwBww3W/roueEWDWvg/9yk6Dmmz5sZ5tPhp2jeAdYXfdFsCwL0WiGZtzNzmSKUF0e7tyWMCGsZ24r7PjW0luNOYZyr3EDl9AKiZ/rq9ygK/f0KvsAIJTvSTTHQfM+Ys813ET7SZ+biKYyiJYpQemghr2r4PqZneYp+wkpL4Kwd28EtmxQEIe61dlfgOaRNHDx9nxeY5vCtQqIvcwfRDubpHl9CWw2HMpZOvJLRrxUx2pS2rUjQpDRAZ86m7PrIPXxAGShnpilhZpqDqA0HbfIr46Bz+JFzcH347YeDJXcoB3UJB4dioNU8G2/uPz9mMJ0UK0t1doKVJa1vXtpNvAwxP8L1cx6ieFLQNq0rcnMucPNhtZzUZDRdu8Y+93KwZjCocE9gHYyDG2K48VmMYkxcVJgJA2yd6bVYo27RBsUguj1SF/AtzH/gVu2jTc/+YffGeLSVJnJK2rRTbM3Qc+rDmuhzkG5gXsMWGdZJ1qcwAnn4UncqZJykt96jkNhbJrI5Z8tcThbFKOlNVSPP9WPxKp0XavFuQkcHuZavoyZq0aEQRJ3CLPwPrA+nWl3QIAo3MT5Oiwm4INM7xG7ZDaWvUZ6jHW6IwBpGi9LZqisq4m5hBKI4p56l3iBsygbqRdIhzUqfoYXRLG5QlrcyckSLOCHkmCJyjMsgx+ag43VEDt+PKnKwQMC+cllCLsiax6tzyll3tZPjMs2T1+ODYgSdYSx6DyOGsTV6GDvDw/gEWJshrgRj62owNj0OfnZXC2jV8SK4NT3huDTRY8GxOyUcO6PHsRgGTAjH9hVxzE1zZ+Q4trSR4dibEo7nY8dxGT1Pxq2+Amj7s70NKdmeMcuP98qQZWKaBGS59ZQxQrYxN7wQ2JptQUIO/X0UxgHE7Fi8bsMcPiTgYAtfU5DUub0mrIPBX+uSUDL063OOe4Gzkab1bM2oo4vBoJLXY0Fs7+sdsgUPIpObYBfGJM8MJpdltg2On7IsszUUQ6+Z7lGyPUzkgydw2IIq0856R+tjavWOhvIYhQGbp82P7Rmnrn+3+TGnlMExR5/BscaSwXE7hX6GiGRmUIdGMp8SKa1Raz/SqDts5YJWz0g2+QHbZxxJ/vozjqdtGaeufzfyrSnlfKzR53ysSed8TNkazIWQ73DAMLvacNfkOuLTR33ZcO8kMi+P5CllfazRZ31sEcmVcGWKBUa2V3c655JYhTmCvdcXKUzOceXQarlwSVXHxWIbkwsVumbDhVhVG0YvOg6XKrtybMP4NQm9yHAyXr3IirUFvXj7Bv3p1Ql6BuePyzI42kAZHEdMia2+AHA/KbPi8o6bZl+QgxfMgVWsSsWQ/KgamWObkl1xJP72peyKxZcbd7UrLtdRmUzq2a64XF2iyW9WOHM9G1dvdmVKOTNn9Dkz5wI5swGRbIhIdi6EZJev/LU4AHZGMt9Rf5W/zpTSTs7o006OGKzeZPvYX4IomliUOueL4iQOmTeUNyFGqQ/T5KKnwMWhFnpdhYCrosn9CGRZWAQBIM1FclXHN0TyevOqh3KQL1XhnqIKP7MvhtHemwuoC7WslWmr6HWuYM3kK977U/SuGOKoTQa51I2+U96OJLXDZsJvqXeWeruw7JzU3RNg7w/r81FJ3eOkZfHpOlWxe3a3KtguYlcIifoBe82Dd9XddBnaVd30C8md9+Z5cSnLna2xNAX4Pcq9XezWTu59wF2SZxkb3LlVS6trOsbj8zp8JW6PYpctdjsRCciC8AUfbshhkR3Gl93gGO0J+CTHo4E4wH+/wBwEIAfsLvzAyo2yvlb3+LY7HMslZScPz+sNJazgUxiHJAedqXfJhpcj/OfMA76AJAnjTdn7OuV75p/HoYAVm8YoJxmJM4WmGQ1LLUmIm6OkEghH8Ik8L8Nd4fF9J22rD44YmQQ2nAeWLDKZG2uzt833tlH3NCz9o5gUNmSFkfy077T9vl0AQlNJAci2MKCcV4g5TjufAn89d6W5rqrGkm2jc8elsWyuJL6suGrtl3Id2dpgaae5IcyM5bfHFVFO959n5NM/KVECTCUc9MBRXWFF8IGRePxL71/BJEJ76Wdxfg1F4JgNxqi6NiTL5vBGq5MakAUhcv0fwqyUHrZG2gbDIlY2IQHagTAmyDwsgUIyhrjoSbGHuuX5WD9Vt2WEieCFPD+jNuv4WhD42/bjyfdJ9XUolZrD3zbwVAaO+7aUqevi1HckU3/u9TD12wVi6hbQbVNs/E4bKAvSGabHYgP5NcnOxTncfrQBczNzhaWXDnNDsnL2zqhNIn7GlZGIX/h+HFu8b73vhN1YJnuMwcSvFLQVnouyvfgG8zCFypffpP6WcF2wII8JWRdR7+gbiiKy+W6ytmhl385Xw7thbn16GZ4ricdYRqQKFH7XRCdj1Kn2s0s41sHg1IzLuAIshxnApsIaZePCVWQOqF08MfQ+FWBVUkIjA+ZlnESdj4/mkto5XTLF+KnQBZdeu6U5ZVy2cQTe6SLKNqywGH8sKHY5FNsdfQSXX75TrLPrgmKF5bu02ARP5XgGn+3LfvsAF7/Tbi5gy5TIXTebRawMrabvqWLapxTs4CtKsdOiLdEuwbCS5IfwO+acjqvxiqKxylhKYprOx90evmbAK8RdGARRk1Kti7UHKZjc9GdLw9VEsKw6mP/uRycxqFSZvWceX73Oh5/jnmg/BpvjYiDxNd+SOqlfcVp7kuyOIXGo+5jWt9+3r0vn++NDbESG9ud+tfD//aBrTd/XWMGXu8fPgijGPK1VPt481JaCBu42fVHmsB1wcvzlIgLZVsCePo6NT4//oKDwRY7/BMK8/R8=</diagram></mxfile>"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-fff2cc-1-ffd966-1-s-0"><stop offset="0%" style="stop-color:#fff2cc"/><stop offset="100%" style="stop-color:#ffd966"/></linearGradient><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-f5f5f5-1-b3b3b3-1-s-0"><stop offset="0%" style="stop-color:#f5f5f5"/><stop offset="100%" style="stop-color:#b3b3b3"/></linearGradient></defs><g><rect x="250" y="150" width="150" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 165px; margin-left: 325px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">PolicyDevelopment</div></div></div></foreignObject><text x="325" y="169" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyDevelopment</text></switch></g><rect x="140" y="50" width="50" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 65px; margin-left: 165px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">Portal</div></div></div></foreignObject><text x="165" y="69" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Portal</text></switch></g><rect x="200" y="50" width="120" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 65px; margin-left: 260px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">PolicyDevAPIUser</div></div></div></foreignObject><text x="260" y="69" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyDevAPIUser</text></switch></g><rect x="330" y="50" width="120" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 65px; margin-left: 390px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">PolicyDistribution</div></div></div></foreignObject><text x="390" y="69" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyDistribution</text></switch></g><rect x="365" y="0" width="50" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 15px; margin-left: 390px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">SDC</div></div></div></foreignObject><text x="390" y="19" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">SDC</text></switch></g><path d="M 390 30 L 390 50" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 165 80 L 165 90 Q 165 100 175 100 L 315 100 Q 325 100 325 110 L 325 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 260 80 L 260 90 Q 260 100 270 100 L 315 100 Q 325 100 325 110 L 325 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 390 80 L 390 90 Q 390 100 380 100 L 335 100 Q 325 100 325 110 L 325 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 80 80 L 80 90 Q 80 100 90 100 L 315 100 Q 325 100 325 110 L 325 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 492 226 C 492 218 572 218 572 226 L 572 244 C 572 252 492 252 492 244 Z" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" stroke-miterlimit="10" pointer-events="all"/><path d="M 492 226 C 492 232 572 232 572 226" fill="none" stroke="#666666" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 240px; margin-left: 493px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">PolicyDB</div></div></div></foreignObject><text x="532" y="243" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyDB</text></switch></g><rect x="512" y="150" width="140" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 165px; margin-left: 582px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">PolicyAdministration</div></div></div></foreignObject><text x="582" y="169" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyAdministration</text></switch></g><path d="M 517 40 L 517 50 Q 517 60 527 60 L 572 60 Q 582 60 582 70 L 582 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 362.5 180 L 361.25 180 Q 360 180 360 190 L 360 195 Q 360 200 370 200 L 522 200 Q 532 200 532 210 L 532 220" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 582 180 L 582 190 Q 582 200 572 200 L 542 200 Q 532 200 532 210 L 532 220" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><rect x="587" y="10" width="135" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 655px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">PolicyAdminAPIUser</div></div></div></foreignObject><text x="655" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyAdminAPIUser</text></switch></g><path d="M 654.5 40 L 654.5 50 Q 654.5 60 644.5 60 L 592 60 Q 582 60 582 70 L 582 150" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><rect x="910" y="150" width="100" height="30" fill="url(#mx-gradient-fff2cc-1-ffd966-1-s-0)" stroke="#d6b656" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 165px; margin-left: 960px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">PolicyExecution</div></div></div></foreignObject><text x="960" y="169" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyExecution</text></switch></g><rect x="760" y="235" width="100" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 250px; margin-left: 810px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">DMaaP</div></div></div></foreignObject><text x="810" y="254" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">DMaaP</text></switch></g><path d="M 760 250 L 750 250 Q 740 250 740 240 L 740 175 Q 740 165 730 165 L 652 165" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 910 165 L 895 165 Q 885 165 885 175 L 885 240 Q 885 250 875 250 L 860 250" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><rect x="860" y="50" width="90" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 65px; margin-left: 905px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">AsyncCaller</div></div></div></foreignObject><text x="905" y="69" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">AsyncCaller</text></switch></g><rect x="960" y="50" width="80" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 65px; margin-left: 1000px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">SyncCaller</div></div></div></foreignObject><text x="1000" y="69" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">SyncCaller</text></switch></g><path d="M 986.33 143.77 L 998.67 86.23" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 985.23 148.91 L 983.28 141.33 L 986.33 143.77 L 990.12 142.8 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 999.77 81.09 L 1001.72 88.67 L 998.67 86.23 L 994.88 87.2 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 905 80 L 932.49 144.15" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 934.56 148.97 L 928.59 143.92 L 932.49 144.15 L 935.02 141.16 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 960 150 L 930.18 85.78" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 927.97 81.01 L 934.09 85.89 L 930.18 85.78 L 927.74 88.84 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 860 72.5 L 787.67 229.22" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 785.47 233.98 L 785.22 226.16 L 787.67 229.22 L 791.58 229.1 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 810 235 L 879.8 85.77" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 882.03 81.01 L 882.23 88.84 L 879.8 85.77 L 875.89 85.87 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 342 271.5 L 568 271.5 L 582 285.5 L 582 331.5 L 342 331.5 L 342 271.5 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><path d="M 568 271.5 L 568 285.5 L 582 285.5" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 238px; height: 1px; padding-top: 273px; margin-left: 344px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "><div>Policy Artifacts and Metadata</div><div>PDP Group and Subgroup Definitions</div><div>Policy to PDP Group and Subgroup Mappings<br /></div></div></div></div></foreignObject><text x="344" y="285" fill="#000000" font-family="Helvetica" font-size="12px">Policy Artifacts and Metadata...</text></switch></g><path d="M 532 250 L 462 271.5" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 620 80 L 796 80 L 810 94 L 810 130 L 620 130 L 620 80 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><path d="M 796 80 L 796 94 L 810 94" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 188px; height: 1px; padding-top: 81px; margin-left: 622px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">CRUD API for Policy Groups and Sub-Groups<br />API for Policy Deployment</div></div></div></foreignObject><text x="622" y="93" fill="#000000" font-family="Helvetica" font-size="12px">CRUD API for Policy Groups and...</text></switch></g><path d="M 950 241 L 1096 241 L 1110 255 L 1110 330 L 950 330 L 950 241 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><path d="M 1096 241 L 1096 255 L 1110 255" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 158px; height: 1px; padding-top: 242px; margin-left: 952px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "><div>Policies for a given</div><div>domain execute in a</div><div> PDP Group. PDP Groups</div><div> have subgroups for each</div><div> PDP type in a PDP group<br /></div></div></div></div></foreignObject><text x="952" y="254" fill="#000000" font-family="Helvetica" font-size="12px">Policies for a given...</text></switch></g><path d="M 985 180 L 1070 241" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 325 150 L 230 132.5" fill="none" stroke="#000000" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 663 227.5 L 717 227.5 L 731 241.5 L 731 302.5 L 663 302.5 L 663 227.5 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><path d="M 717 227.5 L 717 241.5 L 731 241.5" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 66px; height: 1px; padding-top: 229px; margin-left: 665px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "><div>Deploy</div><div>Retire</div><div>Archive<br />Upgrade</div><div>Rollback<br /></div></div></div></div></foreignObject><text x="665" y="241" fill="#000000" font-family="Helvetica" font-size="12px">Deploy...</text></switch></g><path d="M 652 165 L 697 227.5" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 120 115 L 216 115 L 230 129 L 230 150 L 120 150 L 120 115 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><path d="M 216 115 L 216 129 L 230 129" fill="none" stroke="#82b366" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 108px; height: 1px; padding-top: 116px; margin-left: 122px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">CRUD API for Policy Artifacts</div></div></div></foreignObject><text x="122" y="128" fill="#000000" font-family="Helvetica" font-size="12px">CRUD API for Polic...</text></switch></g><path d="M 582 150 L 620 105" fill="none" stroke="#97d077" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><rect x="0" y="208" width="30" height="13" fill="#fff2cc" stroke="#d6b656" pointer-events="all"/><rect x="22" y="204" width="200" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 214px; margin-left: 23px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Policy Framework Component</div></div></div></foreignObject><text x="122" y="218" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Policy Framework Component</text></switch></g><rect x="0" y="225" width="30" height="13" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><rect x="22" y="221" width="128" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 126px; height: 1px; padding-top: 231px; margin-left: 23px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Other Component</div></div></div></foreignObject><text x="86" y="235" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Other Component</text></switch></g><rect x="30" y="50" width="100" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 65px; margin-left: 80px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">PolicyDevGUI</div></div></div></foreignObject><text x="80" y="69" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyDevGUI</text></switch></g><rect x="455" y="10" width="120" height="30" fill="url(#mx-gradient-f5f5f5-1-b3b3b3-1-s-0)" stroke="#666666" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 25px; margin-left: 515px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: nowrap; ">PolicyAdminGUI</div></div></div></foreignObject><text x="515" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">PolicyAdminGUI</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg>
\ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 526ec693..8f40e8b8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,4 +12,4 @@ intersphinx_mapping = {} html_last_updated_fmt = '%d-%b-%y %H:%M' def setup(app): - app.add_stylesheet("css/ribbon_onap.css")
\ No newline at end of file + app.add_stylesheet("css/ribbon_onap.css") diff --git a/docs/drools/RunEcl_frankfurt_project_explorer.png b/docs/drools/RunEcl_frankfurt_project_explorer.png Binary files differnew file mode 100644 index 00000000..4c1cf13d --- /dev/null +++ b/docs/drools/RunEcl_frankfurt_project_explorer.png diff --git a/docs/drools/clsimulation.rst b/docs/drools/clsimulation.rst index 8efff0a8..10276762 100644 --- a/docs/drools/clsimulation.rst +++ b/docs/drools/clsimulation.rst @@ -9,14 +9,42 @@ Control Loop Simulation and Injection of Messages Overview .. contents:: :depth: 2 +This section will cover how to interact with the PDP-D using telemetry commands. This assumes that you have a PDP-D running to interact with. Take a look at the page "Methods to run PDP-D" if you do not have a PDP-D running for testing purposes. + Telemetry ^^^^^^^^^ The username and password for the Telemetry commands are in *${POLICY_HOME}/config/engine.properties*. +If you are using Eclipse, the credentials can be found in the file **install-drools/src/files/base.conf** within the "drools-pdp" repository. +The environment variables $TELEMETRY_USER and $TELEMETRY_PASSWORD will also have the credentials if they have already been set. + +Recall you can use the command "docker exec -it drools bash" to get the PDP-D running with Docker. + + .. code-block:: bash + + docker exec -it drools bash + +Your terminal should now look similar to "policy@drools:/<path>". This indicates you are in the drools docker container. If you run "policy status" the controller should be running. + + .. image:: img/docker/policyStatus.png + +To enter the telemetry subshell, use the command "telemetry". + + .. code-block:: bash + + telemetry + +Use the "exit" command to exit the telemetry subshell. The terminal will now go back to the docker container. + + .. code-block:: bash + + exit + + .. image:: img/docker/credentials.png Injecting messages: ------------------- -To inject messages use the following command. The injected message will look as if it came in from the specified topic and will be processed accordingly. +To inject messages, use the following command. The injected message will look as if it came in from the specified topic and will be processed accordingly. Use the command: @@ -24,33 +52,48 @@ Use the command: http --verify=no --default-scheme=https -a <userName>:<password> PUT :9696/policy/pdp/engine/topics/sources/<comm>/<topic>/events @<onsetFile> Content-Type:"text/plain" -where <comm> is either "dmaap", "ueb", or "noop", depending on how the topic has been defined in the -configuration. "dmaap" is the default deployed messaging communication infrastructure in an ONAP installation. -The following is the equivalent "curl" version: +The equivalent "curl" version: .. code-block:: bash curl --insecure --silent --user <userName>:<password> -X PUT --header "Content-Type: text/plain" --data @<onsetFile> https://localhost:9696/policy/pdp/engine/topics/sources/<comm>/<topic>/events -The topic being used is *unauthenticated.DCAE_CL_OUTPUT*, which is subject to change. The onset file is a file that contains the data to inject as the onset. The data contained depends on the use case. This is an example for VoLTE: +Note: you may have to replace "https" with "http" depending on how you are running the drools-pdp. + +The <comm> is a messaging communication infrastructure in an ONAP installation. Depending on how a topic has been defined in the configuration, the <comm> is either "dmaap", "ueb", or "noop". +The default messaging communication infrastructure is "dmaap". + +The <topic> is a specific topic name used to send and/or receive information. There are two types of topics: + +1. **source** topics (Example: dmaap.source.topics=APPC-LCM-WRITE or dmaap.source.topics=APPC-CL) + +2. **sink** topics (Example: dmaap.sink.topics=APPC-LCM-READ or dmaap.sink.topics=APPC-CL) + +You can extract <comm> and <topic> from the following example: +Example: dmaap.sink.topics=APPC-LCM-READ + +1. <comm>=dmaap + +2. <topic>=APPC-LCM-READ + +The onset is a json file that contains the data to inject as the onset. The data contained depends on the use case. This is an example for the vFirewall usecase: .. code-block:: json - :caption: VoLTE_Sample_Onset + :caption: vFirewall_Sample_Onset { - "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b", - "closedLoopAlarmStart": 1484677482204798, - "closedLoopEventClient": "DCAE.HolmesInstance", + "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "microservice.stringmatcher", "closedLoopEventStatus": "ONSET", - "requestID": "97964e10-686e-4790-8c45-bdfa61df770f", - "target_type": "VM", - "target": "vserver.vserver-name", + "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", + "target_type": "VNF", + "target": "generic-vnf.vnf-name", "AAI": { "vserver.is-closed-loop-disabled": "false", - "vserver.vserver-name": "dfw1lb01lb01", - "service-instance.service-instance-id" : "vserver-name-16102016-aai3255-data-11-1", - "generic-vnf.vnf-id" : "vnf-id-16102016-aai3255-data-11-1", - "generic-vnf.vnf-name" : "vnf-name-16102016-aai3255-data-11-1" + "vserver.prov-status": "ACTIVE", + "generic-vnf.vnf-name": "fw0002vm002fw002", + "vserver.vserver-name": "OzVServer" }, "from": "DCAE", "version": "1.0.2" @@ -59,17 +102,44 @@ The topic being used is *unauthenticated.DCAE_CL_OUTPUT*, which is subject to ch Getting Information ------------------- -To get the name of the active controller(s), use: +To get the name(s) of the active controller(s), use: .. code-block:: bash curl --insecure --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/controllers | python -m json.tool -To check the facts currently in memory, use the following command. There should be 1 each of org.onap.policy.controlloop.PapParams and org.onap.policy.controlloop.Params per policy pushed. + # Example output when running PDP-D with Docker: + + policy@drools:/opt/app/policy/config$ echo $TELEMETRY_USER + + demo@people.osaaf.org + + policy@drools:/opt/app/policy/config$ echo $TELEMETRY_PASSWORD + + demo123456! + + policy@drools:/opt/app/policy/config$ curl --insecure --silent --user demo@people.osaaf.org:demo123456! -X GET https://localhost:9696/policy/pdp/engine/controllers | python -m json.tool + [ + "frankfurt", + "usecases" + ] + +To check the facts currently in working memory, use the following command. .. code-block:: bash - curl --insecure --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/controllers/<controllerName>/drools/facts/<artifactId> | python -m json.tool + curl --insecure --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/controllers/<controllerName>/drools/facts | python -m json.tool + + # Example output: + + policy@drools:/opt/app/policy/config$ curl --insecure --silent --user demo@people.osaaf.org:demo123456! -X GET https://localhost:9696/policy/pdp/engine/controllers/frankfurt/drools/facts/ | python -m json.tool + { + "frankfurt": 0 + } + policy@drools:/opt/app/policy/config$ curl --insecure --silent --user demo@people.osaaf.org:demo123456! -X GET https://localhost:9696/policy/pdp/engine/controllers/usecases/drools/facts/ | python -m json.tool + { + "usecases": 0 + } To get additional information about the controller, use: @@ -77,16 +147,193 @@ To get additional information about the controller, use: curl --insecure --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/controllers/<controllerName> | python -m json.tool + # Example output: + + policy@drools:/opt/app/policy/config$ curl --insecure --silent --user demo@people.osaaf.org:demo123456! -X GET https://localhost:9696/policy/pdp/engine/controllers/frankfurt/ | python -m json.tool + { + "alive": true, + "name": "frankfurt", + "topicSinks": [ + { + "effectiveTopic": "APPC-CL", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": true, + "topic": "APPC-CL", + "recentEvents": [], + "locked": false + }, + { + "effectiveTopic": "APPC-LCM-READ", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": true, + "topic": "APPC-LCM-READ", + "recentEvents": [], + "locked": false + }, + { + "effectiveTopic": "POLICY-CL-MGT", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": true, + "topic": "POLICY-CL-MGT", + "recentEvents": [], + "locked": false + }, + { + "effectiveTopic": "SDNR-CL", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": true, + "topic": "SDNR-CL", + "recentEvents": [], + "locked": false + }, + { + "effectiveTopic": "DCAE_CL_RSP", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": true, + "topic": "DCAE_CL_RSP", + "recentEvents": [], + "locked": false + } + ], + "drools": { + "sessions": [ + "frankfurt" + ], + "alive": true, + "brained": true, + "groupId": "org.onap.policy.drools-applications.controlloop.common", + "recentSourceEvents": [], + "version": "1.6.0", + "modelClassLoaderHash": -1185895883, + "baseDomainNames": [ + "onap.policies.controlloop.operational.common.Drools", + "onap.policies.controlloop.Operational" + ], + "artifactId": "controller-frankfurt", + "recentSinkEvents": [], + "sessionCoordinates": [ + "org.onap.policy.drools-applications.controlloop.common:controller-frankfurt:1.6.0:frankfurt" + ], + "locked": false + }, + "policyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Drools", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.Operational", + "version": "1.0.0" + } + ], + "locked": false, + "topicSources": [ + { + "effectiveTopic": "DCAE_TOPIC", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": false, + "topic": "DCAE_TOPIC", + "recentEvents": [], + "locked": false + }, + { + "effectiveTopic": "APPC-CL", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": false, + "topic": "APPC-CL", + "recentEvents": [], + "locked": false + }, + { + "effectiveTopic": "APPC-LCM-WRITE", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": false, + "topic": "APPC-LCM-WRITE", + "recentEvents": [], + "locked": false + }, + { + "effectiveTopic": "SDNR-CL-RSP", + "topicCommInfrastructure": "NOOP", + "servers": [ + "NOOP" + ], + "alive": false, + "topic": "SDNR-CL-RSP", + "recentEvents": [], + "locked": false + } + ] + } + +Within the telemetry subshell, it is easy to get information. Simply navigate to a specific directory using "cd". Use the "get" command to get information. This is a shorter alternatve to using the "curl" requests as shown above. + +To get information about the engine: + + .. image:: img/docker/getEngine.png + +To list the names of the active controllers: + + .. image:: img/docker/getControllers.png + +To get information about the specific "frankfurt" controller: + + .. image:: img/docker/getFrankfurt.png + +To get information about the PDP-D environment: + + .. image:: img/docker/getEnvironment.png + +To get a list of features that are currently enabled: + + .. image:: img/docker/getFeatures.png Simulators ^^^^^^^^^^ -Currently, there are 4 supported simulators: A&AI, SO, vFC, and guard. When they are up, they are accessed via localhost on the following ports: A&AI – 6666, SO – 6667, vFC – 6668, and guard – 6669. They all respond with hard-coded values representing their various success messages except for with certain inputs. For the A&AI simulator, if the value being queried with a “GET” query is “getFail” the simulator returns an exception message, if the value being queried in a “GET” query is “disableClosedLoop” the simulator returns a response with the value of “is-closed-loop-disabled” set to true, and if the value being queried in a named query is “error” the response from the simulator is A&AI’s failure message. The other simulator that can return multiple response is the guard simulator, and that returns a deny response if the closed loop control name passed in is “denyGuard” +Currently, there are 4 supported simulators: A&AI, SO, vFC, and guard. When they are up, they are accessed via localhost on the following ports: + +1. A&AI - localhost:6666 + +2. SO - localhost:6667 + +3. vFC - localhost:6668 + +4. guard - localhost:6669 + + +They all respond with hard-coded values representing their various success messages except for with certain inputs. For the A&AI simulator, if the value being queried with a “GET” query is “getFail” the simulator returns an exception message, if the value being queried in a “GET” query is “disableClosedLoop” the simulator returns a response with the value of “is-closed-loop-disabled” set to true, and if the value being queried in a named query is “error” the response from the simulator is A&AI’s failure message. + +The other simulator that can return multiple responses is the guard simulator, and that returns a deny response if the closed loop control name passed in is “denyGuard”. Using the Simulators -------------------- -To check the status of the simulators, run the command: "*features status*". If the feature controlloop-utils is enabled, the simulators are being used, otherwise, they are not. +To check the status of the simulators, run the command: "*policy status*". If the feature "controlloop-utils" is enabled, the simulators are being used, otherwise, they are not. **Turning on the simulators** @@ -99,24 +346,25 @@ To check the status of the simulators, run the command: "*features status*". If - First, make sure the controller is off by running the command “*policy stop*”. - Then turn the feature off with the command “*features disable controlloop-utils*”. - - Finally restart the controller by running “*policy start*”. + - Finally restart the controller by running “*policy start*”. - Run “*features status*” again and the *feature controlloop-utils* will be **disabled**. **For Junits** - For Junits, the package *org.onap.policy.simulators* is neeeded. In the Util class, there are four methods to start the four different simulators: *buildAaiSim()*, *buildSoSim()*, *buildVfcSim()*, and *buildGuardSim()*. Once the method is called, the simulator should be up and waiting to respond to requests. To bring down the simulators, call *HttpServletServer.factory.destroy()*. + For Junits, the package *org.onap.policy.simulators* is needed. In the Util class, there are six methods to start the six different simulators: *buildAaiSim()*, *buildSoSim()*, *buildVfcSim()*, *buildGuardSim()*, *buildSdnc()*, and *buildDmaap()*. Once the method is called, the simulator should be up and waiting to respond to requests. To bring down the simulators, call *HttpServletServer.factory.destroy()*. -Responses ---------- +Sample Responses +^^^^^^^^^^^^^^^^ -**A&AI** +A&AI +-------- .. code-block:: bash :caption: vnf-GET-response { - "vnf-id": vnfId, //vnfId will be the vnfId you query on. If you query on a vnfName, the id will be "error" if the name is "error", "5e49ca06-2972-4532-9ed4-6d071588d792" otherwise - "vnf-name": vnfName, //vnfName will be the vnfName you query on. If you query on a vnfId, the name will be "USUCP0PCOIL0110UJRT01" + "vnf-id": vnfId, // vnfId will be the vnfId you query on. If you query on a vnfName, the id will be "error" if the name is "error", "5e49ca06-2972-4532-9ed4-6d071588d792" otherwise + "vnf-name": vnfName, // vnfName will be the vnfName you query on. If you query on a vnfId, the name will be "USUCP0PCOIL0110UJRT01" "vnf-type": "RT", "service-id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4", "equipment-role": "UCPE", @@ -128,7 +376,7 @@ Responses "management-v6-address": "2001:1890:e00e:fffd::36", "in-maint": false, "prov-status":"ACTIVE", - "is-closed-loop-disabled": isDisabled, //isDisabled will be true if the vnf name/Id you query on is disableClosedLoop, false otherwise + "is-closed-loop-disabled": isDisabled, // isDisabled will be true if the vnf name/Id you query on is disableClosedLoop, false otherwise "resource-version": "1493389458092", "relationship-list": { "relationship": [{ @@ -174,7 +422,7 @@ Responses .. code-block:: bash :caption: vnf-GET-fail - //This is returned if you query on the value "getFail" + // This is returned if you query on the value "getFail" { "requestError": { "serviceException": { @@ -230,7 +478,7 @@ Responses .. code-block:: bash :caption: vserver-GET-error - //This is returned if you query on the value "getFail" + // This is returned if you query on the value "getFail" { "requestError": { "serviceException": { @@ -611,7 +859,8 @@ Responses } -**SO** +SO +------ .. code-block:: bash :caption: SO-response @@ -633,7 +882,8 @@ Responses -**vFC** +vFC +------- .. code-block:: bash :caption: vFC-POST-response @@ -671,7 +921,8 @@ Responses } -**GUARD** +GUARD +--------- .. code-block:: bash :caption: permit-response @@ -685,7 +936,7 @@ Responses .. code-block:: bash :caption: deny-response - //This is returned if the closed loop name is denyGuard + // This is returned if the closed loop name is denyGuard { "decision": "DENY", "details": "Decision Deny. You asked for it" diff --git a/docs/drools/droolsTutorialsIndex.rst b/docs/drools/droolsTutorialsIndex.rst index 008a821d..a1ccf844 100644 --- a/docs/drools/droolsTutorialsIndex.rst +++ b/docs/drools/droolsTutorialsIndex.rst @@ -8,11 +8,10 @@ PDP-D Tutorials .. toctree:: :maxdepth: 1 - clsimulation.rst - guardpdp.rst - modAAIdata.rst - modAmsterTemplate.rst - runningEclipse.rst + runningPDPD.rst + clsimulation.rst + guardpdp.rst + modAAIdata.rst tutorial_cl.rst tutorial_vCPE.rst tutorial_vDNS.rst diff --git a/docs/drools/guardpdp.rst b/docs/drools/guardpdp.rst index 797557fc..0fdb4ab2 100644 --- a/docs/drools/guardpdp.rst +++ b/docs/drools/guardpdp.rst @@ -3,23 +3,23 @@ .. http://creativecommons.org/licenses/by/4.0 ************************ -Using guard in the PDP-D +Using guard in the PDP-D ************************ .. contents:: :depth: 2 -This guide will help configure and test guard connection from PDP-D to PDP-X. This guide assumes that the PDP-D is installed and running policy properly with other properties being set properly. +This guide will help configure and test the guard connection from PDP-D (drools-pdp) to PDP-X (xacml-pdp). This guide assumes that the PDP-D is installed and running policy properly with other properties being set properly. Configuration -^^^^^^^^^^^^^ +^^^^^^^^^^^^^ Prerequisites ------------- Stop Policy, open, and verify the config: -- Stop policy with *policy stop* +- Stop policy with **policy stop** - Open *$POLICY_HOME/config/controlloop.properties.environment* - Make sure the *sql.db.host*, *sql.db.username* and *sql.db.password* are set correctly @@ -39,7 +39,7 @@ Guard Properties **guard.disabled** - For enabling / disabling guard functionality. - For example, to enable set it to false. - - When this is set to true, the previous two properties will be ignored. + - When this is set to true, the previous two properties (guard.url and guard.jdbc.url) will be ignored. - If guard is enabled, then the following PDP-X properties must also be set. @@ -63,16 +63,16 @@ For testing these properties before running policy, see Verification below. **pdpx.client.password** - Client password - Verification -^^^^^^^^^^^^ +^^^^^^^^^^^^ It is recommended to test using CLI tools before running since changing bash command parameters are faster than restarting policy. Logs Verification ----------------- -Checking the logs is straight forward. Check the *$POLICY_HOME/logs/error.log* file for the word "*callRESTfulPDP*" for any exceptions thrown. If they are thrown then there was a problem with the connection. -You can also check the *$POLICY_HOME/logs/network.log* file for the word "*Indeterminate*" which implies the connection failed or got a non 200 response code. +Checking the logs is straight forward. Check the **$POLICY_HOME/logs/error.log** file for the word "*callRESTfulPDP*" for any exceptions thrown. If they are thrown then there was a problem with the connection. +You can also check the **$POLICY_HOME/logs/network.log** file for the word "*Indeterminate*" which implies the connection failed or got a non 200 response code. + CLI Verification ---------------- @@ -80,29 +80,29 @@ CLI Verification It can be helpful to test the PDP-X connection using bash commands to make sure that the PDP-X properties are correct and the guard.url property is correct before running policy. **Method 1: httpie - CLI, cURL-like tool for humans** - + Using the http command we can make a request directly to PDP-X from the command line. Use the following form: .. code-block:: bash - + http POST pdp:8081/pdp/api/getDecision Authorization:<yourAuth> ClientAuth:<yourClientAuth> Environment:<environment> Content-Type:application/json < guard_request.json - + | where: | *<yourAuth>* is the string generated from user:pass converted to base64 encoding | (a conversion tool is available at https://www.base64encode.org/) | *<yourClientAuth>* is generated the same way but from the client user and pass. | *<environment>* is the context of the request. For example: TEST | *pdp* is the host of the PDP-X - + The guard_request.json should be in the form of the following: - + .. code-block:: json :caption: guard_request.json - + { "decisionAttributes": { "actor": "APPC", diff --git a/docs/drools/img/docker/credentials.png b/docs/drools/img/docker/credentials.png Binary files differnew file mode 100644 index 00000000..6fa68498 --- /dev/null +++ b/docs/drools/img/docker/credentials.png diff --git a/docs/drools/img/docker/dockerComposeDown.png b/docs/drools/img/docker/dockerComposeDown.png Binary files differnew file mode 100644 index 00000000..057a5197 --- /dev/null +++ b/docs/drools/img/docker/dockerComposeDown.png diff --git a/docs/drools/img/docker/dockerComposeUp.png b/docs/drools/img/docker/dockerComposeUp.png Binary files differnew file mode 100644 index 00000000..2bd73aa5 --- /dev/null +++ b/docs/drools/img/docker/dockerComposeUp.png diff --git a/docs/drools/img/docker/exampleTopics.png b/docs/drools/img/docker/exampleTopics.png Binary files differnew file mode 100644 index 00000000..17d0a559 --- /dev/null +++ b/docs/drools/img/docker/exampleTopics.png diff --git a/docs/drools/img/docker/getControllers.png b/docs/drools/img/docker/getControllers.png Binary files differnew file mode 100644 index 00000000..8d2065b0 --- /dev/null +++ b/docs/drools/img/docker/getControllers.png diff --git a/docs/drools/img/docker/getEngine.png b/docs/drools/img/docker/getEngine.png Binary files differnew file mode 100644 index 00000000..9811329a --- /dev/null +++ b/docs/drools/img/docker/getEngine.png diff --git a/docs/drools/img/docker/getEnvironment.png b/docs/drools/img/docker/getEnvironment.png Binary files differnew file mode 100644 index 00000000..0131505a --- /dev/null +++ b/docs/drools/img/docker/getEnvironment.png diff --git a/docs/drools/img/docker/getFeatures.png b/docs/drools/img/docker/getFeatures.png Binary files differnew file mode 100644 index 00000000..9d1239cd --- /dev/null +++ b/docs/drools/img/docker/getFeatures.png diff --git a/docs/drools/img/docker/getFrankfurt.png b/docs/drools/img/docker/getFrankfurt.png Binary files differnew file mode 100644 index 00000000..78df267d --- /dev/null +++ b/docs/drools/img/docker/getFrankfurt.png diff --git a/docs/drools/img/docker/policyStatus.png b/docs/drools/img/docker/policyStatus.png Binary files differnew file mode 100644 index 00000000..de8199bd --- /dev/null +++ b/docs/drools/img/docker/policyStatus.png diff --git a/docs/drools/img/docker/telemetryCmd.png b/docs/drools/img/docker/telemetryCmd.png Binary files differnew file mode 100644 index 00000000..7b1f358f --- /dev/null +++ b/docs/drools/img/docker/telemetryCmd.png diff --git a/docs/drools/img/docker/yamlClone.png b/docs/drools/img/docker/yamlClone.png Binary files differnew file mode 100644 index 00000000..ecf0f6e6 --- /dev/null +++ b/docs/drools/img/docker/yamlClone.png diff --git a/docs/drools/img/eclipse/consoleOutputExample.png b/docs/drools/img/eclipse/consoleOutputExample.png Binary files differnew file mode 100644 index 00000000..9dabb8b0 --- /dev/null +++ b/docs/drools/img/eclipse/consoleOutputExample.png diff --git a/docs/drools/img/eclipse/importMavenProject.png b/docs/drools/img/eclipse/importMavenProject.png Binary files differnew file mode 100644 index 00000000..1416b4c2 --- /dev/null +++ b/docs/drools/img/eclipse/importMavenProject.png diff --git a/docs/drools/img/eclipse/mainAppSelection.png b/docs/drools/img/eclipse/mainAppSelection.png Binary files differnew file mode 100644 index 00000000..f562bf6d --- /dev/null +++ b/docs/drools/img/eclipse/mainAppSelection.png diff --git a/docs/drools/img/eclipse/runAsJavaApp.png b/docs/drools/img/eclipse/runAsJavaApp.png Binary files differnew file mode 100644 index 00000000..e1f26186 --- /dev/null +++ b/docs/drools/img/eclipse/runAsJavaApp.png diff --git a/docs/drools/img/eclipse/selectDirectory.png b/docs/drools/img/eclipse/selectDirectory.png Binary files differnew file mode 100644 index 00000000..c1db03f7 --- /dev/null +++ b/docs/drools/img/eclipse/selectDirectory.png diff --git a/docs/drools/img/eclipse/selectProjectsToImport.png b/docs/drools/img/eclipse/selectProjectsToImport.png Binary files differnew file mode 100644 index 00000000..395fdb31 --- /dev/null +++ b/docs/drools/img/eclipse/selectProjectsToImport.png diff --git a/docs/drools/img/frankfurt_project_explorer.png b/docs/drools/img/frankfurt_project_explorer.png Binary files differnew file mode 100644 index 00000000..4c1cf13d --- /dev/null +++ b/docs/drools/img/frankfurt_project_explorer.png diff --git a/docs/drools/img/frankfurt_project_explorer2.png b/docs/drools/img/frankfurt_project_explorer2.png Binary files differnew file mode 100644 index 00000000..bee1f422 --- /dev/null +++ b/docs/drools/img/frankfurt_project_explorer2.png diff --git a/docs/drools/modAAIdata.rst b/docs/drools/modAAIdata.rst index 220d38f4..eef0d0c4 100644 --- a/docs/drools/modAAIdata.rst +++ b/docs/drools/modAAIdata.rst @@ -49,7 +49,10 @@ Follow these steps to get all of the vservers. This is useful to get a couple o curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -X GET https://aai.api.simpledemo.openecomp.org:8443/aai/v11/cloud-infrastructure/cloud-regions | python -m json.tool - Take note of all the cloud-owner/cloud-region combinations. In this example, there are 3 combinations: Skynet/CL-MR1, AMIST/AMCR1, and Rackspace/DFW. + Take note of all the cloud-owner/cloud-region combinations. In this example, there are 3 combinations: + 1. Skynet/CL-MR1 + 2. AMIST/AMCR1 + 3. Rackspace/DFW. .. image:: modAAI_getCloudRegions.png diff --git a/docs/drools/modAmsterTemplate.rst b/docs/drools/modTemplate.rst index 4456f292..1e02a0c8 100644 --- a/docs/drools/modAmsterTemplate.rst +++ b/docs/drools/modTemplate.rst @@ -9,11 +9,10 @@ Modifying the Release Template .. contents:: :depth: 3 - This tutorial is intended for Policy Drools Applications developers who would like to test their code using the PDP-D in Eclipse instead of installing in a lab. The example for this tutorial will walk through making a change to the Amsterdam Control Loop Template, building the archetype project, and instantiating a controller with the PDP-D. Installing the Archetype Project in Eclipse -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **STEP 1:** First, open the drools-pdp project in Eclipse and navigate to File → New → Project... @@ -39,7 +38,7 @@ Installing the Archetype Project in Eclipse .. image:: mat_add_local_catalog.JPG - **STEP 5.1.2:** Add the ONAP Staging repository archetype-catalog.xml with a description if desired. Click "OK" then "Apply", then "OK". + **STEP 5.1.2:** Add the ONAP Staging repository archetype-catalog.xml (https://nexus.onap.org/content/groups/staging/archetype-catalog.xml) with a description if desired. Click "OK" then "Apply", then "OK". .. image:: mat_nexus_catalog.JPG @@ -84,7 +83,9 @@ Installing the Archetype Project in Eclipse Modifying the Amsterdam Template -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +// TODO Modify for frankfurt **STEP 1:** Expand the amsterdam project and "src/main/resources". The drl generated from the archetype will be present as follows: diff --git a/docs/drools/runningEclipse.rst b/docs/drools/runningEclipse.rst index 136efe73..5123a540 100644 --- a/docs/drools/runningEclipse.rst +++ b/docs/drools/runningEclipse.rst @@ -3,7 +3,7 @@ .. http://creativecommons.org/licenses/by/4.0 ************************ -Running PDP-D in Eclipse +Running PDP-D in Eclipse ************************ .. contents:: @@ -12,10 +12,11 @@ Running PDP-D in Eclipse This tutorial is intended for developers who would like to run the PDP-D in an Eclipse environment. It is assumed that the drools-pdp git project has been imported in an Eclipse workspace. Starting the PDP-D -^^^^^^^^^^^^^^^^^^ -For the Amsterdam release, the project directory will look as follows assuming all drools-pdp projects were selected when importing. +^^^^^^^^^^^^^^^^^^ - .. image:: RunEcl_drools_pdp_project.png +For the Frankfurt release, the project directory will look as follows assuming all drools-pdp projects were selected when importing. + + .. image:: img/frankfurt_project_explorer2.png Right click on policy-management hover over "Run As" and select "Java Application" @@ -32,11 +33,11 @@ The PDP-D will start running; the console will display output. Interacting with the PDP-D ^^^^^^^^^^^^^^^^^^^^^^^^^^ -To interact with the PDP-D, the Telemetry API can be used. A simple GET on the engine will show that the PDP-D is running in Eclipse. +To interact with the PDP-D, the Telemetry API can be used. A simple GET on the engine will show that the PDP-D is running in Eclipse. Ensure you are using the correct username and password specified for your setup. .. code-block:: bash - curl -k --silent --user @1b3rt:31nst31n -X GET https://localhost:9696/policy/pdp/engine/ | python -m json.tool + curl -k --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/ | python -m json.tool .. image:: RunEcl_telemetry.png @@ -47,6 +48,8 @@ An HTTP 200 message for the GET request will also appear in the console in Eclip .. seealso:: To create a controller and run a control loop, refer to `Modifying the Release Template <modAmsterTemplate.html>`_. +.. seealso:: To use other telemetry commands to interact with the PDP-D, refer to `Getting Information <clsimulation.html#getting-information>`_. + End of Document diff --git a/docs/drools/runningPDPD.rst b/docs/drools/runningPDPD.rst new file mode 100644 index 00000000..0934c8c9 --- /dev/null +++ b/docs/drools/runningPDPD.rst @@ -0,0 +1,164 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +********************************************************** +Methods to run PDP-D +********************************************************** + +.. contents:: + :depth: 2 + +There are two methods you can use to run a PDP-D for testing purposes: + +1. Using Docker + +2. Using Eclipse + +Using Docker +^^^^^^^^^^^^ +**Step 1:** Clone the integration/csit repository. + +You can find the repo here: https://gerrit.onap.org/r/admin/repos/integration/csit. +Although this repository is used for CSIT testing, we can use this as a means to get a PDP-D up and running with docker. + + .. code-block:: bash + + git clone "https://gerrit.onap.org/r/integration/csit" + +**Step 2:** Note the "docker-compose" commands that will be used. + + .. code-block:: bash + + docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools-apps.yml up -d + + docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools-apps.yml down -v + +Note that ${WORKSPACE} refers to the local path where the csit repository is. + +**Step 3:** Edit the "docker-compose-drools-apps.yml" file. + +Take a look at the "csit/scripts/policy/docker-compose-drools-apps.yml" file. It should look similar to this: + + .. image:: img/docker/yamlClone.png + +The following changes need to be made based on which version you are running and your local setup. + + .. code-block:: bash + + ${POLICY_MARIADB_VER} should be "10.2.14" (without quotes, version subject to change) + + ${WORKSPACE} should be the absolute path to the cloned "csit" repository. + + ${POLICY_DROOLS_APPS_VERSION} should be "1.6.0" (without quotes, version subject to change). + +If you are using MacOS, you will also need to make the following changes: + + .. code-block:: bash + + expose: + - 6969 + - 9696 + + will need to be changed to: + + ports: + - "6969:6969" + - "9696:9696" + +**Step 4:** Start containers and interact with PDP-D. + + .. code-block:: bash + + docker-compose -f scripts/policy/docker-compose-drools-apps.yml up -d + docker container ls + docker exec -it drools bash + + .. image:: img/docker/dockerComposeUp.png + + .. code-block:: bash + + policy status + + .. image:: img/docker/policyStatus.png + + .. code-block:: bash + + # launches subshell where telemetry commands can be executed + telemetry + + ls + + cd controllers + + # Get the current controllers + get + + .. image:: img/docker/telemetryCmd.png + + .. code-block:: bash + + # Get information about the "frankfurt" controller + get frankfurt + + .. image:: img/docker/getFrankfurt.png + + + .. code-block:: bash + + docker-compose -f scripts/policy/docker-compose-drools-apps.yml down -v + + .. image:: img/docker/dockerComposeDown.png + +In the next section, you will see more about using telemetry commands and interacting with the PDP-D. + +Using Eclipse +^^^^^^^^^^^^^ + +**Step 1:** Clone 'drools-pdp' repository and create a new directory for eclipse workspace. + +Link to repository: https://gerrit.onap.org/r/admin/repos/policy/drools-pdp +For the purposes of this demo, we will create an new directory to use as a workspace for eclipse. + + .. code-block:: bash + + $ git clone "https://gerrit.onap.org/r/policy/drools-pdp" + Cloning into 'drools-pdp'... + remote: Counting objects: 59, done + remote: Finding sources: 100% (30/30) + remote: Total 14406 (delta 0), reused 14399 (delta 0) + Receiving objects: 100% (14406/14406), 3.23 MiB | 628.00 KiB/s, done. + Resolving deltas: 100% (6630/6630), done. + Checking out files: 100% (588/588), done. + + $ mkdir workspace-drools-pdp + + $ ls + drools-pdp/ workspace-drools-pdp/ + +The "drools-pdp/" directory contains the cloned repository and "workspace-drools-pdp/" is an empty directory. + +**Step 2:** Import "drools-pdp" as an existing maven project. + +Open Eclipse. Hit the **browse** button and navigate to the "workspace-drools-pdp/" directory. Select that folder as the workspace directory and hit **launch**. + + .. image:: img/eclipse/selectDirectory.png + +Select File -> Import -> Maven -> Existing Maven Projects -> Next + + .. image:: img/eclipse/importMavenProject.png + +Select **Browse** and navigate to the root directory of the cloned project. Hit **Select All** to make sure all projects are included and select **Finish**. + + .. image:: img/eclipse/selectProjectsToImport.png + +**Step 3:** Run "policy-management" as a java application + +All of the projects will appear in the package explorer after they finish importing. Right click on "policy-management", select "Run As", and select "Java Application". + + .. image:: img/eclipse/runAsJavaApp.png + +Type "main" and select the option "Main - org.onap.policy.drools.system" then hit **OK**. + + .. image:: img/eclipse/mainAppSelection.png + +If everything is successful, the PDP-D will start running and you will notice output displayed in the console. In the next section, you will see how to interact with the PDP-D using telemetry commands. diff --git a/docs/drools/tutorial_cl.rst b/docs/drools/tutorial_cl.rst index ee719cab..d7c2430c 100644 --- a/docs/drools/tutorial_cl.rst +++ b/docs/drools/tutorial_cl.rst @@ -101,7 +101,7 @@ Proceed with testing your new policy as described in the specific tutorials: • vDNS - `Tutorial: Testing the vDNS Use Case in a standalone PDP-D <tutorial_vDNS.html>`_ • vFW - `Tutorial: Testing the vFW flow in a standalone PDP-D <tutorial_vFW.html>`_ -.. seealso:: To deploy a control loop in Eclipse from the control loop archetype template, refer to `Modifying the Release Template <modAmsterTemplate.html>`_. +.. seealso:: `Methods to run PDP-D <runningPDPD.html>`_. End of Document diff --git a/docs/drools/tutorial_vCPE.rst b/docs/drools/tutorial_vCPE.rst index d22747ed..2bda592b 100644 --- a/docs/drools/tutorial_vCPE.rst +++ b/docs/drools/tutorial_vCPE.rst @@ -9,7 +9,6 @@ Tutorial: Testing the vCPE use case in a standalone PDP-D .. contents:: :depth: 3 - High Level Architecture ^^^^^^^^^^^^^^^^^^^^^^^ The vCPE flow begins with an onset message that is sent from DCAE notifying the PDP-D that an action needs to be taken on a VM/VNF. Once the PDP-D has inserted the onset into drools memory, rules begin to fire to start processing the onset for the vCPE policy that exists in drools memory. If the onset is not enriched with A&AI data, Policy will query A&AI for the VM/VNF data otherwise the PDP-D will get the A&AI data needed directly from the onset. A Guard query is then executed to determine if the action to be taken is allowed. If Guard returns a permit, the PDP-D will then send an APPC Restart recipe request to restart the VM/VNF specified in the request. If APPC is successful then the PDP-D will send a operation success notification on the POLICY-CL-MGT topic. The PDP-D waits for an abatement message to come from DCAE before ending the transaction. Once the abatement is received the PDP-D sends a final success notification and gracefully ends processing the event. diff --git a/docs/drools/tutorial_vFW.rst b/docs/drools/tutorial_vFW.rst index 02ebb7ad..fa21ec1d 100644 --- a/docs/drools/tutorial_vFW.rst +++ b/docs/drools/tutorial_vFW.rst @@ -9,7 +9,6 @@ Tutorial: Testing the vFW flow in a standalone PDP-D .. contents:: :depth: 3 - High Level Architecture ^^^^^^^^^^^^^^^^^^^^^^^ The vFW flow begins with an onset message that is sent from DCAE notifying the PDP-D that an action needs to be taken on a VNF. Once the PDP-D has inserted the onset into drools memory, rules begin to fire to start processing the onset for the vFW policy that exists in drools memory. If the onset is not enriched with A&AI data, Policy will query A&AI for the VNF data otherwise the PDP-D will get the A&AI data needed directly from the onset. Then an A&AI named query is executed on the source VNF entity from the onset to find the target VNF entity that the PDP-D will take action on. Once the target entity is retrieved from A&AI, a Guard query is executed to determine if the action to be taken is allowed. If Guard returns a permit, the PDP-D will then send an APPC ModifyConfig recipe request to modify pg-streams as specified in the request payload. If APPC is successful then the PDP-D will send a final success notification on the POLICY-CL-MGT topic and gracefully end processing the event. diff --git a/docs/index.rst b/docs/index.rst index 59b31831..5854403c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,4 +1,5 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. _master_index: .. _policy-framework-doc: diff --git a/docs/offeredapis.rst b/docs/offeredapis.rst index 8723570e..818b1f5c 100644 --- a/docs/offeredapis.rst +++ b/docs/offeredapis.rst @@ -1,5 +1,6 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 +.. _offeredapis: Policy Offered APIs diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 6dbcec0e..08dfe298 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -1,4 +1,5 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. _release_notes: Policy Release Notes ==================== @@ -12,6 +13,87 @@ Policy Release Notes .. * one section describing the purpose of this new release. .. * This note must be removed after content has been added. +.. =========================== +.. * * * FRANKFURT * * * +.. =========================== + +Abstract +======== + +This document provides the release notes for the Frankfurt release. + +Summary +======= + + +Release Data +============ + ++--------------------------------------+--------------------------------------+ +| **Policy Project** | | +| | | ++--------------------------------------+--------------------------------------+ +| **Docker images** | - policy-api 2.2.0 | +| | - policy-pap 2.2.0 | +| | - policy-drools-pdp 1.6.0 | +| | - policy-xacml-pdp 2.2.0 | +| | - policy-apex-pdp 2.3.0 | +| | - policy-distribution 2.3.0 | +| | - policy-pe 1.6.1 | +| | | ++--------------------------------------+--------------------------------------+ +| **Release designation** | 6.0.0 frankfurt | +| | | ++--------------------------------------+--------------------------------------+ +| **Release date** | 2020-05-07 (TBD) | +| | | ++--------------------------------------+--------------------------------------+ + + +New features +------------ + + + +Known Limitations, Issues and Workarounds +========================================= + +System Limitations +------------------ + + +Known Vulnerabilities +--------------------- + + +Workarounds +----------- + + +Security Notes +-------------- + + +References +========== + +For more information on the ONAP Frankfurt release, please see: + +#. `ONAP Home Page`_ +#. `ONAP Documentation`_ +#. `ONAP Release Downloads`_ +#. `ONAP Wiki Page`_ + + +.. _`ONAP Home Page`: https://www.onap.org +.. _`ONAP Wiki Page`: https://wiki.onap.org +.. _`ONAP Documentation`: https://docs.onap.org +.. _`ONAP Release Downloads`: https://git.onap.org + +Quick Links: + - `POLICY project page`_ + - `Passing Badge information for POLICY`_ + .. ========================== .. * * * EL ALTO * * * .. ========================== @@ -671,9 +753,9 @@ The Amsterdam release continued evolving the design driven architecture of and f - For vLBS Use Case, the following steps are required to setup the service instance: - Create a Service Instance via VID. - Create a VNF Instance via VID. - - Preload SDNC with topology data used for the actual VNF instantiation (both base and DNS scaling modules). NOTE: you may want to set “vlb_name_0” in the base VF module data to something unique. This is the vLB server name that DCAE will pass to Policy during closed loop. If the same name is used multiple times, the Policy name-query to AAI will show multiple entries, one for each occurrence of that vLB VM name in the OpenStack zone. Note that this is not a limitation, typically server names in a domain are supposed to be unique. - - Instantiate the base VF module (vLB, vPacketGen, and one vDNS) via VID. NOTE: The name of the VF module MUST start with ``Vfmodule_``. The same name MUST appear in the SDNC preload of the base VF module topology. We’ll relax this naming requirement for Beijing Release. - - Run heatbridge from the Robot VM using ``Vfmodule_`` … as stack name (it is the actual stack name in OpenStack) + - Preload SDNC with topology data used for the actual VNF instantiation (both base and DNS scaling modules). NOTE: you may want to set "vlb_name_0" in the base VF module data to something unique. This is the vLB server name that DCAE will pass to Policy during closed loop. If the same name is used multiple times, the Policy name-query to AAI will show multiple entries, one for each occurrence of that vLB VM name in the OpenStack zone. Note that this is not a limitation, typically server names in a domain are supposed to be unique. + - Instantiate the base VF module (vLB, vPacketGen, and one vDNS) via VID. NOTE: The name of the VF module MUST start with ``Vfmodule_``. The same name MUST appear in the SDNC preload of the base VF module topology. We'll relax this naming requirement for Beijing Release. + - Run heatbridge from the Robot VM using ``Vfmodule_`` _ as stack name (it is the actual stack name in OpenStack) - Populate AAI with a dummy VF module for vDNS scaling. **Security Issues** diff --git a/docs/xacml/decision.native.json b/docs/xacml/decision.native.json new file mode 100644 index 00000000..5e593bc9 --- /dev/null +++ b/docs/xacml/decision.native.json @@ -0,0 +1,41 @@ +{ + "Request": { + "ReturnPolicyIdList": false, + "CombinedDecision": false, + "AccessSubject": [ + { + "Attribute": [ + { + "IncludeInResult": false, + "AttributeId": "subject-id", + "Value": "Julius Hibbert" + } + ] + } + ], + "Resource": [ + { + "Attribute": [ + { + "IncludeInResult": false, + "AttributeId": "resource-id", + "Value": "http://medico.com/record/patient/BartSimpson", + "DataType": "anyURI" + } + ] + } + ], + "Action": [ + { + "Attribute": [ + { + "IncludeInResult": false, + "AttributeId": "action-id", + "Value": "read" + } + ] + } + ], + "Environment": [] + } +}
\ No newline at end of file diff --git a/docs/xacml/swagger.json b/docs/xacml/swagger.json index 49011964..0bb133b9 100644 --- a/docs/xacml/swagger.json +++ b/docs/xacml/swagger.json @@ -7,31 +7,92 @@ "x-component" : "Policy Framework", "x-planned-retirement-date" : "tbd" }, - "host" : "Pamelas-MBP-2.client.research.att.com:6969", + "host" : "policy-xacml-pdp:6969", "basePath" : "/", "tags" : [ { + "name" : "HealthCheck" + }, { "name" : "Decision" }, { "name" : "Statistics" - }, { - "name" : "HealthCheck" } ], "schemes" : [ "http", "https" ], "paths" : { - "/policy/pdpx/v1/decision" : { + "/policy/pdpx/v1/healthcheck" : { + "get" : { + "tags" : [ "HealthCheck" ], + "summary" : "Perform a system healthcheck", + "description" : "Provides healthy status of the Policy Xacml PDP component", + "operationId" : "healthcheck", + "consumes" : [ "application/json", "application/yaml" ], + "produces" : [ "application/json", "application/yaml" ], + "parameters" : [ { + "name" : "X-ONAP-RequestID", + "in" : "header", + "description" : "RequestID for http transaction", + "required" : false, + "type" : "string", + "format" : "uuid" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "headers" : { + "X-MinorVersion" : { + "type" : "string", + "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client" + }, + "X-PatchVersion" : { + "type" : "string", + "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request" + }, + "X-LatestVersion" : { + "type" : "string", + "description" : "Used only to communicate an API's latest version" + }, + "X-ONAP-RequestID" : { + "type" : "string", + "format" : "uuid", + "description" : "Used to track REST transactions for logging purpose" + } + }, + "schema" : { + "$ref" : "#/definitions/HealthCheckReport" + } + }, + "401" : { + "description" : "Authentication Error" + }, + "403" : { + "description" : "Authorization Error" + }, + "500" : { + "description" : "Internal Server Error" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "x-interface info" : { + "last-mod-release" : "Dublin", + "pdpx-version" : "1.0.0" + } + } + }, + "/policy/pdpx/v1/xacml" : { "post" : { "tags" : [ "Decision" ], "summary" : "Fetch the decision using specified decision parameters", "description" : "Returns the policy decision from Policy Xacml PDP", - "operationId" : "decision", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], + "operationId" : "xacml", + "consumes" : [ "application/xacml+json", "application/xacml+xml" ], + "produces" : [ "application/xacml+json", "application/xacml+xml" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { - "$ref" : "#/definitions/DecisionRequest" + "$ref" : "#/definitions/Request" } }, { "name" : "X-ONAP-RequestID", @@ -40,12 +101,6 @@ "required" : false, "type" : "string", "format" : "uuid" - }, { - "name" : "abbrev", - "in" : "query", - "description" : "Specifies whether the DCAE Monitoring decision results should be abbreviated", - "required" : false, - "type" : "boolean" } ], "responses" : { "200" : { @@ -70,7 +125,7 @@ } }, "schema" : { - "$ref" : "#/definitions/DecisionResponse" + "$ref" : "#/definitions/Response" } }, "400" : { @@ -93,7 +148,7 @@ "basicAuth" : [ ] } ], "x-interface info" : { - "last-mod-release" : "Dublin", + "last-mod-release" : "Frankfurt", "pdpx-version" : "1.0.0" } } @@ -104,8 +159,8 @@ "summary" : "Fetch current statistics", "description" : "Provides current statistics of the Policy Xacml PDP component", "operationId" : "statistics", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], + "consumes" : [ "application/json", "application/yaml" ], + "produces" : [ "application/json", "application/yaml" ], "parameters" : [ { "name" : "X-ONAP-RequestID", "in" : "header", @@ -159,15 +214,22 @@ } } }, - "/policy/pdpx/v1/healthcheck" : { - "get" : { - "tags" : [ "HealthCheck" ], - "summary" : "Perform a system healthcheck", - "description" : "Provides healthy status of the Policy Xacml PDP component", - "operationId" : "healthcheck", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], + "/policy/pdpx/v1/decision" : { + "post" : { + "tags" : [ "Decision" ], + "summary" : "Fetch the decision using specified decision parameters", + "description" : "Returns the policy decision from Policy Xacml PDP", + "operationId" : "decision", + "consumes" : [ "application/json", "application/yaml" ], + "produces" : [ "application/json", "application/yaml" ], "parameters" : [ { + "in" : "body", + "name" : "body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/DecisionRequest" + } + }, { "name" : "X-ONAP-RequestID", "in" : "header", "description" : "RequestID for http transaction", @@ -198,7 +260,13 @@ } }, "schema" : { - "$ref" : "#/definitions/HealthCheckReport" + "$ref" : "#/definitions/DecisionResponse" + } + }, + "400" : { + "description" : "Bad Request", + "schema" : { + "$ref" : "#/definitions/ErrorResponse" } }, "401" : { @@ -228,28 +296,286 @@ } }, "definitions" : { - "DecisionResponse" : { + "HealthCheckReport" : { "type" : "object", "properties" : { - "status" : { + "name" : { "type" : "string" }, - "advice" : { - "type" : "object", - "additionalProperties" : { - "type" : "object" + "url" : { + "type" : "string" + }, + "healthy" : { + "type" : "boolean" + }, + "code" : { + "type" : "integer", + "format" : "int32" + }, + "message" : { + "type" : "string" + } + } + }, + "Advice" : { + "type" : "object", + "properties" : { + "attributeAssignments" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/AttributeAssignment" + } + }, + "id" : { + "$ref" : "#/definitions/Identifier" + } + } + }, + "Attribute" : { + "type" : "object", + "properties" : { + "attributeId" : { + "$ref" : "#/definitions/Identifier" + }, + "values" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/AttributeValueObject" + } + }, + "category" : { + "$ref" : "#/definitions/Identifier" + }, + "issuer" : { + "type" : "string" + }, + "includeInResults" : { + "type" : "boolean" + } + } + }, + "AttributeAssignment" : { + "type" : "object", + "properties" : { + "attributeValue" : { + "$ref" : "#/definitions/AttributeValueObject" + }, + "attributeId" : { + "$ref" : "#/definitions/Identifier" + }, + "category" : { + "$ref" : "#/definitions/Identifier" + }, + "issuer" : { + "type" : "string" + }, + "dataTypeId" : { + "$ref" : "#/definitions/Identifier" + } + } + }, + "AttributeCategory" : { + "type" : "object", + "properties" : { + "category" : { + "$ref" : "#/definitions/Identifier" + }, + "attributes" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Attribute" + } + } + } + }, + "AttributeValue" : { + "type" : "object", + "properties" : { + "xpathCategory" : { + "$ref" : "#/definitions/Identifier" + }, + "dataTypeId" : { + "$ref" : "#/definitions/Identifier" + }, + "value" : { + "type" : "object" + } + } + }, + "AttributeValueObject" : { + "type" : "object", + "properties" : { + "xpathCategory" : { + "$ref" : "#/definitions/Identifier" + }, + "dataTypeId" : { + "$ref" : "#/definitions/Identifier" + }, + "value" : { + "type" : "object" + } + } + }, + "IdReference" : { + "type" : "object", + "properties" : { + "version" : { + "$ref" : "#/definitions/Version" + }, + "id" : { + "$ref" : "#/definitions/Identifier" + } + } + }, + "Identifier" : { + "type" : "object", + "properties" : { + "uri" : { + "type" : "string", + "format" : "uri" + } + } + }, + "MissingAttributeDetail" : { + "type" : "object", + "properties" : { + "attributeId" : { + "$ref" : "#/definitions/Identifier" + }, + "category" : { + "$ref" : "#/definitions/Identifier" + }, + "issuer" : { + "type" : "string" + }, + "attributeValues" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/AttributeValueObject" + } + }, + "dataTypeId" : { + "$ref" : "#/definitions/Identifier" + } + } + }, + "Obligation" : { + "type" : "object", + "properties" : { + "attributeAssignments" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/AttributeAssignment" + } + }, + "id" : { + "$ref" : "#/definitions/Identifier" + } + } + }, + "Response" : { + "type" : "object", + "properties" : { + "results" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Result" + } + } + } + }, + "Result" : { + "type" : "object", + "properties" : { + "status" : { + "$ref" : "#/definitions/Status" + }, + "decision" : { + "type" : "string", + "enum" : [ "PERMIT", "DENY", "INDETERMINATE", "INDETERMINATE_PERMIT", "INDETERMINATE_DENY", "INDETERMINATE_DENYPERMIT", "NOTAPPLICABLE" ] + }, + "associatedAdvice" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Advice" } }, "obligations" : { - "type" : "object", - "additionalProperties" : { - "type" : "object" + "type" : "array", + "items" : { + "$ref" : "#/definitions/Obligation" } }, - "policies" : { - "type" : "object", - "additionalProperties" : { - "type" : "object" + "policyIdentifiers" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/IdReference" + } + }, + "policySetIdentifiers" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/IdReference" + } + }, + "attributes" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/AttributeCategory" + } + } + } + }, + "Status" : { + "type" : "object", + "properties" : { + "statusCode" : { + "$ref" : "#/definitions/StatusCode" + }, + "statusMessage" : { + "type" : "string" + }, + "statusDetail" : { + "$ref" : "#/definitions/StatusDetail" + }, + "ok" : { + "type" : "boolean" + } + } + }, + "StatusCode" : { + "type" : "object", + "properties" : { + "statusCodeValue" : { + "$ref" : "#/definitions/Identifier" + }, + "child" : { + "$ref" : "#/definitions/StatusCode" + } + } + }, + "StatusDetail" : { + "type" : "object", + "properties" : { + "missingAttributeDetails" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/MissingAttributeDetail" + } + } + } + }, + "Version" : { + "type" : "object", + "properties" : { + "version" : { + "type" : "string" + }, + "versionDigits" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int32" } } } @@ -259,7 +585,7 @@ "properties" : { "responseCode" : { "type" : "string", - "enum" : [ "OK", "CREATED", "ACCEPTED", "NO_CONTENT", "RESET_CONTENT", "PARTIAL_CONTENT", "MOVED_PERMANENTLY", "FOUND", "SEE_OTHER", "NOT_MODIFIED", "USE_PROXY", "TEMPORARY_REDIRECT", "BAD_REQUEST", "UNAUTHORIZED", "PAYMENT_REQUIRED", "FORBIDDEN", "NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "PROXY_AUTHENTICATION_REQUIRED", "REQUEST_TIMEOUT", "CONFLICT", "GONE", "LENGTH_REQUIRED", "PRECONDITION_FAILED", "REQUEST_ENTITY_TOO_LARGE", "REQUEST_URI_TOO_LONG", "UNSUPPORTED_MEDIA_TYPE", "REQUESTED_RANGE_NOT_SATISFIABLE", "EXPECTATION_FAILED", "INTERNAL_SERVER_ERROR", "NOT_IMPLEMENTED", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT", "HTTP_VERSION_NOT_SUPPORTED" ] + "enum" : [ "OK", "CREATED", "ACCEPTED", "NO_CONTENT", "RESET_CONTENT", "PARTIAL_CONTENT", "MOVED_PERMANENTLY", "FOUND", "SEE_OTHER", "NOT_MODIFIED", "USE_PROXY", "TEMPORARY_REDIRECT", "BAD_REQUEST", "UNAUTHORIZED", "PAYMENT_REQUIRED", "FORBIDDEN", "NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "PROXY_AUTHENTICATION_REQUIRED", "REQUEST_TIMEOUT", "CONFLICT", "GONE", "LENGTH_REQUIRED", "PRECONDITION_FAILED", "REQUEST_ENTITY_TOO_LARGE", "REQUEST_URI_TOO_LONG", "UNSUPPORTED_MEDIA_TYPE", "REQUESTED_RANGE_NOT_SATISFIABLE", "EXPECTATION_FAILED", "PRECONDITION_REQUIRED", "TOO_MANY_REQUESTS", "REQUEST_HEADER_FIELDS_TOO_LARGE", "INTERNAL_SERVER_ERROR", "NOT_IMPLEMENTED", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT", "HTTP_VERSION_NOT_SUPPORTED", "NETWORK_AUTHENTICATION_REQUIRED" ] }, "errorMessage" : { "type" : "string" @@ -278,32 +604,408 @@ } } }, - "DecisionRequest" : { + "DOMConfiguration" : { "type" : "object", "properties" : { - "onapName" : { + "parameterNames" : { + "$ref" : "#/definitions/DOMStringList" + } + } + }, + "DOMImplementation" : { + "type" : "object" + }, + "DOMStringList" : { + "type" : "object", + "properties" : { + "length" : { + "type" : "integer", + "format" : "int32" + } + } + }, + "Document" : { + "type" : "object", + "properties" : { + "documentElement" : { + "$ref" : "#/definitions/Element" + }, + "xmlVersion" : { "type" : "string" }, - "onapComponent" : { + "strictErrorChecking" : { + "type" : "boolean" + }, + "documentURI" : { "type" : "string" }, - "onapInstance" : { + "xmlStandalone" : { + "type" : "boolean" + }, + "implementation" : { + "$ref" : "#/definitions/DOMImplementation" + }, + "doctype" : { + "$ref" : "#/definitions/DocumentType" + }, + "inputEncoding" : { "type" : "string" }, - "requestId" : { + "xmlEncoding" : { "type" : "string" }, - "action" : { + "domConfig" : { + "$ref" : "#/definitions/DOMConfiguration" + }, + "localName" : { "type" : "string" }, - "resource" : { - "type" : "object", - "additionalProperties" : { - "type" : "object" + "prefix" : { + "type" : "string" + }, + "nodeValue" : { + "type" : "string" + }, + "ownerDocument" : { + "$ref" : "#/definitions/Document" + }, + "nodeName" : { + "type" : "string" + }, + "childNodes" : { + "$ref" : "#/definitions/NodeList" + }, + "nodeType" : { + "type" : "integer", + "format" : "int32" + }, + "namespaceURI" : { + "type" : "string" + }, + "lastChild" : { + "$ref" : "#/definitions/Node" + }, + "parentNode" : { + "$ref" : "#/definitions/Node" + }, + "firstChild" : { + "$ref" : "#/definitions/Node" + }, + "nextSibling" : { + "$ref" : "#/definitions/Node" + }, + "previousSibling" : { + "$ref" : "#/definitions/Node" + }, + "baseURI" : { + "type" : "string" + }, + "textContent" : { + "type" : "string" + }, + "attributes" : { + "$ref" : "#/definitions/NamedNodeMap" + } + } + }, + "DocumentType" : { + "type" : "object", + "properties" : { + "entities" : { + "$ref" : "#/definitions/NamedNodeMap" + }, + "publicId" : { + "type" : "string" + }, + "systemId" : { + "type" : "string" + }, + "notations" : { + "$ref" : "#/definitions/NamedNodeMap" + }, + "internalSubset" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "localName" : { + "type" : "string" + }, + "prefix" : { + "type" : "string" + }, + "nodeValue" : { + "type" : "string" + }, + "ownerDocument" : { + "$ref" : "#/definitions/Document" + }, + "nodeName" : { + "type" : "string" + }, + "childNodes" : { + "$ref" : "#/definitions/NodeList" + }, + "nodeType" : { + "type" : "integer", + "format" : "int32" + }, + "namespaceURI" : { + "type" : "string" + }, + "lastChild" : { + "$ref" : "#/definitions/Node" + }, + "parentNode" : { + "$ref" : "#/definitions/Node" + }, + "firstChild" : { + "$ref" : "#/definitions/Node" + }, + "nextSibling" : { + "$ref" : "#/definitions/Node" + }, + "previousSibling" : { + "$ref" : "#/definitions/Node" + }, + "baseURI" : { + "type" : "string" + }, + "textContent" : { + "type" : "string" + }, + "attributes" : { + "$ref" : "#/definitions/NamedNodeMap" + } + } + }, + "Element" : { + "type" : "object", + "properties" : { + "tagName" : { + "type" : "string" + }, + "schemaTypeInfo" : { + "$ref" : "#/definitions/TypeInfo" + }, + "localName" : { + "type" : "string" + }, + "prefix" : { + "type" : "string" + }, + "nodeValue" : { + "type" : "string" + }, + "ownerDocument" : { + "$ref" : "#/definitions/Document" + }, + "nodeName" : { + "type" : "string" + }, + "childNodes" : { + "$ref" : "#/definitions/NodeList" + }, + "nodeType" : { + "type" : "integer", + "format" : "int32" + }, + "namespaceURI" : { + "type" : "string" + }, + "lastChild" : { + "$ref" : "#/definitions/Node" + }, + "parentNode" : { + "$ref" : "#/definitions/Node" + }, + "firstChild" : { + "$ref" : "#/definitions/Node" + }, + "nextSibling" : { + "$ref" : "#/definitions/Node" + }, + "previousSibling" : { + "$ref" : "#/definitions/Node" + }, + "baseURI" : { + "type" : "string" + }, + "textContent" : { + "type" : "string" + }, + "attributes" : { + "$ref" : "#/definitions/NamedNodeMap" + } + } + }, + "NamedNodeMap" : { + "type" : "object", + "properties" : { + "length" : { + "type" : "integer", + "format" : "int32" + } + } + }, + "Node" : { + "type" : "object", + "properties" : { + "localName" : { + "type" : "string" + }, + "prefix" : { + "type" : "string" + }, + "nodeValue" : { + "type" : "string" + }, + "ownerDocument" : { + "$ref" : "#/definitions/Document" + }, + "nodeName" : { + "type" : "string" + }, + "childNodes" : { + "$ref" : "#/definitions/NodeList" + }, + "nodeType" : { + "type" : "integer", + "format" : "int32" + }, + "namespaceURI" : { + "type" : "string" + }, + "lastChild" : { + "$ref" : "#/definitions/Node" + }, + "parentNode" : { + "$ref" : "#/definitions/Node" + }, + "firstChild" : { + "$ref" : "#/definitions/Node" + }, + "nextSibling" : { + "$ref" : "#/definitions/Node" + }, + "previousSibling" : { + "$ref" : "#/definitions/Node" + }, + "baseURI" : { + "type" : "string" + }, + "textContent" : { + "type" : "string" + }, + "attributes" : { + "$ref" : "#/definitions/NamedNodeMap" + } + } + }, + "NodeList" : { + "type" : "object", + "properties" : { + "length" : { + "type" : "integer", + "format" : "int32" + } + } + }, + "Request" : { + "type" : "object", + "properties" : { + "requestDefaults" : { + "$ref" : "#/definitions/RequestDefaults" + }, + "multiRequests" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/RequestReference" + } + }, + "status" : { + "$ref" : "#/definitions/Status" + }, + "requestAttributesIncludedInResult" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/AttributeCategory" + } + }, + "combinedDecision" : { + "type" : "boolean" + }, + "returnPolicyIdList" : { + "type" : "boolean" + }, + "requestAttributes" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/RequestAttributes" } } } }, + "RequestAttributes" : { + "type" : "object", + "properties" : { + "contentRoot" : { + "$ref" : "#/definitions/Node" + }, + "xmlId" : { + "type" : "string" + }, + "category" : { + "$ref" : "#/definitions/Identifier" + }, + "attributes" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Attribute" + } + } + } + }, + "RequestAttributesReference" : { + "type" : "object", + "properties" : { + "referenceId" : { + "type" : "string" + } + } + }, + "RequestDefaults" : { + "type" : "object", + "properties" : { + "xpathVersion" : { + "type" : "string", + "format" : "uri" + } + } + }, + "RequestReference" : { + "type" : "object", + "properties" : { + "attributesReferences" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/RequestAttributesReference" + } + } + } + }, + "TypeInfo" : { + "type" : "object", + "properties" : { + "typeNamespace" : { + "type" : "string" + }, + "typeName" : { + "type" : "string" + } + } + }, "StatisticsReport" : { "type" : "object", "properties" : { @@ -341,24 +1043,64 @@ } } }, - "HealthCheckReport" : { + "DecisionResponse" : { "type" : "object", "properties" : { - "name" : { + "status" : { "type" : "string" }, - "url" : { + "message" : { "type" : "string" }, - "healthy" : { - "type" : "boolean" + "advice" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } }, - "code" : { - "type" : "integer", - "format" : "int32" + "obligations" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } }, - "message" : { + "policies" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + } + } + }, + "DecisionRequest" : { + "type" : "object", + "properties" : { + "onapName" : { + "type" : "string" + }, + "onapComponent" : { + "type" : "string" + }, + "onapInstance" : { "type" : "string" + }, + "requestId" : { + "type" : "string" + }, + "context" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + }, + "action" : { + "type" : "string" + }, + "resource" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } } } } diff --git a/docs/xacml/xacml.rst b/docs/xacml/xacml.rst index 6d74ce6a..a034e8f9 100644 --- a/docs/xacml/xacml.rst +++ b/docs/xacml/xacml.rst @@ -13,7 +13,7 @@ The ONAP XACML Policy PDP Engine uses an `open source implementation <https://gi ONAP Supported Policy Types *************************** -In ONAP the following Policy Types are supported. Each Policy Type is implemented as an application that extends the **XacmlApplicationServiceProvider**. For details on each implementation, please refer to the `applications submodule of the onap/xacml-pdp project <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=tree;f=applications;h=047878fe14851d8a51998e065b8aca583ed8c994;hb=refs/heads/elalto>`__. +In ONAP the following Policy Types are supported. Each Policy Type is implemented as an application that extends the **XacmlApplicationServiceProvider**. For details on each implementation, please refer to the `applications submodule of the onap/xacml-pdp project <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=tree;f=applications;h=047878fe14851d8a51998e065b8aca583ed8c994;hb=refs/heads/master>`__. By cloning the policy/xacml-pdp repository, one can run the JUnit tests to get a better understanding on how applications are built using translators and the XACML Policies that are generated for each Policy Type. Each application supports one or more Policy Types and an associated "action" used by the Decision API when making these calls. @@ -27,7 +27,7 @@ These Policy Types are used by Control Loop DCAE microservice components to supp "onap.policies.monitoring.cdap.tca.hi.lo.app", "configure", "TCA DCAE microservice component" "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server", "configure", "REST Collector" -The translator used to translate these TOSCA Policy Types is the `StdCombinedPolicyResultsTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslator.java;h=2d7386d99f97ccee828b665a46b46531495cdfcd;hb=refs/heads/elalto>`__. +The translator used to translate these TOSCA Policy Types is the `StdCombinedPolicyResultsTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslator.java;h=2d7386d99f97ccee828b665a46b46531495cdfcd;hb=refs/heads/master>`__. This is an example Decision API payload made to retrieve a decision for a Monitoring Policy Type. @@ -45,7 +45,7 @@ These Policy Types are used by Control Loop Drools Engine to support guarding of "onap.policies.controlloop.guard.Blacklist", "guard", "Blacklists a regexp of VNF IDs" "onap.policies.controlloop.guard.MinMax", "guard", "For scaling, enforces a min/max number of VNFS" -The translator used to translate these legacy Policy Types is the `LegacyGuardTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java;h=2917aab26dfbcf805dd00fead66ef68439561a11;hb=refs/heads/elalto>`__ which implements a more fine grained approach to translating the properties into a XACML policy. +The translator used to translate these legacy Policy Types is the `LegacyGuardTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java;h=2917aab26dfbcf805dd00fead66ef68439561a11;hb=refs/heads/master>`__ which implements a more fine grained approach to translating the properties into a XACML policy. This is an example Decision API payload made to retrieve a decision for a Guard Policy Type. @@ -62,7 +62,7 @@ These Policy Types are similar to the guard Policy Types and are called by the C "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", "guard", "Gives priority to one control loop vs another" -The translator used to translate the coordination Policy Types is the `CoordinationGuardTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java;h=41c1428e3da4cc5b6c1bb091d0c16a6618a036ae;hb=refs/heads/elalto>`__ which uses a XACML Policy Template in its implementation. For example, when a new policy is loaded the translator copies the template to a new policy and replaces the CONTROL_LOOP_ONE and CONTROL_LOOP_TWO values with the specified control loops. See the `XAMCL Coordination Template for more details <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/resources/coordination/function/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.xml;h=bea05f264be5e422eb2da448d40057f736b7555c;hb=refs/heads/elalto>`__. +The translator used to translate the coordination Policy Types is the `CoordinationGuardTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java;h=41c1428e3da4cc5b6c1bb091d0c16a6618a036ae;hb=refs/heads/master>`__ which uses a XACML Policy Template in its implementation. For example, when a new policy is loaded the translator copies the template to a new policy and replaces the CONTROL_LOOP_ONE and CONTROL_LOOP_TWO values with the specified control loops. See the `XAMCL Coordination Template for more details <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/guard/src/main/resources/coordination/function/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.xml;h=bea05f264be5e422eb2da448d40057f736b7555c;hb=refs/heads/master>`__. The same Decision API payload example for guard applies to this Policy Type. @@ -84,13 +84,31 @@ These Policy Types are designed to be used by the OOF Project support placement "onap.policies.optimization.Vim_fit", "optimize" "onap.policies.optimization.VnfPolicy", "optimize" -The translator used to translate the optimization Policy Types is the `StdMatchableTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java;h=dd44af7aa4ab2ef70b216f8a3a6a02c6f1fddf56;hb=refs/heads/elalto>`__. +The translator used to translate the optimization Policy Types is the `StdMatchableTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java;h=dd44af7aa4ab2ef70b216f8a3a6a02c6f1fddf56;hb=refs/heads/master>`__. This is an example Decision API payload made to retrieve a decision for an Optimization Policy Type. .. literalinclude:: decision.affinity.json :language: JSON +Native XACML Policy Type +======================= +This Policy type is used by any client or ONAP component who has the need of native XACML evaluation. A native XACML policy or policy set encoded in XML can be created off this policy type and loaded into the XACML PDP engine by invoking the PAP policy deployment API. Native XACML requests encoded in either JSON or XML can be sent to the XACML PDP engine for evaluation by invoking the native decision API. Native XACML responses will be returned upon evaluating the requests against the matching XACML policies. Those native XACML policies, policy sets, requests and responses all follow the `OASIS XACML 3.0 Standard <https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml>`__. + +.. csv-table:: + :header: "Policy Type", "Action", "Description" + + "onap.policies.native.Xacml", "native", "any client or ONAP component" + +The translator used to translate the aforementioned TOSCA Policy Type is the `NativePdpApplicationTranslator <https://gerrit.onap.org/r/gitweb?p=policy/xacml-pdp.git;a=blob;f=applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java;h=5ce25facdbcab5e862c57bc67d7e2b7617eeb075;hb=HEAD>`__. + +According to the XACML 3.0 specification, two content-types are supported and used to present the native requests/responses. They are formally defined as "application/xacml+json" and "application/xacml+xml". + +This is an example Native Decision API payload made to retrieve a decision for whether Julius Hibbert can read http://medico.com/record/patient/BartSimpson. + +.. literalinclude:: decision.native.json + :language: JSON + Supporting Custom Policy Types ****************************** In order to support your own custom Policy Type that the XACML PDP Engine can support, one needs to build a Java service application that extends the **XacmlApplicationServiceProvider** interface and implement a **ToscaTranslator** application. Your application should register itself as a Java service application and expose it in the classpath used to be loaded into the ONAP XACML PDP Engine. Ensure you define and create the TOSCA Policy Type according to these :ref:`Policy Design and Development <design-label>`. You should be able to load your custom Policy Type using the :ref:`Policy Lifecycle API <api-label>`. Once successful, you should be able to start creating policies from your custom Policy Type. |