policy/models.git
4 years agoMerge "Add/Update test cases for PdpStatistics entity"
Pamela Dragosh [Mon, 17 Feb 2020 16:47:37 +0000 (16:47 +0000)]
Merge "Add/Update test cases for PdpStatistics entity"

4 years agoAdd missing entry_schema for operational policy type 30/101630/8
Pamela Dragosh [Wed, 12 Feb 2020 16:35:07 +0000 (11:35 -0500)]
Add missing entry_schema for operational policy type

Also ensure the json for vFirewall matches the yaml. We will
need to clean up some of the other legacy operational policies.
Or at least rename them.

Renamed legacy Operational policies to avoid confusion.

Fixed wrong derived_from policy types.

Operational Policy Types are now solely for new TOSCA compliant
operational policy types.

Issue-ID: POLICY-2146
Change-Id: Ia0bcabe6cca8e197f1bec8157a3004a420033969
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoAdd/Update test cases for PdpStatistics entity 34/101734/2
huaxing [Thu, 13 Feb 2020 03:40:35 +0000 (11:40 +0800)]
Add/Update test cases for PdpStatistics entity

Add test cases for PdpStatistics / PdpEngineWorkerStatistics / JpaPdpStatistics.
Add lombok.Data annotation to PdpStatistics and
PdpEngineWorkerStatistics to facilitate testing.

Issue-ID: POLICY-1628

Signed-off-by: huaxing <huaxing.jin@est.tech>
Change-Id: I4269678641716a56db260ad67a30c97b904123cd

4 years agoFix return building on policy get 99/101799/1
liamfallon [Mon, 17 Feb 2020 00:51:13 +0000 (00:51 +0000)]
Fix return building on policy get

The service template that is being returned for the "get" has to be built
up in the correct order. A policy and the policy types and data types it
is referencing must be added together. Before, all the policies were added
at once and then the policy types and data types for the policies were added
afterwards. This means that if the service template is validated during
the service template build, validation may fail, depending on the order
of building of the template.

Issue-ID: POLICY-1402
Change-Id: Ia4fb9ee3819dccfc8c346c682545b2d27ebc4058
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Fix return codes and policy get"
Pamela Dragosh [Fri, 14 Feb 2020 17:53:13 +0000 (17:53 +0000)]
Merge "Fix return codes and policy get"

4 years agoFix return codes and policy get 50/101750/1
liamfallon [Fri, 14 Feb 2020 15:53:50 +0000 (15:53 +0000)]
Fix return codes and policy get

Change the return codes for validation to return more helpful and
correct codes.

Fix the policy "get" request to get policy types and data types for a
policy get.

Issue-ID: POLICY-1402
Change-Id: I89d67f830e9a75bdeef39c4142523c718879f19c
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoAdd Topic Actor superclasses 14/101714/3
Jim Hahn [Thu, 13 Feb 2020 17:34:46 +0000 (12:34 -0500)]
Add Topic Actor superclasses

Issue-ID: POLICY-2363
Change-Id: I5d29d85f6c5f40fb6c8f1bf678d9c718760a7558
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Add A&AI actor and some operators"
Jim Hahn [Thu, 13 Feb 2020 17:16:10 +0000 (17:16 +0000)]
Merge "Add A&AI actor and some operators"

4 years agoUpdate models-tosca for hetter handling 74/101674/1
liamfallon [Thu, 13 Feb 2020 13:05:09 +0000 (13:05 +0000)]
Update models-tosca for hetter handling

More additions, updates, and fixes for TOSCA service template handling.
Better handling of 404 not found on list requests.

Issue-ID: POLICY-1402
Change-Id: Id73b9a3cebb5445d4f05ae83e301330ee38a6598
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoAdd A&AI actor and some operators 35/101635/3
Jim Hahn [Wed, 12 Feb 2020 18:01:57 +0000 (13:01 -0500)]
Add A&AI actor and some operators

Added A&AI Actor, as well as operators for the "custom query" and
the "tenant" query (on which the custom query depends).

Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ic9dadc07a6057cb1abb9698da86eb9431fc9ed3e

4 years agoMerge "Implement validation and hierarchical get"
Pamela Dragosh [Wed, 12 Feb 2020 19:27:42 +0000 (19:27 +0000)]
Merge "Implement validation and hierarchical get"

4 years agoImplement validation and hierarchical get 44/101544/4
liamfallon [Tue, 11 Feb 2020 16:18:32 +0000 (16:18 +0000)]
Implement validation and hierarchical get

NOTE: This review will require changes to the persistence.xml file in
other policy framework components.

This change brings in two changes:

1) Validation of the references betwen policies, policy types, and data
types

This change mans that additions to and changes to policies, policy
types, and data types must be structurally correct in the change coming
in and with whatever is already in the database

2) Hierarchical return of referenced entitites on policy types,
policies and data types.

When a policy, policy type, or data type is read from the database, the
entities referenced byt the returned policy, policy type, or data type
are returned as well.

Tests are amended for the stricter validation and structure.

Examples are corrected where they are incorrect.

Issue-ID: POLICY-1402
Change-Id: Ie6a4cb7ed336562338924079114df405f0ab889f
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoAdd more code to facilitate actor implementation 02/101502/4
Jim Hahn [Sat, 8 Feb 2020 13:32:59 +0000 (08:32 -0500)]
Add more code to facilitate actor implementation

Added obtain() to Context
Added startGuardAsync(), in anticipation of adding guards.
Moved logRestXxx() from Util to HttpOperation.
Added actor.test to facilitate testing of actors.
Changed timeoutSec from long to int in various places.
Made a couple of methods public to support junit testing.

Most of the methods required Params to be passed, which indicated a
design issue.  Split Operator and Operation so that the Params could
be kept in a field and thus need not be passed to every method.
Basically, renamed OperatorPartial.java to OperationPartial.java and
created a new OperatorPartial.java.  Of course, this makes it look to
gerrit like it's all new code, when in fact, most of it is unchanged,
other than removing the Params argument to the method calls.  That
accounts for about half of the "lines changed" count.

Issue-ID: POLICY-1625
Change-Id: I9e98c9dadcbed145bf84deb06c9db1c864a3c24a
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoGet the tree of parent entities for an entity in a container 85/101485/1
liamfallon [Mon, 10 Feb 2020 15:23:33 +0000 (15:23 +0000)]
Get the tree of parent entities for an entity in a container

Utilityu method to filter out all bit an entity and its parents from a
service template entity container.

Issue-ID: POLICY-1402
Change-Id: I8c3b4c21b27fd8787cdfde0e1b726646f52c437b
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Add data type and policy type reference checking"
Jim Hahn [Mon, 10 Feb 2020 12:31:03 +0000 (12:31 +0000)]
Merge "Add data type and policy type reference checking"

4 years agoClean up and enhancement of Actor re-design 59/101359/2
Jim Hahn [Fri, 7 Feb 2020 02:48:12 +0000 (21:48 -0500)]
Clean up and enhancement of Actor re-design

Added junits for the remaining code.

Enhancements to facilitate implementation of Operators:
- Added allOf(), anyOf() facilities
- Added AsyncResponseHandler for handling asynchronous I/O via the
  HttpClient
- Added logRestRequest() and logRestResponse() for logging REST
  requests and responses
- Added HttpActor and HttpOperator, which can be used as superclasses
- Added doTask()
- Lifted data from the event into ControlLoopEventContext

Updates per previous review comments:
- Changed logException() to runFunction().
- Removed the aaiCqResponse field.
- Lifted fields from Policy into ControlLoopOperationParams, eliminating
  the need to include Policy in the class.

OperatorPartial depends on the string values in the ControlLoopOperation
being set to one of the string values of PolicyResult.  Instead of
passing ControlLoopOperation around, the operators should pass around
an object that uses PolicyResult directly, rather than depending on
the string values being set correctly.  Created OperationOutcome for
this purpose.
Stop pipeline when the controller completes.
Use whenComplete() where appropriate.
startOperationAsync() should not block.  Modified it to launch the task
in the background via its own thread.
Extracted CallbackManager into its own file.
Replaced actor setOperators() with addOperator()
Renamed add() to wrap(), and modified it to remove the future when it
completes.
Fixed the signature on delayedRemove() and delayedComplete().
Replaced xxxAsync() calls with just xxx() calls, where appropriate to
avoid the extra overhead of submitting it to a work queue.
Renamed handleFailure() to handlePreprocessorFailure().
Updates per WIP review comments

Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Id4c4c7ade979bdb76cc54266837609cc69a22c58

4 years agoMerge "Change recipe to operation to match type"
Ram Krishna Verma [Fri, 7 Feb 2020 18:06:42 +0000 (18:06 +0000)]
Merge "Change recipe to operation to match type"

4 years agoAdd data type and policy type reference checking 74/101374/1
liamfallon [Thu, 6 Feb 2020 17:32:48 +0000 (17:32 +0000)]
Add data type and policy type reference checking

Full validation including references to policy types and data types
added. Unit tests fixed to cope with new stricter validation.

Issue-ID: POLICY-1402
Change-Id: I59f37640a99494a53960a54d2fc82cc96861d43b
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoChange recipe to operation to match type 84/101284/2
jhh [Thu, 6 Feb 2020 21:03:54 +0000 (15:03 -0600)]
Change recipe to operation to match type

Issue-ID: POLICY-2345
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I4a79459cf7dfdccd7d9d88ec983afb6bce746493
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Actor redesign."
Jim Hahn [Thu, 6 Feb 2020 18:55:49 +0000 (18:55 +0000)]
Merge "Actor redesign."

4 years agoAdd vaidation for entity hierarchies 25/101125/2
liamfallon [Tue, 4 Feb 2020 15:45:58 +0000 (15:45 +0000)]
Add vaidation for entity hierarchies

This change brings in proper hierarchical checks for service templates,
making sure that all parents of data types, policy types, and policies
must be in place.

Issue-ID: POLICY-1402
Change-Id: I61b1b556403f74aeaa092f0d4d6ed19bf6a0b715
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Add merge utility for service templates"
Ram Krishna Verma [Tue, 4 Feb 2020 15:40:22 +0000 (15:40 +0000)]
Merge "Add merge utility for service templates"

4 years agoAdd merge utility for service templates 53/101053/6
liamfallon [Mon, 3 Feb 2020 14:37:33 +0000 (14:37 +0000)]
Add merge utility for service templates

This utility function allows a TOSCA service template fragment to be
merged with an exsiting service template and will be tbe backbone of
"create" methods on the API from now on.

Issue-ID: POLICY-1402
Change-Id: I3381cb2a1bd30621a639dedc213c546eeb2bf9aa
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoActor redesign. 67/101067/4
Jim Hahn [Thu, 23 Jan 2020 23:56:40 +0000 (18:56 -0500)]
Actor redesign.

Left original code intact so that it can continue to be used until
everything has been converted to use the new approach.  Simply added
new methods and classes.  (A few minor edits were required to the old
code, e.g., added constructors to the Actor implementations).  Code
to be removed is annotated with "TODO".

This only contains one revised actor, SDNC.  This actor combines code
from actor.sdnc, sdnc, and drools-applications.

Coverage tests are incomplete, but I anticipate some simplification
to this design in a couple of days; coverage will be added at that
time.

Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I4b75730e3621a9ee026ad10e557abe92df10dcf4

4 years agoMerge "name + consistent case in drools policies"
Pamela Dragosh [Mon, 3 Feb 2020 15:16:46 +0000 (15:16 +0000)]
Merge "name + consistent case in drools policies"

4 years agoDesign Operational Policy Type for Apex 48/101048/2
a.sreekumar [Fri, 31 Jan 2020 14:30:29 +0000 (14:30 +0000)]
Design Operational Policy Type for Apex

Design the TOSCA Policy Type for operational policy supported by Apex
so that CLAMP can select this policy type for control loops that are designed to use Apex.

Change-Id: I50099a47d5314fa42e353856715adaaa20352a96
Issue-ID: POLICY-2147
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoname + consistent case in drools policies 80/100980/3
jhh [Fri, 31 Jan 2020 14:50:57 +0000 (08:50 -0600)]
name + consistent case in drools policies

Issue-ID: POLICY-2345
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ibf54e6bac3d53daf0e23256ff0c2e8108b82cd9f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Add service template persistence provider"
Jorge Hernandez [Tue, 28 Jan 2020 16:35:34 +0000 (16:35 +0000)]
Merge "Add service template persistence provider"

4 years agoAdd service template persistence provider 38/100838/4
liamfallon [Tue, 28 Jan 2020 00:33:25 +0000 (19:33 -0500)]
Add service template persistence provider

Persistence needs to be carried out at service template level in order
to guarantee consistency of the service template in the database as much
as possible. Therefire, service template lelve reading, writing, and
delting is required.

Issue-ID: POLICY-1402
Change-Id: I5be57c29381bf6ddc87afdbb64ddae66a5ea5e5f
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoHandling supported policy type during PdpGroup Update 80/100680/1
a.sreekumar [Thu, 23 Jan 2020 13:35:07 +0000 (13:35 +0000)]
Handling supported policy type during PdpGroup Update

Change-Id: I62fbfeb80b81f4cc6dc0049bbd4ab9dcc5065773
Issue-ID: POLICY-2023
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoHandling supported policy type during PdpGroup Update 94/100594/4
a.sreekumar [Tue, 21 Jan 2020 17:07:50 +0000 (17:07 +0000)]
Handling supported policy type during PdpGroup Update

Change-Id: I469125c232af9d78a55c3dfa71cb701cb3864015
Issue-ID: POLICY-2023
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agovcpe operational policy tosca compliant json 20/100520/3
jhh [Mon, 20 Jan 2020 23:21:35 +0000 (17:21 -0600)]
vcpe operational policy tosca compliant json

Issue-ID: POLICY-2148
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Id8ac0279184e5d063cbff197e47f14745a9ef353
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoUpdate Dockerfiles for java11 in policy-models 16/100416/4
Jim Hahn [Fri, 17 Jan 2020 15:14:40 +0000 (10:14 -0500)]
Update Dockerfiles for java11 in policy-models

Also modified docker build scripts so they work with SNAPSHOT
or release versions of the tarballs.

Issue-ID: POLICY-1586
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ib5b8c0b83d7736180ab213b0b67d457eab7ee48e

4 years agoMerge "Ensure one jacoco output file"
Jorge Hernandez [Thu, 16 Jan 2020 17:36:30 +0000 (17:36 +0000)]
Merge "Ensure one jacoco output file"

4 years agoEnsure one jacoco output file 84/100384/1
Pamela Dragosh [Thu, 16 Jan 2020 16:55:29 +0000 (11:55 -0500)]
Ensure one jacoco output file

Sub-modules under sub-modules need to set the path to
ensure a single jacoco-ut.exec file is produced and
appended to.

I think this only gives us .1% - but that's ok. Its a
step towards consolidation.

Issue-ID: POLICY-2321
Change-Id: I31023843f55200096a905482ee55ad19bf681494
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Added Time agnostic Onset and Abated classes"
Jorge Hernandez [Thu, 16 Jan 2020 15:22:26 +0000 (15:22 +0000)]
Merge "Added Time agnostic Onset and Abated classes"

4 years agoAdded Time agnostic Onset and Abated classes 00/100300/4
jhh [Wed, 15 Jan 2020 04:48:45 +0000 (22:48 -0600)]
Added Time agnostic Onset and Abated classes

These classes can be used for comparison of alarm skeletons
independently of the time at which they were produced.

Issue-ID: POLICY-2323
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I85b9d6a429de56f056eb0a6caa9e4f90fbd68918
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Clean up TOSCA provider unit tests"
Pamela Dragosh [Thu, 16 Jan 2020 13:44:40 +0000 (13:44 +0000)]
Merge "Clean up TOSCA provider unit tests"

4 years agoClean up TOSCA provider unit tests 05/100305/3
liamfallon [Wed, 15 Jan 2020 08:20:05 +0000 (09:20 +0100)]
Clean up TOSCA provider unit tests

SOme outstanding comment on TOSCA provider unit tests cleaned up.

Issue-ID: POLICY-2315
Change-Id: I235a5fc9996c81f421f17236afb413df7435de19
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoUpdate sonar config 93/100293/1
Pamela Dragosh [Tue, 14 Jan 2020 19:24:20 +0000 (14:24 -0500)]
Update sonar config

Skip module that doesn't have code.
parent now defines the plugins, no need to duplicate
that.

Issue-ID: POLICY-2321
Change-Id: I84a161781cc0b44ba8d328ff5fb269855fcc4b36
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRead resource dirs in models prvider unit tests 37/100237/2
liamfallon [Sun, 12 Jan 2020 17:49:25 +0000 (17:49 +0000)]
Read resource dirs in models prvider unit tests

Update the unit tests in models-provider so that we can check that the
TOSCA artifact that is read from the database is the same as the TOSCA
artifact that is stored.

This review does some groundwork for that check.

Issue-ID: POLICY-2315
Change-Id: Iabc7b247736b862713585a493752bc254cfe1c3d
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoRemove deprecated methods from models 28/100228/3
Jim Hahn [Fri, 10 Jan 2020 22:52:57 +0000 (17:52 -0500)]
Remove deprecated methods from models

Addressed the following issues related to the java 11 upgrade:
- forClass().newInstance()
- java.xml.bind no longer included in jdk
- new mockito doesn't clear captured lists

Issue-ID: POLICY-1406
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ia254c1ed21f847d1824e7abc22528975372ee2b6

4 years agopolicy/models jdk 11 upgrades 73/99873/8
HOCKLA [Sat, 21 Dec 2019 18:11:33 +0000 (12:11 -0600)]
policy/models jdk 11 upgrades

Issue-ID: POLICY-1592
Change-Id: Iaa6b61c5f1c76f3e7c2043691f4d29dbc43d144e
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoBumped patch version for policy/models 05/100205/3
HOCKLA [Fri, 10 Jan 2020 18:16:00 +0000 (12:16 -0600)]
Bumped patch version for policy/models

Issue-ID: POLICY-1592
Change-Id: Iafc35fe53e28c815a79041f289cb17b6354ceccd
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoRelease policy/models 2.2.0 03/100203/1
HOCKLA [Fri, 10 Jan 2020 17:31:09 +0000 (11:31 -0600)]
Release policy/models 2.2.0

Issue-ID: POLICY-1592
Change-Id: I751dbafc67d5f232e930b56f8399ea326c6efdb1
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoMerge "Added new policy examples to support integration of new version validation...
Liam Fallon [Fri, 10 Jan 2020 15:37:41 +0000 (15:37 +0000)]
Merge "Added new policy examples to support integration of new version validation feature"

4 years agoMerge "Remove supportedPolicyTypes from PdpStatus"
Liam Fallon [Fri, 10 Jan 2020 15:35:58 +0000 (15:35 +0000)]
Merge "Remove supportedPolicyTypes from PdpStatus"

4 years agoMerge "Remove ControlLoopParams."
Pamela Dragosh [Fri, 10 Jan 2020 15:00:13 +0000 (15:00 +0000)]
Merge "Remove ControlLoopParams."

4 years agoAdded new policy examples to support integration of new version validation feature 47/100147/4
Chenfei Gao [Thu, 9 Jan 2020 19:04:05 +0000 (14:04 -0500)]
Added new policy examples to support integration of new version validation feature

Issue-ID: POLICY-2316
Change-Id: Ifcb6739c7dd6c5796067a4b9e2f3eef960e1ace4
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoFix policy-models to support data type properties 86/100186/1
liamfallon [Fri, 10 Jan 2020 13:57:29 +0000 (13:57 +0000)]
Fix policy-models to support data type properties

Data type properties are not being stored correctly into the database
when MariaDB is used (it worked fine in unit tests in H2).

Issue-ID: POLICY-2315
Change-Id: Ia901a070292b338154f3766f5fc7b91d656038df
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoRemove supportedPolicyTypes from PdpStatus 83/100183/2
ramverma [Fri, 10 Jan 2020 10:46:40 +0000 (10:46 +0000)]
Remove supportedPolicyTypes from PdpStatus

Removing supportedPolicyTypes from PdpStatus in policy/models as it is
no longer expected from the Pdps to send it as part of the heartbeat or
initial registration message. Instead the PdpGroupName is expected from
the Pdps in the initial registration message.

Issue-ID: POLICY-2256
Change-Id: I14b76a737027e146d69d89c2fe2c3f098a89e196
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
4 years agoRemove ControlLoopParams. 66/100166/1
jhh [Thu, 9 Jan 2020 23:49:31 +0000 (17:49 -0600)]
Remove ControlLoopParams.

This class is only useful in drools-applications repo.

Issue-ID: POLICY-2146
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ifbf281a3742950c3cad2c5b56689122dd766b41a

4 years agoMerge "Update tosca utils to remove code duplication"
Jim Hahn [Thu, 9 Jan 2020 14:33:29 +0000 (14:33 +0000)]
Merge "Update tosca utils to remove code duplication"

4 years agoMerge "update Db provider to support query number"
Jim Hahn [Thu, 9 Jan 2020 13:58:02 +0000 (13:58 +0000)]
Merge "update Db provider to support query number"

4 years agoUpdate tosca utils to remove code duplication 02/100102/1
liamfallon [Wed, 8 Jan 2020 17:04:50 +0000 (17:04 +0000)]
Update tosca utils to remove code duplication

Refactored the ToscaUtils class to remove code duplication.

Issue-ID: POLICY-2315
Change-Id: Ic06a0881d1797dbb3c45ae1903a150fbda421e72
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoStore and return data types for policies 64/100064/2
liamfallon [Tue, 7 Jan 2020 18:26:53 +0000 (18:26 +0000)]
Store and return data types for policies

In this change, the data types of policy types are persisted to the
database. All policy types currently in the database are returned on all
policy type get requests. This will be made more intelligent in the next
review.

Issue-ID: POLICY-2315
Change-Id: I10065ab9b90e72114a453494fc706d8aabc50c0a
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoupdate Db provider to support query number 17/99917/6
ning.xi [Thu, 26 Dec 2019 13:37:52 +0000 (21:37 +0800)]
update Db provider to support query number

Issue-ID: POLICY-1629
Signed-off-by: ning.xi <ning.xi@est.tech>
Change-Id: I42c9542adc44d52b760a70e710ab4cc6fa8a1b3b

4 years agoSupport persistence of data types 44/100044/4
liamfallon [Tue, 7 Jan 2020 10:24:12 +0000 (10:24 +0000)]
Support persistence of data types

Data types must be persisted to the database in order for them to be
retrieved in policy type queries and later for policy validation.

Issue-ID: POLICY-2315
Change-Id: Iacb88501a597aeee8f6d8bcc3d9604c13dc09090
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "pdp statistics database provider implementation"
Liam Fallon [Mon, 23 Dec 2019 20:18:31 +0000 (20:18 +0000)]
Merge "pdp statistics database provider implementation"

4 years agopdp statistics database provider implementation 68/99468/9
ning.xi [Wed, 11 Dec 2019 07:55:59 +0000 (15:55 +0800)]
pdp statistics database provider implementation

Issue-ID: POLICY-1629
Signed-off-by: ning.xi <ning.xi@est.tech>
Change-Id: Ife65d50c862ed90c3c9a3cea91a2b9a8d874fa14

4 years agoModifications to decision request and policy fixes 78/99678/2
Pamela Dragosh [Mon, 16 Dec 2019 16:11:05 +0000 (11:11 -0500)]
Modifications to decision request and policy fixes

Discovered while working on both the SDNC naming and
optimization application work.

Fixed the datatype for SDNC naming policy type
Added a copy constructor for Decision request
Added metadata for optimization Subscriber policy type

Issue-ID: POLICY-2066
Change-Id: I83c99533f26747c856c591d05d22691714549cf2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoFix timeout bug in dmaap simulator 04/99504/2
Jim Hahn [Wed, 11 Dec 2019 16:32:01 +0000 (11:32 -0500)]
Fix timeout bug in dmaap simulator

Also added a start script that can be used to execute the simulator
in stand-alone mode (i.e., outside of a docker container).

Change-Id: I26550ad36cfd2448c96cf0c09fec24e60ffd815b
Issue-ID: POLICY-2298
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Fix minor checksyle issues in models"
Pamela Dragosh [Wed, 11 Dec 2019 14:47:53 +0000 (14:47 +0000)]
Merge "Fix minor checksyle issues in models"

4 years agoMerge "Update optimization policies"
Jim Hahn [Wed, 11 Dec 2019 13:34:39 +0000 (13:34 +0000)]
Merge "Update optimization policies"

4 years agoUpdate optimization policies 39/99439/2
Pamela Dragosh [Tue, 10 Dec 2019 18:47:55 +0000 (13:47 -0500)]
Update optimization policies

These policies need to be updated.

Issue-ID: POLICY-2066
Change-Id: Idc15aa36f4295477b37aa6398920853436909751
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoFix minor checksyle issues in models 12/99412/1
liamfallon [Tue, 10 Dec 2019 13:57:32 +0000 (13:57 +0000)]
Fix minor checksyle issues in models

New checkstyle profile flagged some minor issues in policy models.

Issue-ID: POLICY-2165
Change-Id: I17ed070a3d55601ad31e48fdfd29fff01d29fa42
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Add JpaPdpStatistics entity"
Ram Krishna Verma [Tue, 10 Dec 2019 09:44:19 +0000 (09:44 +0000)]
Merge "Add JpaPdpStatistics entity"

4 years agoMerge "Add type_version to naming policy"
Ram Krishna Verma [Mon, 9 Dec 2019 15:58:06 +0000 (15:58 +0000)]
Merge "Add type_version to naming policy"

4 years agoMerge "Refactor optimization policies"
Pamela Dragosh [Mon, 9 Dec 2019 15:31:20 +0000 (15:31 +0000)]
Merge "Refactor optimization policies"

4 years agoAdd JpaPdpStatistics entity 39/97939/9
shaoqiu [Fri, 8 Nov 2019 03:09:08 +0000 (11:09 +0800)]
Add JpaPdpStatistics entity

Add JpaPdpStatistics entity which will be used in provider.
Add Pdp Statistics entities

Issue-ID: POLICY-1628
Signed-off-by: shaoqiu <tim.huang@est.tech>
Change-Id: Iab12eb02e2e7f0e366aff64fa665b5d6674f2905
Signed-off-by: shaoqiu <tim.huang@est.tech>
4 years agoAdd type_version to naming policy 02/99302/2
Pamela Dragosh [Sun, 8 Dec 2019 22:43:30 +0000 (17:43 -0500)]
Add type_version to naming policy

For testing purposes in the xacml-pdp JUnits.

Issue-ID: POLICY-1740
Change-Id: Ia35583b5aac6a40f62542b907d7f3358fc1bcbcd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRefactor optimization policies 88/99288/2
Pamela Dragosh [Sat, 7 Dec 2019 23:00:36 +0000 (18:00 -0500)]
Refactor optimization policies

Optimization policies need to be further refactored so
that Resource vs Service type policies can be specified.

Issue-ID: POLICY-2066
Change-Id: Ia40a947097692ea7dcc6ea8d13eb8669c37fac14
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoAdd models to support deltas to policy deployments 80/99280/2
Jim Hahn [Fri, 6 Dec 2019 15:22:48 +0000 (10:22 -0500)]
Add models to support deltas to policy deployments

Change-Id: Ia5134e2ba4faeefe8bcc1333abe6acc57972c243
Issue-ID: POLICY-2274
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoPoint to new release version 1.6.1 policy/common 75/99275/1
HOCKLA [Fri, 6 Dec 2019 17:46:24 +0000 (11:46 -0600)]
Point to new release version 1.6.1 policy/common

Issue-ID: POLICY-1583
Change-Id: I63b7f3934b9d6e26400c0dd68e5e31b533be1881
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoMerge "Add new Operational Policy Type"
Jorge Hernandez [Fri, 6 Dec 2019 15:07:03 +0000 (15:07 +0000)]
Merge "Add new Operational Policy Type"

4 years agoAdd new Operational Policy Type 65/97965/11
Pamela Dragosh [Tue, 5 Nov 2019 14:35:30 +0000 (09:35 -0500)]
Add new Operational Policy Type

New operational policy type for Frankfurt. Updating examples.

added sample CLAMP metadata.

Issue-ID: POLICY-2217
Change-Id: I941c3a4187a4d164bf793ef2d82c34fccc1a2c35
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpdated pom.xml to point to release versions of policy/parent and policy/common 17/99217/1
HOCKLA [Thu, 5 Dec 2019 16:24:14 +0000 (10:24 -0600)]
Updated pom.xml to point to release versions of policy/parent and policy/common

Issue-ID: POLICY-1594/POLICY-1583
Change-Id: Ib8280ab847d8a81d8470c4f4600a6b2a626ae28b
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoAdding Response model class for PdpGroup Create/Update operation 63/99163/1
a.sreekumar [Wed, 4 Dec 2019 16:40:50 +0000 (16:40 +0000)]
Adding Response model class for PdpGroup Create/Update operation

Change-Id: Ifa3b4c1e51a1446f47adf8d263989440bddfa8b9
Issue-ID: POLICY-2273
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoAdding native policy type for apex-pdp 28/99128/1
ramverma [Wed, 4 Dec 2019 09:41:01 +0000 (09:41 +0000)]
Adding native policy type for apex-pdp

Issue-ID: POLICY-2279
Change-Id: Icf9fc690aa885c490ada40b4ad8c6ea1a5fe8586
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
4 years agoMerge "Reduce volume of log information on A&AI calls"
Ram Krishna Verma [Thu, 28 Nov 2019 14:24:22 +0000 (14:24 +0000)]
Merge "Reduce volume of log information on A&AI calls"

4 years agoReduce volume of log information on A&AI calls 74/98774/4
liamfallon [Fri, 22 Nov 2019 17:28:02 +0000 (17:28 +0000)]
Reduce volume of log information on A&AI calls

The AaiManager class is logging all the http requests and responses to
and from A&AI to logger.info, creating a large volume of logging text,
the logging of these messages is now set logger.debug, so they are off
by default but can be enabled for debugging.

Issue-ID: POLICY-2125
Change-Id: I5f9674db0f9e5b271606e7af34d5218f5c629b09
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoCDS actor payload to be JSON object when applicable 18/98818/3
Rashmi Pujar [Mon, 25 Nov 2019 17:56:24 +0000 (12:56 -0500)]
CDS actor payload to be JSON object when applicable

When the policy-payload supplied by CLAMP is a valid JSON string
the CDS Blueprint payload must be a JSON object, else retain the
CDS Blueprint payload to be a string.

Issue-ID: POLICY-2253
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I6380ab0424339603ecf52d298e4f6f0cd8df754b

4 years agoUse dependency management for cds proto-definition artifact 16/98816/1
Rashmi Pujar [Mon, 25 Nov 2019 16:00:52 +0000 (11:00 -0500)]
Use dependency management for cds proto-definition artifact

Refer to: https://gerrit.onap.org/r/#/c/policy/parent/+/98733/

Issue-ID: POLICY-2254
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: Ie1053ee05f68e8b06bae20c4ce8514dd3aa21d33

4 years agoMerge "Added new policy types for native PDP policies"
Jim Hahn [Fri, 22 Nov 2019 14:20:55 +0000 (14:20 +0000)]
Merge "Added new policy types for native PDP policies"

4 years agoAllow wild cards in supported type filter 38/98738/2
Jim Hahn [Thu, 21 Nov 2019 19:59:52 +0000 (14:59 -0500)]
Allow wild cards in supported type filter

PAP was rejecting deployment of policies whose supported type
contained a wild card.  This was due to the fact that it was
querying the Pdp Groups using a filter on the supported type,
which did not take wild cards into consideration.  Updated the
filtering.

Change-Id: I50b3202a00ac85ff09a9861d8bbe1efb6dd49ae3
Issue-ID: POLICY-1636
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdded new policy types for native PDP policies 70/98370/10
Chenfei Gao [Wed, 13 Nov 2019 15:45:21 +0000 (10:45 -0500)]
Added new policy types for native PDP policies

Issue-ID: POLICY-2212
Change-Id: Ib29ad66994aa64a73f23bc36eebbc1bc03b2ac02
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoFix minor checkstyle issuse in models A&AI 15/98715/1
liamfallon [Thu, 21 Nov 2019 13:59:07 +0000 (13:59 +0000)]
Fix minor checkstyle issuse in models A&AI

Some minor checkstyle issues in the policy models Custom Query support
in A&AI fixed.

Issue-ID: POLICY-2125
Change-Id: I520caa044966acbe28d3cd864b53fb398df2f385
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoSupport wild cards in "supported policy types" 76/98476/3
Jim Hahn [Fri, 15 Nov 2019 19:12:23 +0000 (14:12 -0500)]
Support wild cards in "supported policy types"

Refactored PfConceptKey, extracting most of it into PfKeyImpl.
Added PfSearchableKey as a subclass of PfKeyImpl.

Change-Id: I524f4ce9208fc9ba09e77db4cc7dde5a21e1d7fc
Issue-ID: POLICY-2224
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Removing Named Query."
Pamela Dragosh [Fri, 15 Nov 2019 14:18:05 +0000 (14:18 +0000)]
Merge "Removing Named Query."

4 years agoRemoving Named Query. 82/98382/2
pramod.jamkhedkar [Wed, 13 Nov 2019 18:21:16 +0000 (13:21 -0500)]
Removing Named Query.

Removing all the related  files and necessary modifications for removing named query. The code now only supports Custom Query

Issue-ID: POLICY-2125
Change-Id: Ifa5ccb74142aa424359c0dea85b90bbcf70147cb
Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
4 years agoRemove duplicate dao object 79/98379/1
Jim Hahn [Wed, 13 Nov 2019 18:05:58 +0000 (13:05 -0500)]
Remove duplicate dao object

Code was creating the DAO object twice - removed the extra line.
Note: this properly doesn't fix the race condition, but it should fix
a memory leak.

Change-Id: I5f5c6002d42f9bb0525d1b5013b1300e80264645
Issue-ID: POLICY-1832
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix sonar issue affecting in drools-applications 87/98187/1
Jim Hahn [Fri, 8 Nov 2019 14:17:42 +0000 (09:17 -0500)]
Fix sonar issue affecting in drools-applications

Drools-applications has a serializable class that contains AaiCqResponse.
Sonar complained that the latter class must also be serializable, so
made the change in policy-models to fix that.  In addition, the latter
class contained a list of Object.  To ensure that those are also
serializable, the list was changed to a list of Serializable instead.

The latter change can be reverted, if it causes compilation issues
elsewhere.  However, it seems safer to enforce serializability in the
list rather than risk having a later change inject a non-serializable
object into the list.

Change-Id: Ia741a1a96ec4efcc63451e9af31c19b4fe99dd7d
Issue-ID: POLICY-2225
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoUse lombok annotations for objects in models-interaction/models-impl module 89/97989/4
Rashmi Pujar [Tue, 5 Nov 2019 22:10:00 +0000 (17:10 -0500)]
Use lombok annotations for objects in models-interaction/models-impl module

Issue-ID: POLICY-1896
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I425afe25876cea91908391418582ef584e6fe6fc

4 years agoCleanup up unused actor.test maven module 70/97970/1
Rashmi Pujar [Tue, 5 Nov 2019 16:19:58 +0000 (11:19 -0500)]
Cleanup up unused actor.test maven module

Issue-ID: POLICY-1894
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: Ib662aa6a28beb40c2a1e6814b103e95ebf4ee2e1

4 years agoMerge "PNF support changes in policy/models"
Liam Fallon [Mon, 4 Nov 2019 17:59:31 +0000 (17:59 +0000)]
Merge "PNF support changes in policy/models"

4 years agoPNF support changes in policy/models 08/97708/8
Rashmi Pujar [Tue, 29 Oct 2019 20:13:05 +0000 (16:13 -0400)]
PNF support changes in policy/models

AAI Enrichment method for PNF target-type and unit tests.
Addition of a hashmap field to ControlLoopEvent class to hold event specific parameters.
Update CDS actor to include additional event parameters

Issue-ID: POLICY-1187
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: Ie0ceb320943531de6e6bc8675844b29a358dfb7e

4 years agoAdd SDNC Naming Policy Type and example policy 60/97860/2
Pamela Dragosh [Fri, 1 Nov 2019 15:22:34 +0000 (11:22 -0400)]
Add SDNC Naming Policy Type and example policy

Will be used to create naming application for XACML PDP.

Issue-ID: POLICY-1740
Change-Id: I996537da16bdb386f4bcddd0008055b8ffac417e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoAdd common Jersey version 58/97858/1
liamfallon [Fri, 1 Nov 2019 11:24:26 +0000 (11:24 +0000)]
Add common Jersey version

Add a common version of Jersey for all Policy Framework components.

Issue-ID: POLICY-2209
Change-Id: Ic1d2ea808bb41156f776d18b875e44de22fbf06b
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Change field names in policy notifications to match wiki"
Jorge Hernandez [Fri, 1 Nov 2019 13:22:20 +0000 (13:22 +0000)]
Merge "Change field names in policy notifications to match wiki"

4 years agoFix Checkstyle issues in policy-models 40/97840/1
liamfallon [Fri, 1 Nov 2019 06:55:23 +0000 (06:55 +0000)]
Fix Checkstyle issues in policy-models

Some minor checkstyle issues were introduced into policy-models by
recent reviews.

Issue-ID: POLICY-2088
Change-Id: I84af19926432081d72e2054af788cdc35850a99c
Signed-off-by: liamfallon <liam.fallon@est.tech>