Hi Manoj,

You can design your policy using either approach. Its actually more down to the 
way that your policy is triggered. If you have a single event coming in for all 
policy instances, then I would use an initial state to determine the policy 
instance. As each event is handled in a separate thread, taking this approach 
would in effect give you an instance policy. You can then have a catch-all 
"global" policy at the end to handle cases where the instance policy does not 
handle a case.

It's all down to the domain/use case you want to implement, that will drive 
your policy design.

Best Regards
Liam

On 06/12/2019 09:16, Manoj K Nair wrote:
Hi Liam,

Thanks for the clarifications. I have a follow up question on the best practice 
for creating Apex policy instance -  a) Apex Policy instance is created per 
service instance for a service type (each policy instance is dedicated to 
receiving events for a particular service instance, i.e. 1:1 relation with 
service instance) b) Apex policy instance created for a particular service type 
(single policy instance for multiple service instances belonging to a service 
type , i.e. 1:1 with service type, 1:n with service instance ).  I guess 
currently in ONAP the latter approach is followed.

Is it possible to create a Global policy along with per instance policies - 
i.e. policy instance per service instance level as well as global policy 
instance for service type. The typical use case may be to create a fallback 
policy , i.e. if a service instance level policy succeeds/fails it can be 
verified at the global policy level for the service type.

Regards

Manoj

From: Liam Fallon [mailto:[email protected]]
Sent: Thursday, November 28, 2019 9:01 PM
To: Manoj K Nair 
<[email protected]><mailto:[email protected]>; DRAGOSH, 
PAMELA L (PAM) <[email protected]><mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: Loading Multiple Policy Models in Policy Apex


[External Email]

________________________________

Hi Manoj,

Please see my answers inline as well.

Best Regards
Liam
On 25/10/2019 14:33, Manoj K Nair wrote:
Hi Liam ,

Thanks for the clarification. Please see my comments/questions inline.

Thanks

Manoj

From: Liam Fallon [mailto:[email protected]]
Sent: Friday, October 25, 2019 4:17 PM
To: Manoj K Nair 
<[email protected]><mailto:[email protected]>; DRAGOSH, 
PAMELA L (PAM) <[email protected]><mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: Loading Multiple Policy Models in Policy Apex


[External Email]

________________________________

Hi Manoj,

Just to answer your two questions.

1) In the versions of of apex-pdp up to El Alto, you load noe model at a time. 
You can combine as many policies as you like into the policy model at design 
time. You can load and upgrade the policy model at run time without restarting 
the pdp. Note that we are upgrading apex-pdp in Frankfurt to allow multiple 
models to be loaded at run time, see https://jira.onap.org/browse/POLICY-1626
<MKN> You mean aggregate as many policies through the Design tools in a single 
file , export that json and load that into PDP (through policyFileName config 
parameter ) ? Is this the current approach supported as of El-Alto ?
<Liam>Yes</Liam>


2) A policy model is not mandatory to start an apex-pdp. When you start an 
apex-pdp without a model, the pdp starts and emains in passive state waiting 
for a model to be loaded into it by the PAP. You use the PAP to load the model 
or upgrade an existing model into the pdp at run time.

If you run apex in standalone mode, then you can achieve the same result over 
the apex standalone administration port and use the apex standalone client to 
download policy models into apex-pdps. In this approach, you point the client 
at each apex-pdp individually, so you must manage each pdp separately, you need 
to use the full policy framework if you want to have integrated management of 
apex-pdps. Note that this port that the standalone client uses is not exposed 
in Docker/Kubernetes in the ONAP standard build, so you need to expose that 
port if you are running apex-pdp using Docker/Kubernetes. If you use apex-pdp 
standalone from the tarball, then the port is of course available.


<MKN> Here by client , you mean the CLI or REST-Editor ? And administrative 
port is the one which the PDP is listening on (deploymentPort under 
engineServiceParameters)? In Rest-Editor I did not see an option to download 
the model to apex-PDP, but only support to be downloaded to local system where 
browser is running. Is there any REST API for loading the model at runtime 
without restarting ? I mean at the Apex PDP level ?  For the CLI Editor 
(documentation 
here<https://ericsson.github.io/apex-docs/user-manual/engine-apps/um-engapps-cli-editor.html>)
 I saw two options – model-props-file and input-model-file, but could not find 
any option to point to the engine port to load the model.
<Liam>The deployment client is used to deploy policies using the administrative 
port. See:
https://onap.readthedocs.io/en/latest/submodules/policy/parent.git/docs/apex/APEX-User-Manual.html#the-apex-deployment-client
The apex monitoring client can then be used to monitor policy execution.
https://onap.readthedocs.io/en/latest/submodules/policy/parent.git/docs/apex/APEX-User-Manual.html#the-apex-monitoring-client
We are extending monitoring support to all pdp type in Frankfurt, see the epic 
below for details on that.
https://jira.onap.org/browse/POLICY-2025

So, you create your policies in either the REST editor or CLI editor and 
package your policies into a policy model json file. You then load that model 
into a running apex-pdp engine using the deployment client and then monitor the 
running policies using the monitoring client.

Note that since Dublin the recommended way to deploy your policy model using 
the Dublin Policy Framework architecture and deployment is fully supported that 
way for apex-pdp policy models.

</Liam>


I note your JIRA https://jira.onap.org/browse/POLICY-2186 about this, I'll 
answer that JIRA later today.

Best Regards
Liam


On 25/10/2019 02:48, Manoj K Nair wrote:
Hi Policy team,

We are following the Apex PDP examples 
here<https://ericsson.github.io/apex-docs/user-manual/my-first-policy/um-mfp-01-introduction.html>
 and 
here<https://docs.onap.org/en/dublin/submodules/policy/apex-pdp.git/docs/APEX-User-Manual.html#apex-configurations-explained>
 , all the examples have separate config files to start the engine with single 
dedicated models. Does it mean that we need to start separate engines for each 
model ?   We also noted in documentation that policy model is not mandatory in 
the configuration. How can we start Apex PDP with multiple default models ? Or 
is there any way we can load models to engine during runtime ? Note that we are 
testing Policy Apex in standalone mode so not leveraging currently the Policy 
framework capabilities.

Regards

Manoj



________________________________
The information transmitted herein is intended only for the person or entity to 
which it is addressed and may contain confidential, proprietary and/or 
privileged material. Any review, retransmission, dissemination or other use of, 
or taking of any action in reliance upon, this information by persons or 
entities other than the intended recipient is prohibited. If you received this 
in error, please contact the sender and delete the material from any computer.




________________________________
The information transmitted herein is intended only for the person or entity to 
which it is addressed and may contain confidential, proprietary and/or 
privileged material. Any review, retransmission, dissemination or other use of, 
or taking of any action in reliance upon, this information by persons or 
entities other than the intended recipient is prohibited. If you received this 
in error, please contact the sender and delete the material from any computer.




________________________________
The information transmitted herein is intended only for the person or entity to 
which it is addressed and may contain confidential, proprietary and/or 
privileged material. Any review, retransmission, dissemination or other use of, 
or taking of any action in reliance upon, this information by persons or 
entities other than the intended recipient is prohibited. If you received this 
in error, please contact the sender and delete the material from any computer.


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#19629): https://lists.onap.org/g/onap-discuss/message/19629
Mute This Topic: https://lists.onap.org/mt/37474116/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to