policy/models.git
4 years agoCorrections in vCPE and vFW tosca to match spec. 96/102096/2
jhh [Thu, 20 Feb 2020 21:40:08 +0000 (15:40 -0600)]
Corrections in vCPE and vFW tosca to match spec.

Issue-ID: POLICY-2375
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ibffc67dd0b68da8597a5fdff7c65321ef4313352
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Add Guard Actor"
Jorge Hernandez [Thu, 20 Feb 2020 16:50:04 +0000 (16:50 +0000)]
Merge "Add Guard Actor"

4 years agoMerge "Minor fix to avoid ConcurrentModificationException in policy-models"
Pamela Dragosh [Thu, 20 Feb 2020 15:42:37 +0000 (15:42 +0000)]
Merge "Minor fix to avoid ConcurrentModificationException in policy-models"

4 years agoMerge "Add SO actor"
Liam Fallon [Thu, 20 Feb 2020 13:16:30 +0000 (13:16 +0000)]
Merge "Add SO actor"

4 years agoMinor fix to avoid ConcurrentModificationException in policy-models 73/102073/2
a.sreekumar [Thu, 20 Feb 2020 11:58:45 +0000 (11:58 +0000)]
Minor fix to avoid ConcurrentModificationException in policy-models

Change-Id: If737f6ae0bcb0f8c694711a67a3c879fee8c11c5
Issue-ID: POLICY-1402
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoAdd Guard Actor 25/102025/2
Jim Hahn [Wed, 19 Feb 2020 22:24:11 +0000 (17:24 -0500)]
Add Guard Actor

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

4 years agoMerge "Fix cascaded get filtering and speed"
Pamela Dragosh [Wed, 19 Feb 2020 17:47:18 +0000 (17:47 +0000)]
Merge "Fix cascaded get filtering and speed"

4 years agoAdd SO actor 38/101938/3
Jim Hahn [Tue, 18 Feb 2020 17:25:37 +0000 (12:25 -0500)]
Add SO actor

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

4 years agoFix cascaded get filtering and speed 08/102008/2
liamfallon [Wed, 19 Feb 2020 16:54:34 +0000 (16:54 +0000)]
Fix cascaded get filtering and speed

This change adds proper cascading bahaviour to the returned service
template for filtered gets on policies.

It also significantly improves the performance on get operations, all
get operations on the API now result in only one database query.

Issue-ID: POLICY-1402
Change-Id: I7c7d0a8d9f1caf8b610461779e242c34b7f77365
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoValidate request content of various actors 31/101931/3
Jim Hahn [Tue, 18 Feb 2020 20:28:39 +0000 (15:28 -0500)]
Validate request content of various actors

Created common junit superclass, BasicOperation, containing
verifyRequest() method, among others.

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

4 years agoMerge "Actor updates to support SO"
Jim Hahn [Tue, 18 Feb 2020 19:38:13 +0000 (19:38 +0000)]
Merge "Actor updates to support SO"

4 years agoMerge "APPC Actor"
Jim Hahn [Tue, 18 Feb 2020 19:37:52 +0000 (19:37 +0000)]
Merge "APPC Actor"

4 years agoMerge "Add safe entity delete, fix multiple entity get"
Ram Krishna Verma [Tue, 18 Feb 2020 19:14:33 +0000 (19:14 +0000)]
Merge "Add safe entity delete, fix multiple entity get"

4 years agoAPPC Actor 23/101923/2
Jim Hahn [Tue, 18 Feb 2020 17:26:34 +0000 (12:26 -0500)]
APPC Actor

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

4 years agoActor updates to support SO 25/101925/1
Jim Hahn [Tue, 18 Feb 2020 13:13:45 +0000 (08:13 -0500)]
Actor updates to support SO

Used SuperBuilder in operation Params classes.
Added rawResponse to http setOutcome().
Made HttpOperation.operator private.

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

4 years agoMerge "Allow storing database password in environment variables"
Ram Krishna Verma [Tue, 18 Feb 2020 17:49:40 +0000 (17:49 +0000)]
Merge "Allow storing database password in environment variables"

4 years agoAdd safe entity delete, fix multiple entity get 24/101924/1
liamfallon [Tue, 18 Feb 2020 16:14:59 +0000 (16:14 +0000)]
Add safe entity delete, fix multiple entity get

This review implements checks on whether entities are being used or
referenced propr to allowing deletes.

The review also fixes bugs on multiple entity get returning 4040 not
found

Issue-ID: POLICY-1402
Change-Id: I9cebb9a873098740e9ff4be6284d6307e19838bd
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "More changes to actor code"
Pamela Dragosh [Tue, 18 Feb 2020 17:14:29 +0000 (17:14 +0000)]
Merge "More changes to actor code"

4 years agoMerge "add unit test for pdpstatistics provider"
Liam Fallon [Tue, 18 Feb 2020 16:13:01 +0000 (16:13 +0000)]
Merge "add unit test for pdpstatistics provider"

4 years agoAdd missing classes to persistence.xml 79/101879/1
liamfallon [Tue, 18 Feb 2020 08:53:02 +0000 (08:53 +0000)]
Add missing classes to persistence.xml

The recent policy-models changes cascade database changes to some new
classes. THis change adds these classes to persistence.xml.

Issue-ID: POLICY-1402
Change-Id: I4d9953c8423dc6e33f6852744c394c9cfbc21ac6
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMore changes to actor code 59/101859/5
Jim Hahn [Mon, 17 Feb 2020 18:57:56 +0000 (13:57 -0500)]
More changes to actor code

Use Coder.convert() from policy-common.
Passed response to setOutcome().
Changed class names from XxxOperator to XxxOperation.
Modified SDNC junits to invoke start() instead of startOperationAsync().
Changed context obtain() to re-run if the future was canceled.
Added junit support class, BasicBidirectionalTopicOperation.

Modified HttpOperation to allow subsequent requests to be issued.
Some actors, like SO, send an initial HTTP request and then follow
it with HTTP "are you done?" requests.

Issue-ID: POLICY-2363-prop
Change-Id: I12b5c2d4f07254e0cb79fabfe1ccf844b70a0654
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoadd unit test for pdpstatistics provider 20/101720/3
ning.xi [Thu, 13 Feb 2020 10:00:36 +0000 (18:00 +0800)]
add unit test for pdpstatistics provider

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

4 years agoMerge "Use BidirectionalTopicClient from policy-common"
Jim Hahn [Mon, 17 Feb 2020 22:25:03 +0000 (22:25 +0000)]
Merge "Use BidirectionalTopicClient from policy-common"

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 agoUse BidirectionalTopicClient from policy-common 70/101770/5
Jim Hahn [Fri, 14 Feb 2020 19:22:48 +0000 (14:22 -0500)]
Use BidirectionalTopicClient from policy-common

Also modified "target" to sink in various places, and renamed
various uses of "pair" to "bidirectional" (e.g., TopicPairParams
=> BidirectionalTopicParams).
Also replaced MyExec with PseudoExecutor, from policy-common.
As part of this, extracted the logRequest and logResponse methods
from the Http and Topic classes, moving them into the common
OperationPartial class.
Modified A&AI, SDNC junit tests to use PseudoExecutor.
Added support for incomplete responses on Topics, where multiple
responses may be received for one request
Fixed a duplicate entry in actor.aai pom.

As the changes were already big enough, went ahead and also did the
following to support the APPC Actor:
- Reorganized parameter classes and content.
- Modified anyOf, allOf to take functions instead of futures and handle
  exceptions thrown by any of the functions.  Also added sequence() method.
- Deleted doTask.
- Modified ActorService.config to take a map of maps, not just a map.
- Decided NOT to move anyOf, allOf, and sequence from OperationPartial
  to a utility class, because they depend on "params".

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

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 agoAllow storing database password in environment variables 80/101680/1
Dominik Mizyn [Thu, 13 Feb 2020 14:04:53 +0000 (15:04 +0100)]
Allow storing database password in environment variables

This patch allows to store and get database passwor from
environment variables. This is needed if we want to send those
variables by helm secrets.

Issue-ID: OOM-2287
Change-Id: Id9ea8f43dd07c2b0cdeaa6d14a8033336d26923f
Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
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"